From 867eb387c5893b004996d6e68efddd9ca2fca36a Mon Sep 17 00:00:00 2001 From: Maverick2797 Date: Fri, 28 Mar 2025 22:28:11 +0800 Subject: Add craft recipes for LuaATC components --- advtrains_luaautomation/init.lua | 3 +++ advtrains_luaautomation/recipes.lua | 27 +++++++++++++++++++++++++++ advtrains_luaautomation/settingtypes.txt | 2 ++ 3 files changed, 32 insertions(+) create mode 100644 advtrains_luaautomation/recipes.lua create mode 100644 advtrains_luaautomation/settingtypes.txt (limited to 'advtrains_luaautomation') diff --git a/advtrains_luaautomation/init.lua b/advtrains_luaautomation/init.lua index b359142..a2f4eb9 100644 --- a/advtrains_luaautomation/init.lua +++ b/advtrains_luaautomation/init.lua @@ -40,6 +40,9 @@ dofile(mp.."/pcnaming.lua") dofile(mp.."/chatcmds.lua") +if minetest.settings:get_bool("advtrains_luaautomation_enable_atlac_recipes",false) == true then + dofile(mp.."/recipes.lua") +end local filename=minetest.get_worldpath().."/advtrains_luaautomation" diff --git a/advtrains_luaautomation/recipes.lua b/advtrains_luaautomation/recipes.lua new file mode 100644 index 0000000..16121a8 --- /dev/null +++ b/advtrains_luaautomation/recipes.lua @@ -0,0 +1,27 @@ +-- depends on default, digilines and mesecons for crafting recipes +minetest.register_craft({ + output = "advtrains_luaautomation:dtrack_placer", + recipe = { + {"","mesecons_luacontroller:luacontroller0000",""}, + {"","advtrains:dtrack_atc_placer",""}, + {"","digilines:wire_std_00000000",""}, + } +}) + +minetest.register_craft({ + output = "advtrains_luaautomation:mesecon_controller0000", + recipe = { + {"","mesecons:wire_00000000_off",""}, + {"mesecons:wire_00000000_off","advtrains_luaautomation:dtrack_placer","mesecons:wire_00000000_off"}, + {"","mesecons:wire_00000000_off",""}, + } +}) + +minetest.register_craft({ + output = "advtrains_luaautomation:oppanel", + recipe = { + {"","mesecons_button:button_off",""}, + {"","advtrains_luaautomation:mesecon_controller0000",""}, + {"","default:stone",""}, + } +}) \ No newline at end of file diff --git a/advtrains_luaautomation/settingtypes.txt b/advtrains_luaautomation/settingtypes.txt new file mode 100644 index 0000000..20ed52e --- /dev/null +++ b/advtrains_luaautomation/settingtypes.txt @@ -0,0 +1,2 @@ +# Enable or disable craft recipes for LuaATC components +advtrains_luaautomation_enable_atlac_recipes (Enable LuaATC component craft recipes) bool true \ No newline at end of file -- cgit v1.2.3