forked from mtcontrib/spears
Update tools.lua with l18n support
This commit is contained in:
parent
e9e7afd6c5
commit
3f3210d172
23
tools.lua
23
tools.lua
@ -57,43 +57,42 @@ function spears_register_spear(spear_type, desc, base_damage, toughness, materia
|
||||
end
|
||||
|
||||
if minetest.settings:get_bool('spears_enable_stone_spear') then
|
||||
spears_register_spear('stone', 'Stone', 4, 20, 'group:stone')
|
||||
minetest.log("info", "[MOD] Stone spear enabled")
|
||||
spears_register_spear('stone', S('Stone Spear'), 4, 20, 'group:stone')
|
||||
end
|
||||
|
||||
if minetest.get_modpath("pigiron") then
|
||||
if minetest.settings:get_bool('spears_enable_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 minetest.settings:get_bool('spears_enable_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 minetest.settings:get_bool('spears_enable_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 minetest.settings:get_bool('spears_enable_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 minetest.settings:get_bool('spears_enable_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 minetest.settings:get_bool('spears_enable_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 minetest.settings:get_bool('spears_enable_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 minetest.settings:get_bool('spears_enable_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 minetest.settings:get_bool('spears_enable_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 minetest.settings:get_bool('spears_enable_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