From 3750765d48dfe5ad4dec67ec278a76d63073a252 Mon Sep 17 00:00:00 2001 From: Freeman Date: Thu, 26 Oct 2023 12:38:23 +0200 Subject: [PATCH] remove has_underch variables because are only used once in each file --- technic_worldgen/crafts.lua | 3 +-- technic_worldgen/nodes.lua | 3 +-- technic_worldgen/oregen.lua | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/technic_worldgen/crafts.lua b/technic_worldgen/crafts.lua index b42e30db..3453111b 100644 --- a/technic_worldgen/crafts.lua +++ b/technic_worldgen/crafts.lua @@ -1,6 +1,5 @@ local S = minetest.get_translator("technic_worldgen") -local has_underch = minetest.get_modpath("underch") minetest.register_craftitem(":technic:uranium_lump", { description = S("Uranium Lump"), @@ -137,7 +136,7 @@ minetest.register_craft({ output = "technic:wrought_iron_ingot", }) -if not has_underch then +if not minetest.get_modpath("underch") then minetest.register_craft({ output = "technic:marble_bricks 4", recipe = { diff --git a/technic_worldgen/nodes.lua b/technic_worldgen/nodes.lua index 3f156b8a..6cecebbf 100644 --- a/technic_worldgen/nodes.lua +++ b/technic_worldgen/nodes.lua @@ -2,7 +2,6 @@ local S = minetest.get_translator("technic_worldgen") local has_mcl = minetest.get_modpath("mcl_core") -local has_underch = minetest.get_modpath("underch") minetest.register_node(":technic:mineral_uranium", { description = S("Uranium Ore"), @@ -80,7 +79,7 @@ else }) end -if has_underch then +if minetest.get_modpath("underch") then minetest.register_alias("technic:marble", "underch:marble") minetest.register_alias("technic:marble_bricks", "underch:marble_brick") else diff --git a/technic_worldgen/oregen.lua b/technic_worldgen/oregen.lua index d1b261bc..2f78ba30 100644 --- a/technic_worldgen/oregen.lua +++ b/technic_worldgen/oregen.lua @@ -1,6 +1,5 @@ local has_mcl = minetest.get_modpath("mcl_core") -local has_underch = minetest.get_modpath("underch") local stones = {"default:stone", "mcl_core:stone", "mcl_deepslate:deepslate"} local uranium_params = { @@ -211,7 +210,8 @@ if has_mcl then }) end -if technic.config:get_bool("enable_marble_generation") and not has_underch 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",