add show recipe flag

This commit is contained in:
TenPlus1 2020-07-20 21:30:41 +01:00
parent d7b734022d
commit e7117e4c3d
2 changed files with 24 additions and 18 deletions

@ -31,6 +31,7 @@ local protector_hurt = tonumber(minetest.settings:get("protector_hurt")) or 0
local protector_spawn = tonumber(minetest.settings:get("protector_spawn") local protector_spawn = tonumber(minetest.settings:get("protector_spawn")
or minetest.settings:get("protector_pvp_spawn")) or 0 or minetest.settings:get("protector_pvp_spawn")) or 0
local protector_show = tonumber(minetest.settings:get("protector_show_interval")) or 5 local protector_show = tonumber(minetest.settings:get("protector_show_interval")) or 5
local protector_recipe = minetest.settings:get_bool("protector_recipe") ~= false
-- get static spawn position -- get static spawn position
local statspawn = minetest.string_to_pos(minetest.settings:get("static_spawnpoint")) local statspawn = minetest.string_to_pos(minetest.settings:get("static_spawnpoint"))
@ -480,6 +481,7 @@ minetest.register_node("protector:protect", {
}) })
-- default recipe and alternative for MineClone2 -- default recipe and alternative for MineClone2
if protector_recipe then
if minetest.registered_items["default:stone"] then if minetest.registered_items["default:stone"] then
minetest.register_craft({ minetest.register_craft({
output = "protector:protect", output = "protector:protect",
@ -499,6 +501,7 @@ minetest.register_craft({
} }
}) })
end end
end
-- protection logo -- protection logo
minetest.register_node("protector:protect2", { minetest.register_node("protector:protect2", {

@ -24,3 +24,6 @@ protector_show_interval (Protector Show Interval) int 5
# Interval in seconds that HUD ownership text is updated, 0 to disable # Interval in seconds that HUD ownership text is updated, 0 to disable
protector_hud_interval (Protector HUD Interval) int 5 protector_hud_interval (Protector HUD Interval) int 5
# Enables craft recipe for protection block
protector_recipe (Enable Protector recipe) bool true