forked from mtcontrib/spears
Add translation support
This commit is contained in:
parent
5ac99ff835
commit
f9e839435c
9
locale/template.txt
Normal file
9
locale/template.txt
Normal file
|
@ -0,0 +1,9 @@
|
|||
# textdomain: spears
|
||||
Stone Spear=
|
||||
Iron Spear=
|
||||
Steel Spear=
|
||||
Copper Spear=
|
||||
Bronze Spear=
|
||||
Obsidian Spear=
|
||||
Diamond Spear=
|
||||
Golden Spear=
|
26
tools.lua
26
tools.lua
|
@ -1,7 +1,9 @@
|
|||
local S = minetest.get_translator("spears")
|
||||
|
||||
function spears_register_spear(spear_type, desc, base_damage, toughness, material)
|
||||
|
||||
minetest.register_tool("spears:spear_" .. spear_type, {
|
||||
description = desc .. " spear",
|
||||
description = desc,
|
||||
wield_image = "spears_spear_" .. spear_type .. ".png^[transform4",
|
||||
inventory_image = "spears_spear_" .. spear_type .. ".png",
|
||||
wield_scale= {x = 1.5, y = 1.5, z = 1.5},
|
||||
|
@ -55,43 +57,43 @@ function spears_register_spear(spear_type, desc, base_damage, toughness, materia
|
|||
end
|
||||
|
||||
if not DISABLE_STONE_SPEAR then
|
||||
spears_register_spear('stone', 'Stone', 4, 20, 'group:stone')
|
||||
spears_register_spear('stone', S('Stone Spear'), 4, 20, 'group:stone')
|
||||
end
|
||||
|
||||
if minetest.get_modpath("pigiron") then
|
||||
if not DISABLE_IRON_SPEAR then
|
||||
spears_register_spear('iron', 'Iron', 5.5, 30, 'pigiron:iron_ingot')
|
||||
spears_register_spear('iron', S('Iron Spear'), 5.5, 30, 'pigiron:iron_ingot')
|
||||
end
|
||||
if not DISABLE_STEEL_SPEAR then
|
||||
spears_register_spear('steel', 'Steel', 6, 35, 'default:steel_ingot')
|
||||
spears_register_spear('steel', S('Steel Spear'), 6, 35, 'default:steel_ingot')
|
||||
end
|
||||
if not DISABLE_COPPER_SPEAR then
|
||||
spears_register_spear('copper', 'Copper', 4.8, 30, 'default:copper_ingot')
|
||||
spears_register_spear('copper', S('Copper Spear'), 4.8, 30, 'default:copper_ingot')
|
||||
end
|
||||
if not DISABLE_BRONZE_SPEAR then
|
||||
spears_register_spear('bronze', 'Bronze', 5.5, 35, 'default:bronze_ingot')
|
||||
spears_register_spear('bronze', S('Bronze Spear'), 5.5, 35, 'default:bronze_ingot')
|
||||
end
|
||||
else
|
||||
if not DISABLE_STEEL_SPEAR then
|
||||
spears_register_spear('steel', 'Steel', 6, 30, 'default:steel_ingot')
|
||||
spears_register_spear('steel', S('Steel Spear'), 6, 30, 'default:steel_ingot')
|
||||
end
|
||||
if not DISABLE_COPPER_SPEAR then
|
||||
spears_register_spear('copper', 'Copper', 5, 30, 'default:copper_ingot')
|
||||
spears_register_spear('copper', S('Copper Spear'), 5, 30, 'default:copper_ingot')
|
||||
end
|
||||
if not DISABLE_BRONZE_SPEAR then
|
||||
spears_register_spear('bronze', 'Bronze', 6, 35, 'default:bronze_ingot')
|
||||
spears_register_spear('bronze', S('Bronze Spear'), 6, 35, 'default:bronze_ingot')
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if not DISABLE_OBSIDIAN_SPEAR then
|
||||
spears_register_spear('obsidian', 'Obsidian', 8, 30, 'default:obsidian')
|
||||
spears_register_spear('obsidian', S('Obsidian Spear'), 8, 30, 'default:obsidian')
|
||||
end
|
||||
|
||||
if not DISABLE_DIAMOND_SPEAR then
|
||||
spears_register_spear('diamond', 'Diamond', 8, 40, 'default:diamond')
|
||||
spears_register_spear('diamond', S('Diamond Spear'), 8, 40, 'default:diamond')
|
||||
end
|
||||
|
||||
if not DISABLE_GOLD_SPEAR then
|
||||
spears_register_spear('gold', 'Golden', 5, 40, 'default:gold_ingot')
|
||||
spears_register_spear('gold', S('Golden Spear'), 5, 40, 'default:gold_ingot')
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user