From dcfcb375271aeaa71a9a6ac5c619b2de3d390eeb Mon Sep 17 00:00:00 2001 From: Elkien3 Date: Thu, 2 Jun 2016 15:33:49 -0500 Subject: [PATCH] Add craft recipe for flag --- ctf_flag/flags.lua | 11 +++++++++++ ctf_flag/init.lua | 1 + doc_settings.md | 1 + 3 files changed, 13 insertions(+) diff --git a/ctf_flag/flags.lua b/ctf_flag/flags.lua index c2f5def..8a26122 100644 --- a/ctf_flag/flags.lua +++ b/ctf_flag/flags.lua @@ -82,3 +82,14 @@ minetest.register_abm({ chance = 1, action = ctf_flag.update }) + +if ctf.setting("flag.crafting") then + minetest.register_craft({ + output = "ctf_flag:flag", + recipe = { + {"default:stick", "group:wool"}, + {"default:stick", "",}, + {"default:stick", ""} + } +}) +end diff --git a/ctf_flag/init.lua b/ctf_flag/init.lua index 5f67553..93de501 100644 --- a/ctf_flag/init.lua +++ b/ctf_flag/init.lua @@ -9,6 +9,7 @@ ctf.register_on_init(function() ctf._set("flag.nobuild_radius", 3) ctf._set("flag.drop_time", 7*60) ctf._set("flag.drop_warn_time", 60) + ctf._set("flag.crafting", false) ctf._set("flag.alerts", true) ctf._set("flag.alerts.neutral_alert", true) ctf._set("gui.team.teleport_to_flag", true) diff --git a/doc_settings.md b/doc_settings.md index ea0927f..7a94c12 100644 --- a/doc_settings.md +++ b/doc_settings.md @@ -47,6 +47,7 @@ | flag.names | true | enable naming flags | | flag.protect_distance | 25 | area protection distance | | flag.waypoints | true | enable waypoints to flags | +| flag.crafting | false | enable the crafting of flags | | | gui.tab.flags | true | Show flags tab | | gui.team.teleport_to_flag | true | Enable teleport to flag button in flags tab | | gui.team.teleport_to_spawn | false | Enable teleport to spawn button in flags tab |