Skip to content

Commit

Permalink
remove has_underch variables because are only used once in each file
Browse files Browse the repository at this point in the history
  • Loading branch information
nonfreegithub committed Oct 26, 2023
1 parent 5fcf726 commit 3750765
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
3 changes: 1 addition & 2 deletions technic_worldgen/crafts.lua
Original file line number Diff line number Diff line change
@@ -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"),
Expand Down Expand Up @@ -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 = {
Expand Down
3 changes: 1 addition & 2 deletions technic_worldgen/nodes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions technic_worldgen/oregen.lua
Original file line number Diff line number Diff line change
@@ -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 = {
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 3750765

Please sign in to comment.