Compatibility with mtg_craft_guide (#555)

Use group instead of wire when possible

Fixes https://github.com/minetest/minetest_game/issues/2843.
This commit is contained in:
Louis Royer 2021-04-01 18:56:08 +02:00 committed by GitHub
parent 69d4a9584d
commit f5c3f798be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 5 deletions

@ -175,9 +175,9 @@ mesecon.register_node("mesecons_extrawires:vertical_bottom", {
minetest.register_craft({ minetest.register_craft({
output = "mesecons_extrawires:vertical_off 3", output = "mesecons_extrawires:vertical_off 3",
recipe = { recipe = {
{"mesecons:wire_00000000_off"}, {"group:mesecon_conductor_craftable"},
{"mesecons:wire_00000000_off"}, {"group:mesecon_conductor_craftable"},
{"mesecons:wire_00000000_off"} {"group:mesecon_conductor_craftable"},
} }
}) })

@ -86,7 +86,7 @@ minetest.register_craft({
output = "mesecons_insulated:insulated_off 3", output = "mesecons_insulated:insulated_off 3",
recipe = { recipe = {
{"mesecons_materials:fiber", "mesecons_materials:fiber", "mesecons_materials:fiber"}, {"mesecons_materials:fiber", "mesecons_materials:fiber", "mesecons_materials:fiber"},
{"mesecons:wire_00000000_off", "mesecons:wire_00000000_off", "mesecons:wire_00000000_off"}, {"group:mesecon_conductor_craftable", "group:mesecon_conductor_craftable", "group:mesecon_conductor_craftable"},
{"mesecons_materials:fiber", "mesecons_materials:fiber", "mesecons_materials:fiber"}, {"mesecons_materials:fiber", "mesecons_materials:fiber", "mesecons_materials:fiber"},
} }
}) })

@ -195,10 +195,11 @@ local function register_wires()
}} }}
local groups_on = {dig_immediate = 3, mesecon_conductor_craftable = 1, local groups_on = {dig_immediate = 3, mesecon_conductor_craftable = 1,
not_in_creative_inventory = 1} not_in_creative_inventory = 1, not_in_craft_guide = 1}
local groups_off = {dig_immediate = 3, mesecon_conductor_craftable = 1} local groups_off = {dig_immediate = 3, mesecon_conductor_craftable = 1}
if nodeid ~= "00000000" then if nodeid ~= "00000000" then
groups_off["not_in_creative_inventory"] = 1 groups_off["not_in_creative_inventory"] = 1
groups_off["not_in_craft_guide"] = 1
end end
mesecon.register_node(":mesecons:wire_"..nodeid, { mesecon.register_node(":mesecons:wire_"..nodeid, {