add translation support
This commit is contained in:
parent
77dcda83e3
commit
da1d09da5d
26
init.lua
26
init.lua
@ -1,8 +1,12 @@
|
||||
|
||||
-- Translation support
|
||||
|
||||
local S = minetest.get_translator("pigiron")
|
||||
|
||||
-- Pig Iron Ingot
|
||||
|
||||
minetest.register_craftitem("pigiron:iron_ingot", {
|
||||
description = "Iron Ingot",
|
||||
description = S("Iron Ingot"),
|
||||
inventory_image = "pigiron_iron_ingot.png"
|
||||
})
|
||||
|
||||
@ -24,7 +28,7 @@ minetest.register_craft({
|
||||
-- Pig Iron Block
|
||||
|
||||
minetest.register_node("pigiron:iron_block", {
|
||||
description = "Iron Block",
|
||||
description = S("Iron Block"),
|
||||
tiles = {"pigiron_iron_block.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 1},
|
||||
@ -48,7 +52,7 @@ minetest.register_craft({
|
||||
-- Rusted Pig Iron Block
|
||||
|
||||
minetest.register_node("pigiron:rusted_iron_block", {
|
||||
description = "Rusted Iron Block",
|
||||
description = S("Rusted Iron Block"),
|
||||
tiles = {"pigiron_rusted_iron_block.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 1},
|
||||
@ -82,7 +86,7 @@ if not minetest.get_modpath("ethereal") then
|
||||
-- Charcoal
|
||||
|
||||
minetest.register_craftitem("pigiron:charcoal_lump", {
|
||||
description = "Lump of Charcoal",
|
||||
description = S("Lump of Charcoal"),
|
||||
inventory_image = "pigiron_charcoal_lump.png"
|
||||
})
|
||||
|
||||
@ -123,7 +127,7 @@ end -- END If Ethereal
|
||||
-- Iron/Charcoal/Coal Mix
|
||||
|
||||
minetest.register_craftitem("pigiron:iron_charcoal_mix", {
|
||||
description = "Iron and Charcoal Mix",
|
||||
description = S("Iron and Charcoal Mix"),
|
||||
inventory_image = "pigiron_iron_ingot.png^pigiron_charcoal_lump.png"
|
||||
})
|
||||
|
||||
@ -215,9 +219,7 @@ if minetest.get_modpath("xpanes")
|
||||
and minetest.registered_nodes["xpanes:bar_flat"]
|
||||
and not minetest.registered_nodes["default:permafrost"] then
|
||||
|
||||
minetest.clear_craft({
|
||||
output = "xpanes:bar_flat"
|
||||
})
|
||||
minetest.clear_craft({output = "xpanes:bar_flat"})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "xpanes:bar_flat",
|
||||
@ -235,15 +237,15 @@ if minetest.get_modpath("stairs") then
|
||||
stairs.register_stair_and_slab("iron_block", "pigiron:iron_block",
|
||||
{cracky = 1},
|
||||
{"pigiron_iron_block.png"},
|
||||
"Iron Block Stair",
|
||||
"Iron Block Slab",
|
||||
S("Iron Block Stair"),
|
||||
S("Iron Block Slab"),
|
||||
default.node_sound_metal_defaults())
|
||||
|
||||
stairs.register_stair_and_slab("rusted_iron_block", "pigiron:rusted_iron_block",
|
||||
{cracky = 1},
|
||||
{"pigiron_rusted_iron_block.png"},
|
||||
"Rusted Iron Block Stair",
|
||||
"Rusted Iron Block Slab",
|
||||
S("Rusted Iron Block Stair"),
|
||||
S("Rusted Iron Block Slab"),
|
||||
default.node_sound_metal_defaults())
|
||||
|
||||
-- Cook Rusted Iron Stairs and Slabs Back Into Normal Iron Stairs
|
||||
|
16
locale/template.txt
Normal file
16
locale/template.txt
Normal file
@ -0,0 +1,16 @@
|
||||
# textdomain: pigiron
|
||||
|
||||
Iron Ingot=
|
||||
Iron Block=
|
||||
Iron Block Stair=
|
||||
Iron Block Slab=
|
||||
Rusted Iron Block=
|
||||
Lump of Charcoal=
|
||||
Iron and Charcoal Mix=
|
||||
Rusted Iron Block Stair=
|
||||
Rusted Iron Block Slab=
|
||||
Iron Shovel=
|
||||
Iron Axe=
|
||||
Iron Sword=
|
||||
Iron Pickaxe=
|
||||
Iron Hoe=
|
26
tools.lua
26
tools.lua
@ -1,8 +1,12 @@
|
||||
|
||||
-- Translation support
|
||||
|
||||
local S = minetest.get_translator("pigiron")
|
||||
|
||||
-- Iron Pickaxe
|
||||
|
||||
minetest.register_tool("pigiron:pick_iron", {
|
||||
description = "Iron Pickaxe",
|
||||
description = S("Iron Pickaxe"),
|
||||
inventory_image = "pigiron_iron_pick.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.2,
|
||||
@ -30,7 +34,7 @@ minetest.register_craft({
|
||||
-- Iron Shovel
|
||||
|
||||
minetest.register_tool("pigiron:shovel_iron", {
|
||||
description = "Iron Shovel",
|
||||
description = S("Iron Shovel"),
|
||||
inventory_image = "pigiron_iron_shovel.png",
|
||||
wield_image = "pigiron_iron_shovel.png^[transformR90",
|
||||
tool_capabilities = {
|
||||
@ -59,7 +63,7 @@ minetest.register_craft({
|
||||
-- Iron Axe
|
||||
|
||||
minetest.register_tool("pigiron:axe_iron", {
|
||||
description = "Iron Axe",
|
||||
description = S("Iron Axe"),
|
||||
inventory_image = "pigiron_iron_axe.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.1,
|
||||
@ -87,7 +91,7 @@ minetest.register_craft({
|
||||
-- Iron Sword
|
||||
|
||||
minetest.register_tool("pigiron:sword_iron", {
|
||||
description = "Iron Sword",
|
||||
description = S("Iron Sword"),
|
||||
inventory_image = "pigiron_iron_sword.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.0,
|
||||
@ -117,7 +121,7 @@ minetest.register_craft({
|
||||
if minetest.get_modpath("farming") then
|
||||
|
||||
farming.register_hoe(":farming:hoe_iron", {
|
||||
description = "Iron Hoe",
|
||||
description = S("Iron Hoe"),
|
||||
inventory_image = "pigiron_iron_hoe.png",
|
||||
max_uses = 150,
|
||||
material = "pigiron:iron_ingot",
|
||||
@ -128,8 +132,8 @@ if minetest.get_modpath("farming") then
|
||||
if farming and farming.mod and minetest.get_modpath("toolranks") then
|
||||
|
||||
minetest.override_item("farming:hoe_iron", {
|
||||
original_description = "Iron Hoe",
|
||||
description = toolranks.create_description("Iron Hoe")})
|
||||
original_description = S("Iron Hoe"),
|
||||
description = toolranks.create_description(S("Iron Hoe"))})
|
||||
end
|
||||
end
|
||||
|
||||
@ -253,8 +257,8 @@ if minetest.get_modpath("toolranks") then
|
||||
})
|
||||
end
|
||||
|
||||
add_tool("pigiron:pick_iron", "Iron Pickaxe", true)
|
||||
add_tool("pigiron:axe_iron", "Iron Axe", true)
|
||||
add_tool("pigiron:shovel_iron", "Iron Shovel", true)
|
||||
add_tool("pigiron:sword_iron", "Iron Sword", true)
|
||||
add_tool("pigiron:pick_iron", S("Iron Pickaxe"), true)
|
||||
add_tool("pigiron:axe_iron", S("Iron Axe"), true)
|
||||
add_tool("pigiron:shovel_iron", S("Iron Shovel"), true)
|
||||
add_tool("pigiron:sword_iron", S("Iron Sword"), true)
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user