From 1660d80668ed2425582d3040a7df6817e034eca6 Mon Sep 17 00:00:00 2001 From: sys4 Date: Thu, 15 Oct 2020 10:35:32 +0200 Subject: [PATCH] Change recipe when basic_materials mod is detected --- depends.txt | 3 ++- mod.conf | 3 +++ shared_locked.lua | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 mod.conf diff --git a/depends.txt b/depends.txt index dc657fe..d663829 100644 --- a/depends.txt +++ b/depends.txt @@ -1,3 +1,4 @@ default signs_lib? -locks? \ No newline at end of file +locks? +basic_materials? diff --git a/mod.conf b/mod.conf new file mode 100644 index 0000000..8a35f73 --- /dev/null +++ b/mod.conf @@ -0,0 +1,3 @@ +name = arrow_signs +depends = default +optional_depends = signs_lib,locks,basic_materials diff --git a/shared_locked.lua b/shared_locked.lua index 79f3a5c..8489544 100644 --- a/shared_locked.lua +++ b/shared_locked.lua @@ -5,7 +5,7 @@ To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA. ]] minetest.register_node("arrow_signs:shared_locked", { - description = "Shared locked sign", + description = "Shared locked arrow sign", drawtype = "nodebox", node_box = arrow_signs.nodebox, selection_box = arrow_signs.selection_box, @@ -69,7 +69,7 @@ minetest.register_node("arrow_signs:shared_locked", { minetest.register_craft({ type = 'shapeless', output = 'arrow_signs:shared_locked', - recipe = {'arrow_signs:wall', 'locks:lock'}, + recipe = {'arrow_signs:wall', 'locks:lock', minetest.get_modpath("basic_materials") and "basic_materials:ic" or ""}, }) --Redefinition