1
0
mirror of https://github.com/D00Med/scifi_nodes.git synced 2024-12-22 16:10:18 +01:00

move "dye" to optional depends and disable recipes if default or dye are not available

This commit is contained in:
BuckarooBanzay 2021-08-15 11:10:53 +02:00
parent 85aa74e98b
commit 112543ca93
2 changed files with 32 additions and 11 deletions

View File

@ -1,14 +1,24 @@
-- CRAFTING RECIPES FOR SCIFI NODES -- CRAFTING RECIPES FOR SCIFI NODES
-- 6 basic plastic from 9 homedecor plastic sheet if minetest.get_modpath("basic_materials") then
minetest.register_craft({ -- 6 basic plastic from 9 homedecor plastic sheet
output = "scifi_nodes:white2 6", minetest.register_craft({
recipe = { output = "scifi_nodes:white2 6",
{"homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting"}, recipe = {
{"homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting"}, {"homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting"},
{"homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting"} {"homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting"},
} {"homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting"}
}) }
})
end
if not minetest.get_modpath("default") or not minetest.get_modpath("dye") then
-- the default and dye mod are required for most of the recipes
-- if either of them is missing (because we are not in the default game)
-- then just skip the recipes entirely
-- TODO: potentially switch recipes depending on current game
return
end
minetest.register_craft({ minetest.register_craft({
output = "scifi_nodes:super_white", output = "scifi_nodes:super_white",

View File

@ -1,4 +1,15 @@
name = scifi_nodes name = scifi_nodes
description = Minetest mod that adds scifi themed blocks, doors, materials, plants and other assets. description = Minetest mod that adds scifi themed blocks, doors, materials, plants and other assets.
depends = default,dye depends = default
optional_depends = xpanes,mesecons,moreblocks,mesecons_microcontroller,mesecons_button,mesecons_torch,mesecons_receiver,basic_materials,unifieddyes optional_depends = """
xpanes,
mesecons,
moreblocks,
mesecons_microcontroller,
mesecons_button,
mesecons_torch,
mesecons_receiver,
basic_materials,
dye
unifieddyes
"""