Skip to content

Commit

Permalink
add silver-spool recipes only if silver is present
Browse files Browse the repository at this point in the history
  • Loading branch information
BuckarooBanzay committed Mar 25, 2022
1 parent 8631a26 commit 800f740
Showing 1 changed file with 24 additions and 18 deletions.
42 changes: 24 additions & 18 deletions crafts.lua
Expand Up @@ -16,6 +16,10 @@ local materials = {
silicon = "mesecons_materials:silicon",
}

if minetest.get_modpath("moreores") then
materials.silver_ingot = "moreores:silver_ingot"
end

if minetest.get_modpath("mcl_core") then
materials = {
dirt = "mcl_core:dirt",
Expand Down Expand Up @@ -376,22 +380,24 @@ minetest.register_craft( {
},
})

minetest.register_craft( {
output = "basic_materials:silver_wire 2",
type = "shapeless",
recipe = {
materials.silver_ingot,
"basic_materials:empty_spool",
"basic_materials:empty_spool",
},
})
if materials.silver_ingot then
minetest.register_craft( {
output = "basic_materials:silver_wire 2",
type = "shapeless",
recipe = {
materials.silver_ingot,
"basic_materials:empty_spool",
"basic_materials:empty_spool",
},
})

minetest.register_craft( {
type = "shapeless",
output = "basic_materials:brass_ingot 3",
recipe = {
materials.copper_ingot,
materials.copper_ingot,
materials.silver_ingot,
},
})
minetest.register_craft( {
type = "shapeless",
output = "basic_materials:brass_ingot 3",
recipe = {
materials.copper_ingot,
materials.copper_ingot,
materials.silver_ingot,
},
})
end

0 comments on commit 800f740

Please sign in to comment.