From ab43bf90365378fabe872379f874ec5030dd67cf Mon Sep 17 00:00:00 2001 From: "Github is a non-free platform owned by Microsoft. Reasonable alternatives exist, such as Gitea, Sourcehut. We need a federated, mastodon-like forge based on ForgeFed. See: https://forgefed.org" Date: Thu, 26 Oct 2023 12:44:13 +0200 Subject: [PATCH] Underch mod marble compatibility (#331) --- technic_worldgen/crafts.lua | 16 ++++++++------- technic_worldgen/mod.conf | 2 +- technic_worldgen/nodes.lua | 41 +++++++++++++++++++++---------------- technic_worldgen/oregen.lua | 3 ++- 4 files changed, 35 insertions(+), 27 deletions(-) diff --git a/technic_worldgen/crafts.lua b/technic_worldgen/crafts.lua index 9482deba..3453111b 100644 --- a/technic_worldgen/crafts.lua +++ b/technic_worldgen/crafts.lua @@ -136,13 +136,15 @@ minetest.register_craft({ output = "technic:wrought_iron_ingot", }) -minetest.register_craft({ - output = "technic:marble_bricks 4", - recipe = { - {"technic:marble","technic:marble"}, - {"technic:marble","technic:marble"} - } -}) +if not minetest.get_modpath("underch") then + minetest.register_craft({ + output = "technic:marble_bricks 4", + recipe = { + {"technic:marble","technic:marble"}, + {"technic:marble","technic:marble"} + } + }) +end minetest.register_craft({ output = "technic:granite_bricks 4", diff --git a/technic_worldgen/mod.conf b/technic_worldgen/mod.conf index 9fc8a211..93ced82d 100644 --- a/technic_worldgen/mod.conf +++ b/technic_worldgen/mod.conf @@ -1,3 +1,3 @@ name = technic_worldgen depends = -optional_depends = default, mcl_core, mcl_sounds, mcl_init, mcl_worlds, mg +optional_depends = default, mcl_core, mcl_sounds, mcl_init, mcl_worlds, mg, underch diff --git a/technic_worldgen/nodes.lua b/technic_worldgen/nodes.lua index 36a3fc6b..6cecebbf 100644 --- a/technic_worldgen/nodes.lua +++ b/technic_worldgen/nodes.lua @@ -79,25 +79,30 @@ else }) end -minetest.register_node(":technic:marble", { - description = S("Marble"), - tiles = {"technic_marble.png"}, - is_ground_content = true, - groups = {cracky=3, marble=1, pickaxey=1}, - _mcl_hardness = 0.8, - _mcl_blast_resistance = 1, - sounds = technic.sounds.node_sound_stone_defaults(), -}) +if minetest.get_modpath("underch") then + minetest.register_alias("technic:marble", "underch:marble") + minetest.register_alias("technic:marble_bricks", "underch:marble_brick") +else + minetest.register_node(":technic:marble", { + description = S("Marble"), + tiles = {"technic_marble.png"}, + is_ground_content = true, + groups = {cracky=3, marble=1, pickaxey=1}, + _mcl_hardness = 0.8, + _mcl_blast_resistance = 1, + sounds = technic.sounds.node_sound_stone_defaults(), + }) -minetest.register_node(":technic:marble_bricks", { - description = S("Marble Bricks"), - tiles = {"technic_marble_bricks.png"}, - is_ground_content = true, - groups = {cracky=3, pickaxey=1}, - _mcl_hardness = 0.8, - _mcl_blast_resistance = 1, - sounds = technic.sounds.node_sound_stone_defaults(), -}) + minetest.register_node(":technic:marble_bricks", { + description = S("Marble Bricks"), + tiles = {"technic_marble_bricks.png"}, + is_ground_content = true, + groups = {cracky=3, pickaxey=1}, + _mcl_hardness = 0.8, + _mcl_blast_resistance = 1, + sounds = technic.sounds.node_sound_stone_defaults(), + }) +end minetest.register_node(":technic:uranium_block", { description = S("Uranium Block"), diff --git a/technic_worldgen/oregen.lua b/technic_worldgen/oregen.lua index 3a193642..2f78ba30 100644 --- a/technic_worldgen/oregen.lua +++ b/technic_worldgen/oregen.lua @@ -210,7 +210,8 @@ if has_mcl then }) end -if technic.config:get_bool("enable_marble_generation") then +if technic.config:get_bool("enable_marble_generation") + and not minetest.get_modpath("underch") then minetest.register_ore({ ore_type = "sheet", ore = "technic:marble",