summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesecons_microcontroller/init.lua29
1 files changed, 21 insertions, 8 deletions
diff --git a/mesecons_microcontroller/init.lua b/mesecons_microcontroller/init.lua
index b241713..ef78f60 100644
--- a/mesecons_microcontroller/init.lua
+++ b/mesecons_microcontroller/init.lua
@@ -144,14 +144,27 @@ end
end
end
-minetest.register_craft({
- output = 'craft "mesecons_microcontroller:microcontroller0000" 2',
- recipe = {
- {'mesecons_materials:silicon', 'mesecons_materials:silicon', 'group:mesecon_conductor_craftable'},
- {'mesecons_materials:silicon', 'mesecons_materials:silicon', 'group:mesecon_conductor_craftable'},
- {'group:mesecon_conductor_craftable', 'group:mesecon_conductor_craftable', ''},
- }
-})
+if minetest.get_modpath("mesecons_luacontroller") then
+ minetest.register_craft({
+ type = "shapeless",
+ output = "mesecons_microcontroller:microcontroller0000",
+ recipe = {"mesecons_luacontroller:luacontroller0000"},
+ })
+ minetest.register_craft({
+ type = "shapeless",
+ output = "mesecons_luacontroller:luacontroller0000",
+ recipe = {"mesecons_microcontroller:microcontroller0000"},
+ })
+else
+ minetest.register_craft({
+ output = 'craft "mesecons_microcontroller:microcontroller0000" 2',
+ recipe = {
+ {'mesecons_materials:silicon', 'mesecons_materials:silicon', 'group:mesecon_conductor_craftable'},
+ {'mesecons_materials:silicon', 'mesecons_materials:silicon', 'group:mesecon_conductor_craftable'},
+ {'group:mesecon_conductor_craftable', 'group:mesecon_conductor_craftable', ''},
+ }
+ })
+end
yc.reset = function(pos)
yc.action(pos, {a=false, b=false, c=false, d=false})