mirror of
https://github.com/minetest-mods/technic.git
synced 2025-02-10 17:20:27 +01:00
Fix translation of iron
And preserve compatibility with [toolranks mod](https://github.com/lisacvuk/minetest-toolranks/).
This commit is contained in:
parent
fcbc7ecb60
commit
8c7e636ceb
@ -141,54 +141,29 @@ minetest.register_craft({
|
|||||||
output = "technic:wrought_iron_ingot",
|
output = "technic:wrought_iron_ingot",
|
||||||
})
|
})
|
||||||
|
|
||||||
local function for_each_registered_item(action)
|
local steel_to_iron = {
|
||||||
local already_reg = {}
|
{name="default:axe_steel", description=S("Iron Axe")},
|
||||||
for k, _ in pairs(minetest.registered_items) do
|
{name="default:pick_steel", description=S("Iron Pickaxe")},
|
||||||
table.insert(already_reg, k)
|
{name="default:shovel_steel", description=S("Iron Shovel")},
|
||||||
end
|
{name="default:sword_steel", description=S("Iron Sword")},
|
||||||
local really_register_craftitem = minetest.register_craftitem
|
{name="doors:door_steel", description=S("Iron Door")},
|
||||||
minetest.register_craftitem = function(name, def)
|
{name="farming:hoe_steel", description=S("Iron Hoe")},
|
||||||
really_register_craftitem(name, def)
|
{name="glooptest:hammer_steel", description=S("Iron Hammer")},
|
||||||
action(string.gsub(name, "^:", ""))
|
{name="glooptest:handsaw_steel", description=S("Iron Handsaw")},
|
||||||
end
|
{name="glooptest:reinforced_crystal_glass", description=S("Iron-Reinforced Crystal Glass")},
|
||||||
local really_register_tool = minetest.register_tool
|
{name="vessels:steel_bottle", description=S("Heavy Iron Bottle (empty)")},
|
||||||
minetest.register_tool = function(name, def)
|
}
|
||||||
really_register_tool(name, def)
|
|
||||||
action(string.gsub(name, "^:", ""))
|
for _, v in ipairs(steel_to_iron) do
|
||||||
end
|
local item_def = minetest.registered_items[v.name]
|
||||||
local really_register_node = minetest.register_node
|
if item_def then
|
||||||
minetest.register_node = function(name, def)
|
-- toolranks mod compatibility
|
||||||
really_register_node(name, def)
|
if minetest.get_modpath("toolranks") and item_def.original_description then
|
||||||
action(string.gsub(name, "^:", ""))
|
minetest.override_item(v.name, {
|
||||||
end
|
original_description = v.description,
|
||||||
for _, name in ipairs(already_reg) do
|
description = toolranks.create_description(v.description, 0, 1)})
|
||||||
action(name)
|
else
|
||||||
|
minetest.override_item(v.name, { description = v.description })
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local steel_to_iron = {}
|
|
||||||
for _, i in ipairs({
|
|
||||||
"default:axe_steel",
|
|
||||||
"default:pick_steel",
|
|
||||||
"default:shovel_steel",
|
|
||||||
"default:sword_steel",
|
|
||||||
"doors:door_steel",
|
|
||||||
"farming:hoe_steel",
|
|
||||||
"glooptest:hammer_steel",
|
|
||||||
"glooptest:handsaw_steel",
|
|
||||||
"glooptest:reinforced_crystal_glass",
|
|
||||||
"mesecons_doors:op_door_steel",
|
|
||||||
"mesecons_doors:sig_door_steel",
|
|
||||||
"vessels:steel_bottle",
|
|
||||||
}) do
|
|
||||||
steel_to_iron[i] = true
|
|
||||||
end
|
|
||||||
|
|
||||||
for_each_registered_item(function(item_name)
|
|
||||||
local item_def = minetest.registered_items[item_name]
|
|
||||||
if steel_to_iron[item_name] and string.find(item_def.description, "Steel") then
|
|
||||||
-- TODO: Fix this line
|
|
||||||
-- This is not the good way to do this because it breaks translations
|
|
||||||
minetest.override_item(item_name, { description = string.gsub(item_def.description, "Steel", "Iron") })
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
|
@ -18,6 +18,18 @@ Carbon Steel Ingot=Kohlenstoffstahlbarren
|
|||||||
Stainless Steel Ingot=Edelstahlbarren
|
Stainless Steel Ingot=Edelstahlbarren
|
||||||
Iron=Eisen
|
Iron=Eisen
|
||||||
|
|
||||||
|
#### Steel to iron
|
||||||
|
Iron Axe=
|
||||||
|
Iron Pickaxe=
|
||||||
|
Iron Shovel=
|
||||||
|
Iron Sword=
|
||||||
|
Iron Door=
|
||||||
|
Iron Hoe=
|
||||||
|
Iron Hammer=
|
||||||
|
Iron Handsaw=
|
||||||
|
Iron-Reinforced Crystal Glass=
|
||||||
|
Heavy Iron Bottle (empty)=
|
||||||
|
|
||||||
## nodes.lua
|
## nodes.lua
|
||||||
Uranium Ore=Uranerz
|
Uranium Ore=Uranerz
|
||||||
Chromium Ore=Chromerz
|
Chromium Ore=Chromerz
|
||||||
|
@ -16,6 +16,18 @@ Carbon Steel Ingot=Lingote de Acero al Carbon
|
|||||||
Stainless Steel Ingot=Lingote de Acero inoxidable
|
Stainless Steel Ingot=Lingote de Acero inoxidable
|
||||||
Iron=Lingote
|
Iron=Lingote
|
||||||
|
|
||||||
|
#### Steel to iron
|
||||||
|
Iron Axe=
|
||||||
|
Iron Pickaxe=
|
||||||
|
Iron Shovel=
|
||||||
|
Iron Sword=
|
||||||
|
Iron Door=
|
||||||
|
Iron Hoe=
|
||||||
|
Iron Hammer=
|
||||||
|
Iron Handsaw=
|
||||||
|
Iron-Reinforced Crystal Glass=
|
||||||
|
Heavy Iron Bottle (empty)=
|
||||||
|
|
||||||
###nodes.lua
|
###nodes.lua
|
||||||
Uranium Ore=Mineral de Uranio
|
Uranium Ore=Mineral de Uranio
|
||||||
Chromium Ore=Mineral de Cromo
|
Chromium Ore=Mineral de Cromo
|
||||||
|
@ -20,6 +20,18 @@ Carbon Steel Ingot=Lingot d'acier au carbone
|
|||||||
Stainless Steel Ingot=Lingot d'acier inoxydable
|
Stainless Steel Ingot=Lingot d'acier inoxydable
|
||||||
Iron=Fer
|
Iron=Fer
|
||||||
|
|
||||||
|
#### Steel to iron
|
||||||
|
Iron Axe=Hache en fer
|
||||||
|
Iron Pickaxe=Pioche en fer
|
||||||
|
Iron Shovel=Pelle en fer
|
||||||
|
Iron Sword=Épée en fer
|
||||||
|
Iron Door=Porte en fer
|
||||||
|
Iron Hoe=Houe en fer
|
||||||
|
Iron Hammer=Marteau en fer
|
||||||
|
Iron Handsaw=Scie circulaire en fer
|
||||||
|
Iron-Reinforced Crystal Glass=Verre en crystal renforcé au fer
|
||||||
|
Heavy Iron Bottle (empty)=Bouteille lourde en fer (vide)
|
||||||
|
|
||||||
###nodes.lua
|
###nodes.lua
|
||||||
Sulfur Ore=Minerai de soufre
|
Sulfur Ore=Minerai de soufre
|
||||||
Lead Ore=Minerai de plomb
|
Lead Ore=Minerai de plomb
|
||||||
|
@ -18,6 +18,18 @@ Carbon Steel Ingot=Sztabka stali węglowej
|
|||||||
Stainless Steel Ingot=Sztabka nierdzewnej stali
|
Stainless Steel Ingot=Sztabka nierdzewnej stali
|
||||||
Iron=Żelazo
|
Iron=Żelazo
|
||||||
|
|
||||||
|
#### Steel to iron
|
||||||
|
Iron Axe=
|
||||||
|
Iron Pickaxe=
|
||||||
|
Iron Shovel=
|
||||||
|
Iron Sword=
|
||||||
|
Iron Door=
|
||||||
|
Iron Hoe=
|
||||||
|
Iron Hammer=
|
||||||
|
Iron Handsaw=
|
||||||
|
Iron-Reinforced Crystal Glass=
|
||||||
|
Heavy Iron Bottle (empty)=
|
||||||
|
|
||||||
###nodes.lua
|
###nodes.lua
|
||||||
Uranium Ore=Ruda uranu
|
Uranium Ore=Ruda uranu
|
||||||
Chromium Ore=Ruda chromu
|
Chromium Ore=Ruda chromu
|
||||||
|
@ -18,6 +18,18 @@ Carbon Steel Ingot=Lingote de Aço Carbono
|
|||||||
Stainless Steel Ingot= Lingote de Ferro Inoxidável
|
Stainless Steel Ingot= Lingote de Ferro Inoxidável
|
||||||
Iron=Ferro
|
Iron=Ferro
|
||||||
|
|
||||||
|
#### Steel to iron
|
||||||
|
Iron Axe=
|
||||||
|
Iron Pickaxe=
|
||||||
|
Iron Shovel=
|
||||||
|
Iron Sword=
|
||||||
|
Iron Door=
|
||||||
|
Iron Hoe=
|
||||||
|
Iron Hammer=
|
||||||
|
Iron Handsaw=
|
||||||
|
Iron-Reinforced Crystal Glass=
|
||||||
|
Heavy Iron Bottle (empty)=
|
||||||
|
|
||||||
###nodes.lua
|
###nodes.lua
|
||||||
Uranium Ore=Minério de Urânio
|
Uranium Ore=Minério de Urânio
|
||||||
Chromium Ore=Minério de Crômio
|
Chromium Ore=Minério de Crômio
|
||||||
|
@ -18,6 +18,18 @@ Carbon Steel Ingot=Karbon çelik külçe
|
|||||||
Stainless Steel Ingot =Paslanmaz çelik külçe
|
Stainless Steel Ingot =Paslanmaz çelik külçe
|
||||||
Iron=Demir
|
Iron=Demir
|
||||||
|
|
||||||
|
#### Steel to iron
|
||||||
|
Iron Axe=
|
||||||
|
Iron Pickaxe=
|
||||||
|
Iron Shovel=
|
||||||
|
Iron Sword=
|
||||||
|
Iron Door=
|
||||||
|
Iron Hoe=
|
||||||
|
Iron Hammer=
|
||||||
|
Iron Handsaw=
|
||||||
|
Iron-Reinforced Crystal Glass=
|
||||||
|
Heavy Iron Bottle (empty)=
|
||||||
|
|
||||||
###nodes.lua
|
###nodes.lua
|
||||||
Uranium Ore=Uranyum madeni
|
Uranium Ore=Uranyum madeni
|
||||||
Chromium Ore=Krom madeni
|
Chromium Ore=Krom madeni
|
||||||
|
@ -20,6 +20,19 @@ Carbon Steel Ingot=
|
|||||||
Stainless Steel Ingot=
|
Stainless Steel Ingot=
|
||||||
Iron=
|
Iron=
|
||||||
|
|
||||||
|
#### Steel to iron
|
||||||
|
Iron Axe=
|
||||||
|
Iron Pickaxe=
|
||||||
|
Iron Shovel=
|
||||||
|
Iron Sword=
|
||||||
|
Iron Door=
|
||||||
|
Iron Hoe=
|
||||||
|
Iron Hammer=
|
||||||
|
Iron Handsaw=
|
||||||
|
Iron-Reinforced Crystal Glass=
|
||||||
|
Heavy Iron Bottle (empty)=
|
||||||
|
|
||||||
|
|
||||||
###nodes.lua
|
###nodes.lua
|
||||||
Sulfur Ore=
|
Sulfur Ore=
|
||||||
Lead Ore=
|
Lead Ore=
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
name = technic_worldgen
|
name = technic_worldgen
|
||||||
depends = default, basic_materials
|
depends = default, basic_materials
|
||||||
optional_depends = mg, doors, farming, glooptest, mesecons_doors, vessels
|
optional_depends = mg, doors, farming, glooptest, mesecons_doors, vessels, toolranks
|
||||||
|
Loading…
Reference in New Issue
Block a user