From 8dc927e1b79301e4c8f0aae9b701f09075aa3cb4 Mon Sep 17 00:00:00 2001 From: SFENCE Date: Mon, 28 Feb 2022 16:21:42 +0100 Subject: [PATCH] Fix dependencies and recipes. Disable silicon if hades_materials is aviable. --- craftitems.lua | 16 ++++++++++------ crafts.lua | 16 ++++++++++------ mod.conf | 2 +- 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/craftitems.lua b/craftitems.lua index a9051c6..8b3d27b 100644 --- a/craftitems.lua +++ b/craftitems.lua @@ -8,7 +8,7 @@ if not have_hades_materials then inventory_image = "basic_materials_plastic_sheet.png", }) else - minetest.register_alias("basic_materials:plastic_sheet", "hades_materials:plastic_sheeting"); + minetest.register_alias("basic_materials:plastic_sheet", "hades_materials:plastic_sheeting") end minetest.register_craftitem("basic_materials:plastic_strip", { @@ -27,10 +27,14 @@ minetest.register_craftitem("basic_materials:oil_extract", { inventory_image = "basic_materials_oil_extract.png", }) -minetest.register_craftitem("basic_materials:paraffin", { - description = S("Unprocessed paraffin"), - inventory_image = "basic_materials_paraffin.png", -}) +if not have_hades_materials then + minetest.register_craftitem("basic_materials:paraffin", { + description = S("Unprocessed paraffin"), + inventory_image = "basic_materials_paraffin.png", + }) +else + minetest.register_alias("basic_materials:paraffin", "hades_materials:plastic_base") +end minetest.register_craftitem("basic_materials:terracotta_base", { description = S("Uncooked Terracotta Base"), @@ -48,7 +52,7 @@ if not have_hades_materials then inventory_image = "basic_materials_silicon.png", }) else - minetest.register_alias("hades_extramaterials:silicon", "hades_materials:silicon"); + minetest.register_alias("hades_extramaterials:silicon", "hades_materials:silicon") end minetest.register_craftitem("basic_materials:ic", { diff --git a/crafts.lua b/crafts.lua index ebb3dbb..b945952 100644 --- a/crafts.lua +++ b/crafts.lua @@ -13,6 +13,7 @@ local materials = { water_bucket = "bucket:bucket_water", empty_bucket = "bucket:bucket_empty", dye_dark_grey = "dye:dark_grey", + silicon = "mesecons_materials:silicon", } if minetest.get_modpath("mcl_core") then @@ -33,6 +34,7 @@ if minetest.get_modpath("mcl_core") then copper_ingot = "mcl_core:iron_ingot", tin_ingot = "mcl_core:iron_ingot", silver_ingot = "mcl_core:iron_ingot", + silicon = "mesecons_materials:silicon", } elseif minetest.get_modpath("fl_ores") and minetest.get_modpath("fl_stone") then materials = { @@ -51,6 +53,7 @@ elseif minetest.get_modpath("fl_ores") and minetest.get_modpath("fl_stone") then copper_ingot = "fl_ores:copper_ingot", tin_ingot = "fl_ores:tin_ingot", silver_ingot = "fl_ores:iron_ingot", + silicon = "mesecons_materials:silicon", } elseif minetest.get_modpath("hades_core") then materials = { @@ -63,17 +66,18 @@ elseif minetest.get_modpath("hades_core") then torch = "hades_torches:torch", diamond = "hades_core:diamond", clay_lump = "hades_core:clay_lump", - dye_dark_grey = "dye:dark_grey_dye", + dye_dark_grey = "dye:dark_grey", copper_ingot = "hades_core:copper_ingot", tin_ingot = "hades_core:tin_ingot", --[[ since hades doesnt have buckets or water for the user, using dirt from near water to pull the water out ]] - water_bucket = "hades_core:fertile_sand", - empty_bucket = "hades_core:dirt", + water_bucket = "hades_core:dirt", + empty_bucket = "hades_core:fertile_sand", --set this to steel unless hadesextraores is present silver_ingot = "hades_core:steel_ingot", + silicon = "hades_materials:silicon", } if minetest.get_modpath("hades_bucket") then @@ -337,7 +341,7 @@ minetest.register_craft({ if not have_hades_materials then minetest.register_craft( { - output = "mesecons_materials:silicon 4", + output = materials.silicon.." 4", recipe = { { materials.sand, materials.sand }, { materials.sand, materials.steel_ingot }, @@ -348,8 +352,8 @@ end minetest.register_craft( { output = "basic_materials:ic 4", recipe = { - { "mesecons_materials:silicon", "mesecons_materials:silicon" }, - { "mesecons_materials:silicon", materials.copper_ingot }, + { materials.silicon, materials.silicon }, + { materials.silicon, materials.copper_ingot }, }, }) diff --git a/mod.conf b/mod.conf index 6a16208..419bf7e 100644 --- a/mod.conf +++ b/mod.conf @@ -1,3 +1,3 @@ name = basic_materials -optional_depends = moreores, default, mesecons_materials, dye, bucket, fl_stone, fl_trees, mcl_sounds, hades_sounds +optional_depends = moreores, default, mesecons_materials, dye, bucket, fl_stone, fl_trees, mcl_sounds, hades_sounds, hades_materials, hades_bucket, hades_extraores, hades_mesecons_materials min_minetest_version = 5.2.0