Skip to content

Commit

Permalink
Make the detector recipe from luacontroller optional (#696)
Browse files Browse the repository at this point in the history
  • Loading branch information
MoNTE48 authored Jan 2, 2025
1 parent dd073d2 commit 1f9e86c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 16 deletions.
36 changes: 20 additions & 16 deletions mesecons_detector/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,16 @@ minetest.register_node("mesecons_detector:object_detector_on", {
on_blast = mesecon.on_blastnode,
})

minetest.register_craft({
output = 'mesecons_detector:object_detector_off',
recipe = {
{"mesecons_gamecompat:steel_ingot", "mesecons_gamecompat:steel_ingot", "mesecons_gamecompat:steel_ingot"},
{"mesecons_gamecompat:steel_ingot", "mesecons_luacontroller:luacontroller0000", "mesecons_gamecompat:steel_ingot"},
{"mesecons_gamecompat:steel_ingot", "group:mesecon_conductor_craftable", "mesecons_gamecompat:steel_ingot"},
}
})
if minetest.get_modpath("mesecons_luacontroller") then
minetest.register_craft({
output = 'mesecons_detector:object_detector_off',
recipe = {
{"mesecons_gamecompat:steel_ingot", "mesecons_gamecompat:steel_ingot", "mesecons_gamecompat:steel_ingot"},
{"mesecons_gamecompat:steel_ingot", "mesecons_luacontroller:luacontroller0000", "mesecons_gamecompat:steel_ingot"},
{"mesecons_gamecompat:steel_ingot", "group:mesecon_conductor_craftable", "mesecons_gamecompat:steel_ingot"},
}
})
end

minetest.register_craft({
output = 'mesecons_detector:object_detector_off',
Expand Down Expand Up @@ -287,14 +289,16 @@ minetest.register_node("mesecons_detector:node_detector_on", {
on_blast = mesecon.on_blastnode,
})

minetest.register_craft({
output = 'mesecons_detector:node_detector_off',
recipe = {
{"mesecons_gamecompat:steel_ingot", "group:mesecon_conductor_craftable", "mesecons_gamecompat:steel_ingot"},
{"mesecons_gamecompat:steel_ingot", "mesecons_luacontroller:luacontroller0000", "mesecons_gamecompat:steel_ingot"},
{"mesecons_gamecompat:steel_ingot", "mesecons_gamecompat:steel_ingot", "mesecons_gamecompat:steel_ingot"},
}
})
if minetest.get_modpath("mesecons_luacontroller") then
minetest.register_craft({
output = 'mesecons_detector:node_detector_off',
recipe = {
{"mesecons_gamecompat:steel_ingot", "group:mesecon_conductor_craftable", "mesecons_gamecompat:steel_ingot"},
{"mesecons_gamecompat:steel_ingot", "mesecons_luacontroller:luacontroller0000", "mesecons_gamecompat:steel_ingot"},
{"mesecons_gamecompat:steel_ingot", "mesecons_gamecompat:steel_ingot", "mesecons_gamecompat:steel_ingot"},
}
})
end

minetest.register_craft({
output = 'mesecons_detector:node_detector_off',
Expand Down
1 change: 1 addition & 0 deletions mesecons_detector/mod.conf
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
name = mesecons_detector
depends = mesecons, mesecons_gamecompat, mesecons_materials
optional_depends = mesecons_luacontroller

0 comments on commit 1f9e86c

Please sign in to comment.