mirror of
https://github.com/minetest-mods/technic.git
synced 2025-01-11 10:40:19 +01:00
Allow disabling the steel->wrought iron overrides
This commit is contained in:
parent
43acec2900
commit
a9ad38d095
@ -6,6 +6,7 @@ local defaults = {
|
|||||||
enable_granite_generation = "true",
|
enable_granite_generation = "true",
|
||||||
enable_marble_generation = "true",
|
enable_marble_generation = "true",
|
||||||
enable_rubber_tree_generation = "true",
|
enable_rubber_tree_generation = "true",
|
||||||
|
enable_steel_override = "true",
|
||||||
}
|
}
|
||||||
|
|
||||||
for k, v in pairs(defaults) do
|
for k, v in pairs(defaults) do
|
||||||
|
@ -166,6 +166,7 @@ local function for_each_registered_item(action)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if technic.config:get_bool("enable_steel_override") then
|
||||||
local steel_to_iron = {}
|
local steel_to_iron = {}
|
||||||
for _, i in ipairs({
|
for _, i in ipairs({
|
||||||
"default:axe_steel",
|
"default:axe_steel",
|
||||||
@ -190,3 +191,4 @@ for_each_registered_item(function(item_name)
|
|||||||
minetest.override_item(item_name, { description = string.gsub(item_def.description, "Steel", S("Iron")) })
|
minetest.override_item(item_name, { description = string.gsub(item_def.description, "Steel", S("Iron")) })
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
end
|
||||||
|
@ -104,11 +104,6 @@ minetest.register_node(":technic:lead_block", {
|
|||||||
|
|
||||||
minetest.register_alias("technic:wrought_iron_block", "default:steelblock")
|
minetest.register_alias("technic:wrought_iron_block", "default:steelblock")
|
||||||
|
|
||||||
minetest.override_item("default:steelblock", {
|
|
||||||
description = S("Wrought Iron Block"),
|
|
||||||
tiles = { "technic_wrought_iron_block.png" },
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_node(":technic:cast_iron_block", {
|
minetest.register_node(":technic:cast_iron_block", {
|
||||||
description = S("Cast Iron Block"),
|
description = S("Cast Iron Block"),
|
||||||
tiles = { "technic_cast_iron_block.png" },
|
tiles = { "technic_cast_iron_block.png" },
|
||||||
@ -156,6 +151,12 @@ local function for_each_registered_node(action)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if technic.config:get_bool("enable_steel_override") then
|
||||||
|
minetest.override_item("default:steelblock", {
|
||||||
|
description = S("Wrought Iron Block"),
|
||||||
|
tiles = { "technic_wrought_iron_block.png" },
|
||||||
|
})
|
||||||
|
|
||||||
for_each_registered_node(function(node_name, node_def)
|
for_each_registered_node(function(node_name, node_def)
|
||||||
if node_name ~= "default:steelblock" and
|
if node_name ~= "default:steelblock" and
|
||||||
node_name:find("steelblock", 1, true) and
|
node_name:find("steelblock", 1, true) and
|
||||||
@ -185,4 +186,5 @@ for_each_registered_node(function(node_name, node_def)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user