+-- beds/beds.lua
+
+-- support for MT game translation.
+local S = beds.get_translator
+
-- Fancy shaped bed
beds.register_bed("beds:fancy_bed", {
- description = "Fancy Bed",
+ description = S("Fancy Bed"),
inventory_image = "beds_bed_fancy.png",
wield_image = "beds_bed_fancy.png",
tiles = {
-- Simple shaped bed
beds.register_bed("beds:bed", {
- description = "Simple Bed",
+ description = S("Simple Bed"),
inventory_image = "beds_bed.png",
wield_image = "beds_bed.png",
tiles = {
+-- beds/init.lua
+
+-- Load support for MT game translation.
+local S = minetest.get_translator("beds")
+
+
beds = {}
beds.player = {}
beds.bed_position = {}
beds.pos = {}
beds.spawn = {}
+beds.get_translator = S
beds.formspec = "size[8,11;true]" ..
"no_prepend[]" ..
"bgcolor[#080808BB;true]" ..
- "button_exit[2,10;4,0.75;leave;Leave Bed]"
+ "button_exit[2,10;4,0.75;leave;" .. S("Leave Bed") .. "]"
local modpath = minetest.get_modpath("beds")
+-- binoculars/init.lua
+
-- Mod global namespace
binoculars = {}
+-- Load support for MT game translation.
+local S = minetest.get_translator("binoculars")
+
-- Detect creative mod
local creative_mod = minetest.get_modpath("creative")
-- Binoculars item
minetest.register_craftitem("binoculars:binoculars", {
- description = "Binoculars\nUse with 'Zoom' key",
+ description = S("Binoculars\nUse with 'Zoom' key"),
inventory_image = "binoculars_binoculars.png",
stack_max = 1,
+-- boats/init.lua
+
+-- Load support for MT game translation.
+local S = minetest.get_translator("boats")
+
--
-- Helper functions
--
if ctrl.up and ctrl.down then
if not self.auto then
self.auto = true
- minetest.chat_send_player(self.driver, "[boats] Cruise on")
+ minetest.chat_send_player(self.driver, S("[boats] Cruise on"))
end
elseif ctrl.down then
self.v = self.v - dtime * 1.8
if self.auto then
self.auto = false
- minetest.chat_send_player(self.driver, "[boats] Cruise off")
+ minetest.chat_send_player(self.driver, S("[boats] Cruise off"))
end
elseif ctrl.up or self.auto then
self.v = self.v + dtime * 1.8
minetest.register_craftitem("boats:boat", {
- description = "Boat",
+ description = S("Boat"),
inventory_image = "boats_inventory.png",
wield_image = "boats_wield.png",
wield_scale = {x = 2, y = 2, z = 1},
+-- bones/init.lua
+
-- Minetest 0.4 mod: bones
-- See README.txt for licensing and other information.
+-- Load support for MT game translation.
+local S = minetest.get_translator("bones")
+
bones = {}
local function is_owner(pos, name)
local share_bones_time_early = tonumber(minetest.settings:get("share_bones_time_early")) or share_bones_time / 4
minetest.register_node("bones:bones", {
- description = "Bones",
+ description = S("Bones"),
tiles = {
"bones_top.png^[transform2",
"bones_bottom.png",
local meta = minetest.get_meta(pos)
local time = meta:get_int("time") + elapsed
if time >= share_bones_time then
- meta:set_string("infotext", meta:get_string("owner") .. "'s old bones")
+ meta:set_string("infotext", S("@1's old bones", meta:get_string("owner")))
meta:set_string("owner", "")
else
meta:set_int("time", time)
minetest.log("action", player_name .. " dies at " .. pos_string ..
". No bones placed")
if bones_position_message then
- minetest.chat_send_player(player_name, player_name .. " died at " .. pos_string .. ".")
+ minetest.chat_send_player(player_name, S("@1 died at @2.", player_name, pos_string))
end
return
end
minetest.log("action", player_name .. " dies at " .. pos_string ..
". No bones placed")
if bones_position_message then
- minetest.chat_send_player(player_name, player_name .. " died at " .. pos_string .. ".")
+ minetest.chat_send_player(player_name, S("@1 died at @2.", player_name, pos_string))
end
return
end
minetest.log("action", player_name .. " dies at " .. pos_string ..
". Inventory dropped")
if bones_position_message then
- minetest.chat_send_player(player_name, player_name .. " died at " .. pos_string ..
- ", and dropped their inventory.")
+ minetest.chat_send_player(player_name, S("@1 died at @2, and dropped their inventory.", player_name, pos_string))
end
return
end
minetest.log("action", player_name .. " dies at " .. pos_string ..
". Bones placed")
if bones_position_message then
- minetest.chat_send_player(player_name, player_name .. " died at " .. pos_string ..
- ", and bones were placed.")
+ minetest.chat_send_player(player_name, S("@1 died at @2, and bones were placed.", player_name, pos_string))
end
local meta = minetest.get_meta(pos)
meta:set_string("owner", player_name)
if share_bones_time ~= 0 then
- meta:set_string("infotext", player_name .. "'s fresh bones")
+ meta:set_string("infotext", S("@1's fresh bones.", player_name))
if share_bones_time_early == 0 or not minetest.is_protected(pos, player_name) then
meta:set_int("time", 0)
minetest.get_node_timer(pos):start(10)
else
- meta:set_string("infotext", player_name.."'s bones")
+ meta:set_string("infotext", S("@1's bones.", player_name))
end
end)
-- Minetest 0.4 mod: bucket
-- See README.txt for licensing and other information.
+-- Load support for MT game translation.
+local S = minetest.get_translator("bucket")
+
+
minetest.register_alias("bucket", "bucket:bucket_empty")
minetest.register_alias("bucket_water", "bucket:bucket_water")
minetest.register_alias("bucket_lava", "bucket:bucket_lava")
end
minetest.register_craftitem("bucket:bucket_empty", {
- description = "Empty Bucket",
+ description = S("Empty Bucket"),
inventory_image = "bucket.png",
groups = {tool = 1},
liquids_pointable = true,
"default:water_flowing",
"bucket:bucket_water",
"bucket_water.png",
- "Water Bucket",
+ S("Water Bucket"),
{tool = 1, water_bucket = 1}
)
"default:river_water_flowing",
"bucket:bucket_river_water",
"bucket_river_water.png",
- "River Water Bucket",
+ S("River Water Bucket"),
{tool = 1, water_bucket = 1},
true
)
"default:lava_flowing",
"bucket:bucket_lava",
"bucket_lava.png",
- "Lava Bucket",
+ S("Lava Bucket"),
{tool = 1}
)
+-- butrerflies/init.lua
+
+-- Load support for MT game translation.
+local S = minetest.get_translator("butterflies")
+
-- register butterflies
local butter_list = {
- {"white", "White"},
- {"red", "Red"},
- {"violet", "Violet"}
+ {"white", S("White")},
+ {"red", S("Red")},
+ {"violet", S("Violet")}
}
for i in ipairs (butter_list) do
local desc = butter_list[i][2]
minetest.register_node("butterflies:butterfly_"..name, {
- description = desc.." Butterfly",
+ description = S("@1 Butterfly", desc),
drawtype = "plantlike",
tiles = {{
name = "butterflies_butterfly_"..name.."_animated.png",
})
minetest.register_node("butterflies:hidden_butterfly_"..name, {
- description = "Hidden "..desc.." Butterfly",
+ description = S("Hidden @1 Butterfly", desc),
drawtype = "airlike",
inventory_image = "insects_butterfly_"..name..".png",
wield_image = "insects_butterfly_"..name..".png",
+-- carts/cart_entity.lua
+
+-- support for MT game translation.
+local S = carts.get_translator
+
local cart_entity = {
initial_properties = {
physical = false, -- otherwise going uphill breaks
minetest.register_entity("carts:cart", cart_entity)
minetest.register_craftitem("carts:cart", {
- description = "Cart (Sneak+Click to pick up)",
+ description = S("Cart (Sneak+Click to pick up)"),
inventory_image = minetest.inventorycube("carts_cart_top.png", "carts_cart_side.png", "carts_cart_side.png"),
wield_image = "carts_cart_side.png",
on_place = function(itemstack, placer, pointed_thing)
+-- carts/init.lua
+
+-- Load support for MT game translation.
+local S = minetest.get_translator("carts")
carts = {}
carts.modpath = minetest.get_modpath("carts")
carts.railparams = {}
+carts.get_translator = S
-- Maximal speed of the cart in m/s (min = -1)
carts.speed_max = 7
+-- carts/rails.lua
+
+-- support for MT game translation.
+local S = carts.get_translator
+
carts:register_rail("carts:rail", {
- description = "Rail",
+ description = S("Rail"),
tiles = {
"carts_rail_straight.png", "carts_rail_curved.png",
"carts_rail_t_junction.png", "carts_rail_crossing.png"
carts:register_rail("carts:powerrail", {
- description = "Powered Rail",
+ description = S("Powered Rail"),
tiles = {
"carts_rail_straight_pwr.png", "carts_rail_curved_pwr.png",
"carts_rail_t_junction_pwr.png", "carts_rail_crossing_pwr.png"
carts:register_rail("carts:brakerail", {
- description = "Brake Rail",
+ description = S("Brake Rail"),
tiles = {
"carts_rail_straight_brk.png", "carts_rail_curved_brk.png",
"carts_rail_t_junction_brk.png", "carts_rail_crossing_brk.png"
+-- creative/init.lua
+
+-- Load support for MT game translation.
+local S = minetest.get_translator("creative")
+
creative = {}
+creative.get_translator = S
local function update_sfinv(name)
minetest.after(0, function()
end
minetest.register_privilege("creative", {
- description = "Allow player to use creative inventory",
+ description = S("Allow player to use creative inventory"),
give_to_singleplayer = false,
give_to_admin = false,
on_grant = update_sfinv,
+-- creative/inventory.lua
+
+-- support for MT game translation.
+local S = creative.get_translator
+
local player_inventory = {}
local inventory_cache = {}
image_button[7.2,3.25;0.8,0.8;creative_next_icon.png;creative_next;]
image_button[2.1,3.25;0.8,0.8;creative_search_icon.png;creative_search;]
image_button[2.75,3.25;0.8,0.8;creative_clear_icon.png;creative_clear;]
- tooltip[creative_search;Search]
- tooltip[creative_clear;Reset]
- tooltip[creative_prev;Previous page]
- tooltip[creative_next;Next page]
+ tooltip[creative_search;S("Search")]
+ tooltip[creative_clear;S("Reset")]
+ tooltip[creative_prev;S("Previous page")]
+ tooltip[creative_next;S("Next page")]
listring[current_player;main]
field_close_on_enter[creative_filter;false]
]] ..
})
end
-creative.register_tab("all", "All", minetest.registered_items)
-creative.register_tab("nodes", "Nodes", minetest.registered_nodes)
-creative.register_tab("tools", "Tools", minetest.registered_tools)
-creative.register_tab("craftitems", "Items", minetest.registered_craftitems)
+creative.register_tab("all", S("All"), minetest.registered_items)
+creative.register_tab("nodes", S("Nodes"), minetest.registered_nodes)
+creative.register_tab("tools", S("Tools"), minetest.registered_tools)
+creative.register_tab("craftitems", S("Items"), minetest.registered_craftitems)
local old_homepage_name = sfinv.get_homepage_name
function sfinv.get_homepage_name(player)
default.chest = {}
+-- support for MT game translation.
+local S = default.get_translator
+
function default.chest.get_chest_formspec(pos)
local spos = pos.x .. "," .. pos.y .. "," .. pos.z
local formspec =
if def.protected then
def.on_construct = function(pos)
local meta = minetest.get_meta(pos)
- meta:set_string("infotext", "Locked Chest")
+ meta:set_string("infotext", S("Locked Chest"))
meta:set_string("owner", "")
local inv = meta:get_inventory()
inv:set_size("main", 8*4)
def.after_place_node = function(pos, placer)
local meta = minetest.get_meta(pos)
meta:set_string("owner", placer:get_player_name() or "")
- meta:set_string("infotext", "Locked Chest (owned by " ..
- meta:get_string("owner") .. ")")
+ meta:set_string("infotext", S("Locked Chest (owned by @1)", meta:get_string("owner")))
end
def.can_dig = function(pos,player)
local meta = minetest.get_meta(pos);
-- verify placer is owner of lockable chest
if owner ~= pn then
minetest.record_protection_violation(pos, pn)
- minetest.chat_send_player(pn, "You do not own this chest.")
+ minetest.chat_send_player(pn, S("You do not own this chest."))
return nil
end
meta:set_string("key_lock_secret", secret)
end
- return secret, "a locked chest", owner
+ return secret, S("a locked chest"), owner
end
else
def.on_construct = function(pos)
local meta = minetest.get_meta(pos)
- meta:set_string("infotext", "Chest")
+ meta:set_string("infotext", S("Chest"))
local inv = meta:get_inventory()
inv:set_size("main", 8*4)
end
end
default.chest.register_chest("chest", {
- description = "Chest",
+ description = S("Chest"),
tiles = {
"default_chest_top.png",
"default_chest_top.png",
})
default.chest.register_chest("chest_locked", {
- description = "Locked Chest",
+ description = S("Locked Chest"),
tiles = {
"default_chest_top.png",
"default_chest_top.png",
-- mods/default/craftitems.lua
+-- support for MT game translation.
+local S = default.get_translator
+
minetest.register_craftitem("default:stick", {
- description = "Stick",
+ description = S("Stick"),
inventory_image = "default_stick.png",
groups = {stick = 1, flammable = 2},
})
minetest.register_craftitem("default:paper", {
- description = "Paper",
+ description = S("Paper"),
inventory_image = "default_paper.png",
groups = {flammable = 3},
})
if #short_title > short_title_size + 3 then
short_title = short_title:sub(1, short_title_size) .. "..."
end
- data.description = "\""..short_title.."\" by "..data.owner
+ data.description = S("\"@1\" by @2", short_title, data.owner)
data.text = fields.text:sub(1, max_text_size)
data.text = data.text:gsub("\r\n", "\n"):gsub("\r", "\n")
data.page = 1
end)
minetest.register_craftitem("default:book", {
- description = "Book",
+ description = S("Book"),
inventory_image = "default_book.png",
groups = {book = 1, flammable = 3},
on_use = book_on_use,
})
minetest.register_craftitem("default:book_written", {
- description = "Book With Text",
+ description = S("Book With Text"),
inventory_image = "default_book_written.png",
groups = {book = 1, not_in_creative_inventory = 1, flammable = 3},
stack_max = 1,
end)
minetest.register_craftitem("default:skeleton_key", {
- description = "Skeleton Key",
+ description = S("Skeleton Key"),
inventory_image = "default_key_skeleton.png",
groups = {key = 1},
on_use = function(itemstack, user, pointed_thing)
local new_stack = ItemStack("default:key")
local meta = new_stack:get_meta()
meta:set_string("secret", secret)
- meta:set_string("description", "Key to "..user:get_player_name().."'s "
- ..minetest.registered_nodes[node.name].description)
+ meta:set_string("description", S("Key to @1's @2", user:get_player_name(),
+ minetest.registered_nodes[node.name].description))
if itemstack:get_count() == 0 then
itemstack = new_stack
})
minetest.register_craftitem("default:coal_lump", {
- description = "Coal Lump",
+ description = S("Coal Lump"),
inventory_image = "default_coal_lump.png",
groups = {coal = 1, flammable = 1}
})
minetest.register_craftitem("default:iron_lump", {
- description = "Iron Lump",
+ description = S("Iron Lump"),
inventory_image = "default_iron_lump.png"
})
minetest.register_craftitem("default:copper_lump", {
- description = "Copper Lump",
+ description = S("Copper Lump"),
inventory_image = "default_copper_lump.png"
})
minetest.register_craftitem("default:tin_lump", {
- description = "Tin Lump",
+ description = S("Tin Lump"),
inventory_image = "default_tin_lump.png"
})
minetest.register_craftitem("default:mese_crystal", {
- description = "Mese Crystal",
+ description = S("Mese Crystal"),
inventory_image = "default_mese_crystal.png",
})
minetest.register_craftitem("default:gold_lump", {
- description = "Gold Lump",
+ description = S("Gold Lump"),
inventory_image = "default_gold_lump.png"
})
minetest.register_craftitem("default:diamond", {
- description = "Diamond",
+ description = S("Diamond"),
inventory_image = "default_diamond.png",
})
minetest.register_craftitem("default:clay_lump", {
- description = "Clay Lump",
+ description = S("Clay Lump"),
inventory_image = "default_clay_lump.png",
})
minetest.register_craftitem("default:steel_ingot", {
- description = "Steel Ingot",
+ description = S("Steel Ingot"),
inventory_image = "default_steel_ingot.png"
})
minetest.register_craftitem("default:copper_ingot", {
- description = "Copper Ingot",
+ description = S("Copper Ingot"),
inventory_image = "default_copper_ingot.png"
})
minetest.register_craftitem("default:tin_ingot", {
- description = "Tin Ingot",
+ description = S("Tin Ingot"),
inventory_image = "default_tin_ingot.png"
})
minetest.register_craftitem("default:bronze_ingot", {
- description = "Bronze Ingot",
+ description = S("Bronze Ingot"),
inventory_image = "default_bronze_ingot.png"
})
minetest.register_craftitem("default:gold_ingot", {
- description = "Gold Ingot",
+ description = S("Gold Ingot"),
inventory_image = "default_gold_ingot.png"
})
minetest.register_craftitem("default:mese_crystal_fragment", {
- description = "Mese Crystal Fragment",
+ description = S("Mese Crystal Fragment"),
inventory_image = "default_mese_crystal_fragment.png",
})
minetest.register_craftitem("default:clay_brick", {
- description = "Clay Brick",
+ description = S("Clay Brick"),
inventory_image = "default_clay_brick.png",
})
minetest.register_craftitem("default:obsidian_shard", {
- description = "Obsidian Shard",
+ description = S("Obsidian Shard"),
inventory_image = "default_obsidian_shard.png",
})
minetest.register_craftitem("default:flint", {
- description = "Flint",
+ description = S("Flint"),
inventory_image = "default_flint.png"
})
minetest.register_craftitem("default:blueberries", {
- description = "Blueberries",
+ description = S("Blueberries"),
inventory_image = "default_blueberries.png",
groups = {food_blueberries = 1, food_berry = 1},
on_use = minetest.item_eat(2),
+-- default/furnace.lua
+
+-- support for MT game translation.
+local S = default.get_translator
--
-- Formspecs
if listname == "fuel" then
if minetest.get_craft_result({method="fuel", width=1, items={stack}}).time ~= 0 then
if inv:is_empty("src") then
- meta:set_string("infotext", "Furnace is empty")
+ meta:set_string("infotext", S("Furnace is empty"))
end
return stack:get_count()
else
if cookable then
item_percent = math.floor(src_time / cooked.time * 100)
if dst_full then
- item_state = "100% (output full)"
+ item_state = S("100% (output full)")
else
- item_state = item_percent .. "%"
+ item_state = S("@1%", item_percent)
end
else
if srclist[1]:is_empty() then
- item_state = "Empty"
+ item_state = S("Empty")
else
- item_state = "Not cookable"
+ item_state = S("Not cookable")
end
end
- local fuel_state = "Empty"
+ local fuel_state = S("Empty")
local active = "inactive"
local result = false
minetest.get_node_timer(pos):stop()
end
- local infotext = "Furnace " .. active .. "\n(Item: " .. item_state ..
- "; Fuel: " .. fuel_state .. ")"
+-- local infotext = "Furnace " .. active .. "\n(Item: " .. item_state ..
+-- "; Fuel: " .. fuel_state .. ")"
+ local infotext = S("Furnace @1 \n(Item: @2; Fuel: @3)", active, item_state, fuel_state)
--
-- Set meta values
--
minetest.register_node("default:furnace", {
- description = "Furnace",
+ description = S("Furnace"),
tiles = {
"default_furnace_top.png", "default_furnace_bottom.png",
"default_furnace_side.png", "default_furnace_side.png",
})
minetest.register_node("default:furnace_active", {
- description = "Furnace",
+ description = S("Furnace"),
tiles = {
"default_furnace_top.png", "default_furnace_bottom.png",
"default_furnace_side.png", "default_furnace_side.png",
-- The API documentation in here was moved into game_api.txt
+-- Load support for MT game translation.
+local S = minetest.get_translator("default")
+
-- Definitions made by this mod that other mods can use too
default = {}
default.LIGHT_MAX = 14
+default.get_translator = S
-- GUI related stuff
minetest.register_on_joinplayer(function(player)
-- mods/default/nodes.lua
+-- support for MT game translation.
+local S = default.get_translator
--[[ Node name convention:
--
minetest.register_node("default:stone", {
- description = "Stone",
+ description = S("Stone"),
tiles = {"default_stone.png"},
groups = {cracky = 3, stone = 1},
drop = "default:cobble",
})
minetest.register_node("default:cobble", {
- description = "Cobblestone",
+ description = S("Cobblestone"),
tiles = {"default_cobble.png"},
is_ground_content = false,
groups = {cracky = 3, stone = 2},
})
minetest.register_node("default:stonebrick", {
- description = "Stone Brick",
+ description = S("Stone Brick"),
paramtype2 = "facedir",
place_param2 = 0,
tiles = {"default_stone_brick.png"},
})
minetest.register_node("default:stone_block", {
- description = "Stone Block",
+ description = S("Stone Block"),
tiles = {"default_stone_block.png"},
is_ground_content = false,
groups = {cracky = 2, stone = 1},
})
minetest.register_node("default:mossycobble", {
- description = "Mossy Cobblestone",
+ description = S("Mossy Cobblestone"),
tiles = {"default_mossycobble.png"},
is_ground_content = false,
groups = {cracky = 3, stone = 1},
minetest.register_node("default:desert_stone", {
- description = "Desert Stone",
+ description = S("Desert Stone"),
tiles = {"default_desert_stone.png"},
groups = {cracky = 3, stone = 1},
drop = "default:desert_cobble",
})
minetest.register_node("default:desert_cobble", {
- description = "Desert Cobblestone",
+ description = S("Desert Cobblestone"),
tiles = {"default_desert_cobble.png"},
is_ground_content = false,
groups = {cracky = 3, stone = 2},
})
minetest.register_node("default:desert_stonebrick", {
- description = "Desert Stone Brick",
+ description = S("Desert Stone Brick"),
paramtype2 = "facedir",
place_param2 = 0,
tiles = {"default_desert_stone_brick.png"},
})
minetest.register_node("default:desert_stone_block", {
- description = "Desert Stone Block",
+ description = S("Desert Stone Block"),
tiles = {"default_desert_stone_block.png"},
is_ground_content = false,
groups = {cracky = 2, stone = 1},
})
minetest.register_node("default:sandstone", {
- description = "Sandstone",
+ description = S("Sandstone"),
tiles = {"default_sandstone.png"},
groups = {crumbly = 1, cracky = 3},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("default:sandstonebrick", {
- description = "Sandstone Brick",
+ description = S("Sandstone Brick"),
paramtype2 = "facedir",
place_param2 = 0,
tiles = {"default_sandstone_brick.png"},
})
minetest.register_node("default:sandstone_block", {
- description = "Sandstone Block",
+ description = S("Sandstone Block"),
tiles = {"default_sandstone_block.png"},
is_ground_content = false,
groups = {cracky = 2},
})
minetest.register_node("default:desert_sandstone", {
- description = "Desert Sandstone",
+ description = S("Desert Sandstone"),
tiles = {"default_desert_sandstone.png"},
groups = {crumbly = 1, cracky = 3},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("default:desert_sandstone_brick", {
- description = "Desert Sandstone Brick",
+ description = S("Desert Sandstone Brick"),
paramtype2 = "facedir",
place_param2 = 0,
tiles = {"default_desert_sandstone_brick.png"},
})
minetest.register_node("default:desert_sandstone_block", {
- description = "Desert Sandstone Block",
+ description = S("Desert Sandstone Block"),
tiles = {"default_desert_sandstone_block.png"},
is_ground_content = false,
groups = {cracky = 2},
})
minetest.register_node("default:silver_sandstone", {
- description = "Silver Sandstone",
+ description = S("Silver Sandstone"),
tiles = {"default_silver_sandstone.png"},
groups = {crumbly = 1, cracky = 3},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("default:silver_sandstone_brick", {
- description = "Silver Sandstone Brick",
+ description = S("Silver Sandstone Brick"),
paramtype2 = "facedir",
place_param2 = 0,
tiles = {"default_silver_sandstone_brick.png"},
})
minetest.register_node("default:silver_sandstone_block", {
- description = "Silver Sandstone Block",
+ description = S("Silver Sandstone Block"),
tiles = {"default_silver_sandstone_block.png"},
is_ground_content = false,
groups = {cracky = 2},
})
minetest.register_node("default:obsidian", {
- description = "Obsidian",
+ description = S("Obsidian"),
tiles = {"default_obsidian.png"},
sounds = default.node_sound_stone_defaults(),
groups = {cracky = 1, level = 2},
})
minetest.register_node("default:obsidianbrick", {
- description = "Obsidian Brick",
+ description = S("Obsidian Brick"),
paramtype2 = "facedir",
place_param2 = 0,
tiles = {"default_obsidian_brick.png"},
})
minetest.register_node("default:obsidian_block", {
- description = "Obsidian Block",
+ description = S("Obsidian Block"),
tiles = {"default_obsidian_block.png"},
is_ground_content = false,
sounds = default.node_sound_stone_defaults(),
--
minetest.register_node("default:dirt", {
- description = "Dirt",
+ description = S("Dirt"),
tiles = {"default_dirt.png"},
groups = {crumbly = 3, soil = 1},
sounds = default.node_sound_dirt_defaults(),
})
minetest.register_node("default:dirt_with_grass", {
- description = "Dirt with Grass",
+ description = S("Dirt with Grass"),
tiles = {"default_grass.png", "default_dirt.png",
{name = "default_dirt.png^default_grass_side.png",
tileable_vertical = false}},
})
minetest.register_node("default:dirt_with_grass_footsteps", {
- description = "Dirt with Grass and Footsteps",
+ description = S("Dirt with Grass and Footsteps"),
tiles = {"default_grass.png^default_footprint.png", "default_dirt.png",
{name = "default_dirt.png^default_grass_side.png",
tileable_vertical = false}},
})
minetest.register_node("default:dirt_with_dry_grass", {
- description = "Dirt with Dry Grass",
+ description = S("Dirt with Dry Grass"),
tiles = {"default_dry_grass.png",
"default_dirt.png",
{name = "default_dirt.png^default_dry_grass_side.png",
})
minetest.register_node("default:dirt_with_snow", {
- description = "Dirt with Snow",
+ description = S("Dirt with Snow"),
tiles = {"default_snow.png", "default_dirt.png",
{name = "default_dirt.png^default_snow_side.png",
tileable_vertical = false}},
})
minetest.register_node("default:dirt_with_rainforest_litter", {
- description = "Dirt with Rainforest Litter",
+ description = S("Dirt with Rainforest Litter"),
tiles = {
"default_rainforest_litter.png",
"default_dirt.png",
})
minetest.register_node("default:dirt_with_coniferous_litter", {
- description = "Dirt with Coniferous Litter",
+ description = S("Dirt with Coniferous Litter"),
tiles = {
"default_coniferous_litter.png",
"default_dirt.png",
})
minetest.register_node("default:permafrost", {
- description = "Permafrost",
+ description = S("Permafrost"),
tiles = {"default_permafrost.png"},
groups = {cracky = 3},
sounds = default.node_sound_dirt_defaults(),
})
minetest.register_node("default:permafrost_with_stones", {
- description = "Permafrost with Stones",
+ description = S("Permafrost with Stones"),
tiles = {"default_permafrost.png^default_stones.png",
"default_permafrost.png",
"default_permafrost.png^default_stones_side.png"},
})
minetest.register_node("default:permafrost_with_moss", {
- description = "Permafrost with Moss",
+ description = S("Permafrost with Moss"),
tiles = {"default_moss.png", "default_permafrost.png",
{name = "default_permafrost.png^default_moss_side.png",
tileable_vertical = false}},
})
minetest.register_node("default:sand", {
- description = "Sand",
+ description = S("Sand"),
tiles = {"default_sand.png"},
groups = {crumbly = 3, falling_node = 1, sand = 1},
sounds = default.node_sound_sand_defaults(),
})
minetest.register_node("default:desert_sand", {
- description = "Desert Sand",
+ description = S("Desert Sand"),
tiles = {"default_desert_sand.png"},
groups = {crumbly = 3, falling_node = 1, sand = 1},
sounds = default.node_sound_sand_defaults(),
})
minetest.register_node("default:silver_sand", {
- description = "Silver Sand",
+ description = S("Silver Sand"),
tiles = {"default_silver_sand.png"},
groups = {crumbly = 3, falling_node = 1, sand = 1},
sounds = default.node_sound_sand_defaults(),
minetest.register_node("default:gravel", {
- description = "Gravel",
+ description = S("Gravel"),
tiles = {"default_gravel.png"},
groups = {crumbly = 2, falling_node = 1},
sounds = default.node_sound_gravel_defaults(),
})
minetest.register_node("default:clay", {
- description = "Clay",
+ description = S("Clay"),
tiles = {"default_clay.png"},
groups = {crumbly = 3},
drop = "default:clay_lump 4",
minetest.register_node("default:snow", {
- description = "Snow",
+ description = S("Snow"),
tiles = {"default_snow.png"},
inventory_image = "default_snowball.png",
wield_image = "default_snowball.png",
})
minetest.register_node("default:snowblock", {
- description = "Snow Block",
+ description = S("Snow Block"),
tiles = {"default_snow.png"},
groups = {crumbly = 3, cools_lava = 1, snowy = 1},
sounds = default.node_sound_snow_defaults(),
-- 'is ground content = false' to avoid tunnels in sea ice or ice rivers
minetest.register_node("default:ice", {
- description = "Ice",
+ description = S("Ice"),
tiles = {"default_ice.png"},
is_ground_content = false,
paramtype = "light",
-- Mapgen-placed ice with 'is ground content = true' to contain tunnels
minetest.register_node("default:cave_ice", {
- description = "Cave Ice",
+ description = S("Cave Ice"),
tiles = {"default_ice.png"},
paramtype = "light",
groups = {cracky = 3, cools_lava = 1, slippery = 3,
--
minetest.register_node("default:tree", {
- description = "Apple Tree",
+ description = S("Apple Tree"),
tiles = {"default_tree_top.png", "default_tree_top.png", "default_tree.png"},
paramtype2 = "facedir",
is_ground_content = false,
})
minetest.register_node("default:wood", {
- description = "Apple Wood Planks",
+ description = S("Apple Wood Planks"),
paramtype2 = "facedir",
place_param2 = 0,
tiles = {"default_wood.png"},
})
minetest.register_node("default:sapling", {
- description = "Apple Tree Sapling",
+ description = S("Apple Tree Sapling"),
drawtype = "plantlike",
tiles = {"default_sapling.png"},
inventory_image = "default_sapling.png",
})
minetest.register_node("default:leaves", {
- description = "Apple Tree Leaves",
+ description = S("Apple Tree Leaves"),
drawtype = "allfaces_optional",
waving = 1,
tiles = {"default_leaves.png"},
})
minetest.register_node("default:apple", {
- description = "Apple",
+ description = S("Apple"),
drawtype = "plantlike",
tiles = {"default_apple.png"},
inventory_image = "default_apple.png",
})
minetest.register_node("default:apple_mark", {
- description = "Apple Marker",
+ description = S("Apple Marker"),
drawtype = "airlike",
paramtype = "light",
sunlight_propagates = true,
minetest.register_node("default:jungletree", {
- description = "Jungle Tree",
+ description = S("Jungle Tree"),
tiles = {"default_jungletree_top.png", "default_jungletree_top.png",
"default_jungletree.png"},
paramtype2 = "facedir",
})
minetest.register_node("default:junglewood", {
- description = "Jungle Wood Planks",
+ description = S("Jungle Wood Planks"),
paramtype2 = "facedir",
place_param2 = 0,
tiles = {"default_junglewood.png"},
})
minetest.register_node("default:jungleleaves", {
- description = "Jungle Tree Leaves",
+ description = S("Jungle Tree Leaves"),
drawtype = "allfaces_optional",
waving = 1,
tiles = {"default_jungleleaves.png"},
})
minetest.register_node("default:junglesapling", {
- description = "Jungle Tree Sapling",
+ description = S("Jungle Tree Sapling"),
drawtype = "plantlike",
tiles = {"default_junglesapling.png"},
inventory_image = "default_junglesapling.png",
})
minetest.register_node("default:emergent_jungle_sapling", {
- description = "Emergent Jungle Tree Sapling",
+ description = S("Emergent Jungle Tree Sapling"),
drawtype = "plantlike",
tiles = {"default_emergent_jungle_sapling.png"},
inventory_image = "default_emergent_jungle_sapling.png",
minetest.register_node("default:pine_tree", {
- description = "Pine Tree",
+ description = S("Pine Tree"),
tiles = {"default_pine_tree_top.png", "default_pine_tree_top.png",
"default_pine_tree.png"},
paramtype2 = "facedir",
})
minetest.register_node("default:pine_wood", {
- description = "Pine Wood Planks",
+ description = S("Pine Wood Planks"),
paramtype2 = "facedir",
place_param2 = 0,
tiles = {"default_pine_wood.png"},
})
minetest.register_node("default:pine_needles",{
- description = "Pine Needles",
+ description = S("Pine Needles"),
drawtype = "allfaces_optional",
tiles = {"default_pine_needles.png"},
waving = 1,
})
minetest.register_node("default:pine_sapling", {
- description = "Pine Tree Sapling",
+ description = S("Pine Tree Sapling"),
drawtype = "plantlike",
tiles = {"default_pine_sapling.png"},
inventory_image = "default_pine_sapling.png",
minetest.register_node("default:acacia_tree", {
- description = "Acacia Tree",
+ description = S("Acacia Tree"),
tiles = {"default_acacia_tree_top.png", "default_acacia_tree_top.png",
"default_acacia_tree.png"},
paramtype2 = "facedir",
})
minetest.register_node("default:acacia_wood", {
- description = "Acacia Wood Planks",
+ description = S("Acacia Wood Planks"),
paramtype2 = "facedir",
place_param2 = 0,
tiles = {"default_acacia_wood.png"},
})
minetest.register_node("default:acacia_leaves", {
- description = "Acacia Tree Leaves",
+ description = S("Acacia Tree Leaves"),
drawtype = "allfaces_optional",
tiles = {"default_acacia_leaves.png"},
special_tiles = {"default_acacia_leaves_simple.png"},
})
minetest.register_node("default:acacia_sapling", {
- description = "Acacia Tree Sapling",
+ description = S("Acacia Tree Sapling"),
drawtype = "plantlike",
tiles = {"default_acacia_sapling.png"},
inventory_image = "default_acacia_sapling.png",
})
minetest.register_node("default:aspen_tree", {
- description = "Aspen Tree",
+ description = S("Aspen Tree"),
tiles = {"default_aspen_tree_top.png", "default_aspen_tree_top.png",
"default_aspen_tree.png"},
paramtype2 = "facedir",
})
minetest.register_node("default:aspen_wood", {
- description = "Aspen Wood Planks",
+ description = S("Aspen Wood Planks"),
paramtype2 = "facedir",
place_param2 = 0,
tiles = {"default_aspen_wood.png"},
})
minetest.register_node("default:aspen_leaves", {
- description = "Aspen Tree Leaves",
+ description = S("Aspen Tree Leaves"),
drawtype = "allfaces_optional",
tiles = {"default_aspen_leaves.png"},
waving = 1,
})
minetest.register_node("default:aspen_sapling", {
- description = "Aspen Tree Sapling",
+ description = S("Aspen Tree Sapling"),
drawtype = "plantlike",
tiles = {"default_aspen_sapling.png"},
inventory_image = "default_aspen_sapling.png",
--
minetest.register_node("default:stone_with_coal", {
- description = "Coal Ore",
+ description = S("Coal Ore"),
tiles = {"default_stone.png^default_mineral_coal.png"},
groups = {cracky = 3},
drop = "default:coal_lump",
})
minetest.register_node("default:coalblock", {
- description = "Coal Block",
+ description = S("Coal Block"),
tiles = {"default_coal_block.png"},
is_ground_content = false,
groups = {cracky = 3},
minetest.register_node("default:stone_with_iron", {
- description = "Iron Ore",
+ description = S("Iron Ore"),
tiles = {"default_stone.png^default_mineral_iron.png"},
groups = {cracky = 2},
drop = "default:iron_lump",
})
minetest.register_node("default:steelblock", {
- description = "Steel Block",
+ description = S("Steel Block"),
tiles = {"default_steel_block.png"},
is_ground_content = false,
groups = {cracky = 1, level = 2},
minetest.register_node("default:stone_with_copper", {
- description = "Copper Ore",
+ description = S("Copper Ore"),
tiles = {"default_stone.png^default_mineral_copper.png"},
groups = {cracky = 2},
drop = "default:copper_lump",
})
minetest.register_node("default:copperblock", {
- description = "Copper Block",
+ description = S("Copper Block"),
tiles = {"default_copper_block.png"},
is_ground_content = false,
groups = {cracky = 1, level = 2},
minetest.register_node("default:stone_with_tin", {
- description = "Tin Ore",
+ description = S("Tin Ore"),
tiles = {"default_stone.png^default_mineral_tin.png"},
groups = {cracky = 2},
drop = "default:tin_lump",
})
minetest.register_node("default:tinblock", {
- description = "Tin Block",
+ description = S("Tin Block"),
tiles = {"default_tin_block.png"},
is_ground_content = false,
groups = {cracky = 1, level = 2},
minetest.register_node("default:bronzeblock", {
- description = "Bronze Block",
+ description = S("Bronze Block"),
tiles = {"default_bronze_block.png"},
is_ground_content = false,
groups = {cracky = 1, level = 2},
minetest.register_node("default:stone_with_mese", {
- description = "Mese Ore",
+ description = S("Mese Ore"),
tiles = {"default_stone.png^default_mineral_mese.png"},
groups = {cracky = 1},
drop = "default:mese_crystal",
})
minetest.register_node("default:mese", {
- description = "Mese Block",
+ description = S("Mese Block"),
tiles = {"default_mese_block.png"},
paramtype = "light",
groups = {cracky = 1, level = 2},
minetest.register_node("default:stone_with_gold", {
- description = "Gold Ore",
+ description = S("Gold Ore"),
tiles = {"default_stone.png^default_mineral_gold.png"},
groups = {cracky = 2},
drop = "default:gold_lump",
})
minetest.register_node("default:goldblock", {
- description = "Gold Block",
+ description = S("Gold Block"),
tiles = {"default_gold_block.png"},
is_ground_content = false,
groups = {cracky = 1},
minetest.register_node("default:stone_with_diamond", {
- description = "Diamond Ore",
+ description = S("Diamond Ore"),
tiles = {"default_stone.png^default_mineral_diamond.png"},
groups = {cracky = 1},
drop = "default:diamond",
})
minetest.register_node("default:diamondblock", {
- description = "Diamond Block",
+ description = S("Diamond Block"),
tiles = {"default_diamond_block.png"},
is_ground_content = false,
groups = {cracky = 1, level = 3},
--
minetest.register_node("default:cactus", {
- description = "Cactus",
+ description = S("Cactus"),
tiles = {"default_cactus_top.png", "default_cactus_top.png",
"default_cactus_side.png"},
paramtype2 = "facedir",
})
minetest.register_node("default:large_cactus_seedling", {
- description = "Large Cactus Seedling",
+ description = S("Large Cactus Seedling"),
drawtype = "plantlike",
tiles = {"default_large_cactus_seedling.png"},
inventory_image = "default_large_cactus_seedling.png",
})
minetest.register_node("default:papyrus", {
- description = "Papyrus",
+ description = S("Papyrus"),
drawtype = "plantlike",
tiles = {"default_papyrus.png"},
inventory_image = "default_papyrus.png",
})
minetest.register_node("default:dry_shrub", {
- description = "Dry Shrub",
+ description = S("Dry Shrub"),
drawtype = "plantlike",
waving = 1,
tiles = {"default_dry_shrub.png"},
})
minetest.register_node("default:junglegrass", {
- description = "Jungle Grass",
+ description = S("Jungle Grass"),
drawtype = "plantlike",
waving = 1,
visual_scale = 1.69,
minetest.register_node("default:grass_1", {
- description = "Grass",
+ description = S("Grass"),
drawtype = "plantlike",
waving = 1,
tiles = {"default_grass_1.png"},
for i = 2, 5 do
minetest.register_node("default:grass_" .. i, {
- description = "Grass",
+ description = S("Grass"),
drawtype = "plantlike",
waving = 1,
tiles = {"default_grass_" .. i .. ".png"},
minetest.register_node("default:dry_grass_1", {
- description = "Dry Grass",
+ description = S("Dry Grass"),
drawtype = "plantlike",
waving = 1,
tiles = {"default_dry_grass_1.png"},
for i = 2, 5 do
minetest.register_node("default:dry_grass_" .. i, {
- description = "Dry Grass",
+ description = S("Dry Grass"),
drawtype = "plantlike",
waving = 1,
tiles = {"default_dry_grass_" .. i .. ".png"},
minetest.register_node("default:fern_1", {
- description = "Fern",
+ description = S("Fern"),
drawtype = "plantlike",
waving = 1,
tiles = {"default_fern_1.png"},
for i = 2, 3 do
minetest.register_node("default:fern_" .. i, {
- description = "Fern",
+ description = S("Fern"),
drawtype = "plantlike",
waving = 1,
visual_scale = 2,
minetest.register_node("default:marram_grass_1", {
- description = "Marram Grass",
+ description = S("Marram Grass"),
drawtype = "plantlike",
waving = 1,
tiles = {"default_marram_grass_1.png"},
for i = 2, 3 do
minetest.register_node("default:marram_grass_" .. i, {
- description = "Marram Grass",
+ description = S("Marram Grass"),
drawtype = "plantlike",
waving = 1,
tiles = {"default_marram_grass_" .. i .. ".png"},
minetest.register_node("default:bush_stem", {
- description = "Bush Stem",
+ description = S("Bush Stem"),
drawtype = "plantlike",
visual_scale = 1.41,
tiles = {"default_bush_stem.png"},
})
minetest.register_node("default:bush_leaves", {
- description = "Bush Leaves",
+ description = S("Bush Leaves"),
drawtype = "allfaces_optional",
waving = 1,
tiles = {"default_leaves_simple.png"},
})
minetest.register_node("default:bush_sapling", {
- description = "Bush Sapling",
+ description = S("Bush Sapling"),
drawtype = "plantlike",
tiles = {"default_bush_sapling.png"},
inventory_image = "default_bush_sapling.png",
})
minetest.register_node("default:blueberry_bush_leaves_with_berries", {
- description = "Blueberry Bush Leaves with Berries",
+ description = S("Blueberry Bush Leaves with Berries"),
drawtype = "allfaces_optional",
waving = 1,
tiles = {"default_blueberry_bush_leaves.png^default_blueberry_overlay.png"},
})
minetest.register_node("default:blueberry_bush_leaves", {
- description = "Blueberry Bush Leaves",
+ description = S("Blueberry Bush Leaves"),
drawtype = "allfaces_optional",
waving = 1,
tiles = {"default_blueberry_bush_leaves.png"},
})
minetest.register_node("default:blueberry_bush_sapling", {
- description = "Blueberry Bush Sapling",
+ description = S("Blueberry Bush Sapling"),
drawtype = "plantlike",
tiles = {"default_blueberry_bush_sapling.png"},
inventory_image = "default_blueberry_bush_sapling.png",
})
minetest.register_node("default:acacia_bush_stem", {
- description = "Acacia Bush Stem",
+ description = S("Acacia Bush Stem"),
drawtype = "plantlike",
visual_scale = 1.41,
tiles = {"default_acacia_bush_stem.png"},
})
minetest.register_node("default:acacia_bush_leaves", {
- description = "Acacia Bush Leaves",
+ description = S("Acacia Bush Leaves"),
drawtype = "allfaces_optional",
waving = 1,
tiles = {"default_acacia_leaves_simple.png"},
})
minetest.register_node("default:acacia_bush_sapling", {
- description = "Acacia Bush Sapling",
+ description = S("Acacia Bush Sapling"),
drawtype = "plantlike",
tiles = {"default_acacia_bush_sapling.png"},
inventory_image = "default_acacia_bush_sapling.png",
})
minetest.register_node("default:pine_bush_stem", {
- description = "Pine Bush Stem",
+ description = S("Pine Bush Stem"),
drawtype = "plantlike",
visual_scale = 1.41,
tiles = {"default_pine_bush_stem.png"},
})
minetest.register_node("default:pine_bush_needles", {
- description = "Pine Bush Needles",
+ description = S("Pine Bush Needles"),
drawtype = "allfaces_optional",
waving = 1,
tiles = {"default_pine_needles.png"},
})
minetest.register_node("default:pine_bush_sapling", {
- description = "Pine Bush Sapling",
+ description = S("Pine Bush Sapling"),
drawtype = "plantlike",
tiles = {"default_pine_bush_sapling.png"},
inventory_image = "default_pine_bush_sapling.png",
})
minetest.register_node("default:sand_with_kelp", {
- description = "Kelp",
+ description = S("Kelp"),
drawtype = "plantlike_rooted",
waving = 1,
tiles = {"default_sand.png"},
end
minetest.register_node("default:coral_green", {
- description = "Green Coral",
+ description = S("Green Coral"),
drawtype = "plantlike_rooted",
waving = 1,
paramtype = "light",
})
minetest.register_node("default:coral_pink", {
- description = "Pink Coral",
+ description = S("Pink Coral"),
drawtype = "plantlike_rooted",
waving = 1,
paramtype = "light",
})
minetest.register_node("default:coral_cyan", {
- description = "Cyan Coral",
+ description = S("Cyan Coral"),
drawtype = "plantlike_rooted",
waving = 1,
paramtype = "light",
})
minetest.register_node("default:coral_brown", {
- description = "Brown Coral",
+ description = S("Brown Coral"),
tiles = {"default_coral_brown.png"},
groups = {cracky = 3},
drop = "default:coral_skeleton",
})
minetest.register_node("default:coral_orange", {
- description = "Orange Coral",
+ description = S("Orange Coral"),
tiles = {"default_coral_orange.png"},
groups = {cracky = 3},
drop = "default:coral_skeleton",
})
minetest.register_node("default:coral_skeleton", {
- description = "Coral Skeleton",
+ description = S("Coral Skeleton"),
tiles = {"default_coral_skeleton.png"},
groups = {cracky = 3},
sounds = default.node_sound_stone_defaults(),
--
minetest.register_node("default:water_source", {
- description = "Water Source",
+ description = S("Water Source"),
drawtype = "liquid",
- waving = 3,
tiles = {
{
name = "default_water_source_animated.png",
})
minetest.register_node("default:water_flowing", {
- description = "Flowing Water",
+ description = S("Flowing Water"),
drawtype = "flowingliquid",
- waving = 3,
tiles = {"default_water.png"},
special_tiles = {
{
minetest.register_node("default:river_water_source", {
- description = "River Water Source",
+ description = S("River Water Source"),
drawtype = "liquid",
tiles = {
{
})
minetest.register_node("default:river_water_flowing", {
- description = "Flowing River Water",
+ description = S("Flowing River Water"),
drawtype = "flowingliquid",
tiles = {"default_river_water.png"},
special_tiles = {
minetest.register_node("default:lava_source", {
- description = "Lava Source",
+ description = S("Lava Source"),
drawtype = "liquid",
tiles = {
{
})
minetest.register_node("default:lava_flowing", {
- description = "Flowing Lava",
+ description = S("Flowing Lava"),
drawtype = "flowingliquid",
tiles = {"default_lava.png"},
special_tiles = {
end
meta:set_string("formspec", formspec)
if n_written + n_empty == 0 then
- meta:set_string("infotext", "Empty Bookshelf")
+ meta:set_string("infotext", S("Empty Bookshelf"))
else
- meta:set_string("infotext", "Bookshelf (" .. n_written ..
- " written, " .. n_empty .. " empty books)")
+ meta:set_string("infotext", S("Bookshelf (@1 written, @2 empty books)", n_written, n_empty))
end
end
minetest.register_node("default:bookshelf", {
- description = "Bookshelf",
+ description = S("Bookshelf"),
tiles = {"default_wood.png", "default_wood.png", "default_wood.png",
"default_wood.png", "default_bookshelf.png", "default_bookshelf.png"},
paramtype2 = "facedir",
local function register_sign(material, desc, def)
minetest.register_node("default:sign_wall_" .. material, {
- description = desc .. " Sign",
+ description = S("@1 Sign", desc),
drawtype = "nodebox",
tiles = {"default_sign_wall_" .. material .. ".png"},
inventory_image = "default_sign_" .. material .. ".png",
return
end
if string.len(text) > 512 then
- minetest.chat_send_player(player_name, "Text too long")
+ minetest.chat_send_player(player_name, S("Text too long"))
return
end
minetest.log("action", (player_name or "") .. " wrote \"" ..
})
end
-register_sign("wood", "Wooden", {
+register_sign("wood", S("Wooden"), {
sounds = default.node_sound_wood_defaults(),
groups = {choppy = 2, attached_node = 1, flammable = 2, oddly_breakable_by_hand = 3}
})
-register_sign("steel", "Steel", {
+register_sign("steel", S("Steel"), {
sounds = default.node_sound_metal_defaults(),
groups = {cracky = 2, attached_node = 1}
})
minetest.register_node("default:ladder_wood", {
- description = "Wooden Ladder",
+ description = S("Wooden Ladder"),
drawtype = "signlike",
tiles = {"default_ladder_wood.png"},
inventory_image = "default_ladder_wood.png",
})
minetest.register_node("default:ladder_steel", {
- description = "Steel Ladder",
+ description = S("Steel Ladder"),
drawtype = "signlike",
tiles = {"default_ladder_steel.png"},
inventory_image = "default_ladder_steel.png",
})
default.register_fence("default:fence_wood", {
- description = "Apple Wood Fence",
+ description = S("Apple Wood Fence"),
texture = "default_fence_wood.png",
inventory_image = "default_fence_overlay.png^default_wood.png^" ..
"default_fence_overlay.png^[makealpha:255,126,126",
})
default.register_fence("default:fence_acacia_wood", {
- description = "Acacia Wood Fence",
+ description = S("Acacia Wood Fence"),
texture = "default_fence_acacia_wood.png",
inventory_image = "default_fence_overlay.png^default_acacia_wood.png^" ..
"default_fence_overlay.png^[makealpha:255,126,126",
})
default.register_fence("default:fence_junglewood", {
- description = "Jungle Wood Fence",
+ description = S("Jungle Wood Fence"),
texture = "default_fence_junglewood.png",
inventory_image = "default_fence_overlay.png^default_junglewood.png^" ..
"default_fence_overlay.png^[makealpha:255,126,126",
})
default.register_fence("default:fence_pine_wood", {
- description = "Pine Wood Fence",
+ description = S("Pine Wood Fence"),
texture = "default_fence_pine_wood.png",
inventory_image = "default_fence_overlay.png^default_pine_wood.png^" ..
"default_fence_overlay.png^[makealpha:255,126,126",
})
default.register_fence("default:fence_aspen_wood", {
- description = "Aspen Wood Fence",
+ description = S("Aspen Wood Fence"),
texture = "default_fence_aspen_wood.png",
inventory_image = "default_fence_overlay.png^default_aspen_wood.png^" ..
"default_fence_overlay.png^[makealpha:255,126,126",
})
default.register_fence_rail("default:fence_rail_wood", {
- description = "Apple Wood Fence Rail",
+ description = S("Apple Wood Fence Rail"),
texture = "default_fence_rail_wood.png",
inventory_image = "default_fence_rail_overlay.png^default_wood.png^" ..
"default_fence_rail_overlay.png^[makealpha:255,126,126",
})
default.register_fence_rail("default:fence_rail_acacia_wood", {
- description = "Acacia Wood Fence Rail",
+ description = S("Acacia Wood Fence Rail"),
texture = "default_fence_rail_acacia_wood.png",
inventory_image = "default_fence_rail_overlay.png^default_acacia_wood.png^" ..
"default_fence_rail_overlay.png^[makealpha:255,126,126",
})
default.register_fence_rail("default:fence_rail_junglewood", {
- description = "Jungle Wood Fence Rail",
+ description = S("Jungle Wood Fence Rail"),
texture = "default_fence_rail_junglewood.png",
inventory_image = "default_fence_rail_overlay.png^default_junglewood.png^" ..
"default_fence_rail_overlay.png^[makealpha:255,126,126",
})
default.register_fence_rail("default:fence_rail_pine_wood", {
- description = "Pine Wood Fence Rail",
+ description = S("Pine Wood Fence Rail"),
texture = "default_fence_rail_pine_wood.png",
inventory_image = "default_fence_rail_overlay.png^default_pine_wood.png^" ..
"default_fence_rail_overlay.png^[makealpha:255,126,126",
})
default.register_fence_rail("default:fence_rail_aspen_wood", {
- description = "Aspen Wood Fence Rail",
+ description = S("Aspen Wood Fence Rail"),
texture = "default_fence_rail_aspen_wood.png",
inventory_image = "default_fence_rail_overlay.png^default_aspen_wood.png^" ..
"default_fence_rail_overlay.png^[makealpha:255,126,126",
})
minetest.register_node("default:glass", {
- description = "Glass",
+ description = S("Glass"),
drawtype = "glasslike_framed_optional",
tiles = {"default_glass.png", "default_glass_detail.png"},
paramtype = "light",
})
minetest.register_node("default:obsidian_glass", {
- description = "Obsidian Glass",
+ description = S("Obsidian Glass"),
drawtype = "glasslike_framed_optional",
tiles = {"default_obsidian_glass.png", "default_obsidian_glass_detail.png"},
paramtype = "light",
minetest.register_node("default:brick", {
- description = "Brick Block",
+ description = S("Brick Block"),
paramtype2 = "facedir",
place_param2 = 0,
tiles = {"default_brick.png"},
minetest.register_node("default:meselamp", {
- description = "Mese Lamp",
+ description = S("Mese Lamp"),
drawtype = "glasslike",
tiles = {"default_meselamp.png"},
paramtype = "light",
})
minetest.register_node("default:mese_post_light", {
- description = "Mese Post Light",
+ description = S("Mese Post Light"),
tiles = {"default_mese_post_light_top.png", "default_mese_post_light_top.png",
"default_mese_post_light_side_dark.png", "default_mese_post_light_side_dark.png",
"default_mese_post_light_side.png", "default_mese_post_light_side.png"},
--
minetest.register_node("default:cloud", {
- description = "Cloud",
+ description = S("Cloud"),
tiles = {"default_cloud.png"},
is_ground_content = false,
sounds = default.node_sound_defaults(),
-- mods/default/tools.lua
+-- support for MT game translation.
+local S = default.get_translator
+
-- The hand
minetest.register_item(":", {
type = "none",
--
minetest.register_tool("default:pick_wood", {
- description = "Wooden Pickaxe",
+ description = S("Wooden Pickaxe"),
inventory_image = "default_tool_woodpick.png",
tool_capabilities = {
full_punch_interval = 1.2,
})
minetest.register_tool("default:pick_stone", {
- description = "Stone Pickaxe",
+ description = S("Stone Pickaxe"),
inventory_image = "default_tool_stonepick.png",
tool_capabilities = {
full_punch_interval = 1.3,
})
minetest.register_tool("default:pick_bronze", {
- description = "Bronze Pickaxe",
+ description = S("Bronze Pickaxe"),
inventory_image = "default_tool_bronzepick.png",
tool_capabilities = {
full_punch_interval = 1.0,
})
minetest.register_tool("default:pick_steel", {
- description = "Steel Pickaxe",
+ description = S("Steel Pickaxe"),
inventory_image = "default_tool_steelpick.png",
tool_capabilities = {
full_punch_interval = 1.0,
})
minetest.register_tool("default:pick_mese", {
- description = "Mese Pickaxe",
+ description = S("Mese Pickaxe"),
inventory_image = "default_tool_mesepick.png",
tool_capabilities = {
full_punch_interval = 0.9,
})
minetest.register_tool("default:pick_diamond", {
- description = "Diamond Pickaxe",
+ description = S("Diamond Pickaxe"),
inventory_image = "default_tool_diamondpick.png",
tool_capabilities = {
full_punch_interval = 0.9,
--
minetest.register_tool("default:shovel_wood", {
- description = "Wooden Shovel",
+ description = S("Wooden Shovel"),
inventory_image = "default_tool_woodshovel.png",
wield_image = "default_tool_woodshovel.png^[transformR90",
tool_capabilities = {
})
minetest.register_tool("default:shovel_stone", {
- description = "Stone Shovel",
+ description = S("Stone Shovel"),
inventory_image = "default_tool_stoneshovel.png",
wield_image = "default_tool_stoneshovel.png^[transformR90",
tool_capabilities = {
})
minetest.register_tool("default:shovel_bronze", {
- description = "Bronze Shovel",
+ description = S("Bronze Shovel"),
inventory_image = "default_tool_bronzeshovel.png",
wield_image = "default_tool_bronzeshovel.png^[transformR90",
tool_capabilities = {
})
minetest.register_tool("default:shovel_steel", {
- description = "Steel Shovel",
+ description = S("Steel Shovel"),
inventory_image = "default_tool_steelshovel.png",
wield_image = "default_tool_steelshovel.png^[transformR90",
tool_capabilities = {
})
minetest.register_tool("default:shovel_mese", {
- description = "Mese Shovel",
+ description = S("Mese Shovel"),
inventory_image = "default_tool_meseshovel.png",
wield_image = "default_tool_meseshovel.png^[transformR90",
tool_capabilities = {
})
minetest.register_tool("default:shovel_diamond", {
- description = "Diamond Shovel",
+ description = S("Diamond Shovel"),
inventory_image = "default_tool_diamondshovel.png",
wield_image = "default_tool_diamondshovel.png^[transformR90",
tool_capabilities = {
--
minetest.register_tool("default:axe_wood", {
- description = "Wooden Axe",
+ description = S("Wooden Axe"),
inventory_image = "default_tool_woodaxe.png",
tool_capabilities = {
full_punch_interval = 1.0,
})
minetest.register_tool("default:axe_stone", {
- description = "Stone Axe",
+ description = S("Stone Axe"),
inventory_image = "default_tool_stoneaxe.png",
tool_capabilities = {
full_punch_interval = 1.2,
})
minetest.register_tool("default:axe_bronze", {
- description = "Bronze Axe",
+ description = S("Bronze Axe"),
inventory_image = "default_tool_bronzeaxe.png",
tool_capabilities = {
full_punch_interval = 1.0,
})
minetest.register_tool("default:axe_steel", {
- description = "Steel Axe",
+ description = S("Steel Axe"),
inventory_image = "default_tool_steelaxe.png",
tool_capabilities = {
full_punch_interval = 1.0,
})
minetest.register_tool("default:axe_mese", {
- description = "Mese Axe",
+ description = S("Mese Axe"),
inventory_image = "default_tool_meseaxe.png",
tool_capabilities = {
full_punch_interval = 0.9,
})
minetest.register_tool("default:axe_diamond", {
- description = "Diamond Axe",
+ description = S("Diamond Axe"),
inventory_image = "default_tool_diamondaxe.png",
tool_capabilities = {
full_punch_interval = 0.9,
--
minetest.register_tool("default:sword_wood", {
- description = "Wooden Sword",
+ description = S("Wooden Sword"),
inventory_image = "default_tool_woodsword.png",
tool_capabilities = {
full_punch_interval = 1,
})
minetest.register_tool("default:sword_stone", {
- description = "Stone Sword",
+ description = S("Stone Sword"),
inventory_image = "default_tool_stonesword.png",
tool_capabilities = {
full_punch_interval = 1.2,
})
minetest.register_tool("default:sword_bronze", {
- description = "Bronze Sword",
+ description = S("Bronze Sword"),
inventory_image = "default_tool_bronzesword.png",
tool_capabilities = {
full_punch_interval = 0.8,
})
minetest.register_tool("default:sword_steel", {
- description = "Steel Sword",
+ description = S("Steel Sword"),
inventory_image = "default_tool_steelsword.png",
tool_capabilities = {
full_punch_interval = 0.8,
})
minetest.register_tool("default:sword_mese", {
- description = "Mese Sword",
+ description = S("Mese Sword"),
inventory_image = "default_tool_mesesword.png",
tool_capabilities = {
full_punch_interval = 0.7,
})
minetest.register_tool("default:sword_diamond", {
- description = "Diamond Sword",
+ description = S("Diamond Sword"),
inventory_image = "default_tool_diamondsword.png",
tool_capabilities = {
full_punch_interval = 0.7,
})
minetest.register_tool("default:key", {
- description = "Key",
+ description = S("Key"),
inventory_image = "default_key.png",
groups = {key = 1, not_in_creative_inventory = 1},
stack_max = 1,
+-- default/torch.lua
+
+-- support for MT game translation.
+local S = default.get_translator
+
local function on_flood(pos, oldnode, newnode)
minetest.add_item(pos, ItemStack("default:torch 1"))
-- Play flame-extinguish sound if liquid is not an 'igniter'
end
minetest.register_node("default:torch", {
- description = "Torch",
+ description = S("Torch"),
drawtype = "mesh",
mesh = "torch_floor.obj",
inventory_image = "default_torch_on_floor.png",
+-- default/trees.lua
+
+-- support for MT game translation.
+local S = default.get_translator
+
local random = math.random
--
interval) then
minetest.record_protection_violation(pos, player_name)
-- Print extra information to explain
+-- minetest.chat_send_player(player_name,
+-- itemstack:get_definition().description .. " will intersect protection " ..
+-- "on growth")
minetest.chat_send_player(player_name,
- itemstack:get_definition().description .. " will intersect protection " ..
- "on growth")
+ S("@1 will intersect protection on growth.",
+ itemstack:get_definition().description))
return itemstack
end
+-- doors/init.lua
+
-- our API object
doors = {}
doors.registered_doors = {}
doors.registered_trapdoors = {}
+-- Load support for MT game translation.
+local S = minetest.get_translator("doors")
+
+
local function replace_old_owner_information(pos)
local meta = minetest.get_meta(pos)
local owner = meta:get_string("doors_owner")
-- this hidden node is placed on top of the bottom, and prevents
-- nodes from being placed in the top half of the door.
minetest.register_node("doors:hidden", {
- description = "Hidden Door Segment",
+ description = S("Hidden Door Segment"),
-- can't use airlike otherwise falling nodes will turn to entities
-- and will be forever stuck until door is removed.
drawtype = "nodebox",
if def.protected then
meta:set_string("owner", pn)
- meta:set_string("infotext", "Owned by " .. pn)
+ meta:set_string("infotext", S("Owned by @1", pn))
end
if not (creative and creative.is_enabled_for and creative.is_enabled_for(pn)) then
-- verify placer is owner of lockable door
if owner ~= pname then
minetest.record_protection_violation(pos, pname)
- minetest.chat_send_player(pname, "You do not own this locked door.")
+ minetest.chat_send_player(pname, S("You do not own this locked door."))
return nil
end
meta:set_string("key_lock_secret", secret)
end
- return secret, "a locked door", owner
+ return secret, S("a locked door"), owner
end
def.node_dig_prediction = ""
else
doors.register("door_wood", {
tiles = {{ name = "doors_door_wood.png", backface_culling = true }},
- description = "Wooden Door",
+ description = S("Wooden Door"),
inventory_image = "doors_item_wood.png",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
recipe = {
doors.register("door_steel", {
tiles = {{name = "doors_door_steel.png", backface_culling = true}},
- description = "Steel Door",
+ description = S("Steel Door"),
inventory_image = "doors_item_steel.png",
protected = true,
groups = {cracky = 1, level = 2},
doors.register("door_glass", {
tiles = {"doors_door_glass.png"},
- description = "Glass Door",
+ description = S("Glass Door"),
inventory_image = "doors_item_glass.png",
groups = {cracky=3, oddly_breakable_by_hand=3},
sounds = default.node_sound_glass_defaults(),
doors.register("door_obsidian_glass", {
tiles = {"doors_door_obsidian_glass.png"},
- description = "Obsidian Glass Door",
+ description = S("Obsidian Glass Door"),
inventory_image = "doors_item_obsidian_glass.png",
groups = {cracky=3},
sounds = default.node_sound_glass_defaults(),
local pn = placer:get_player_name()
local meta = minetest.get_meta(pos)
meta:set_string("owner", pn)
- meta:set_string("infotext", "Owned by "..pn)
+ meta:set_string("infotext", S("Owned by @1", pn))
return (creative and creative.is_enabled_for and creative.is_enabled_for(pn))
end
-- verify placer is owner of lockable door
if owner ~= pname then
minetest.record_protection_violation(pos, pname)
- minetest.chat_send_player(pname, "You do not own this trapdoor.")
+ minetest.chat_send_player(pname, S("You do not own this trapdoor."))
return nil
end
meta:set_string("key_lock_secret", secret)
end
- return secret, "a locked trapdoor", owner
+ return secret, S("a locked trapdoor"), owner
end
def.node_dig_prediction = ""
else
end
doors.register_trapdoor("doors:trapdoor", {
- description = "Wooden Trapdoor",
+ description = S("Wooden Trapdoor"),
inventory_image = "doors_trapdoor.png",
wield_image = "doors_trapdoor.png",
tile_front = "doors_trapdoor.png",
})
doors.register_trapdoor("doors:trapdoor_steel", {
- description = "Steel Trapdoor",
+ description = S("Steel Trapdoor"),
inventory_image = "doors_trapdoor_steel.png",
wield_image = "doors_trapdoor_steel.png",
tile_front = "doors_trapdoor_steel.png",
end
doors.register_fencegate("doors:gate_wood", {
- description = "Apple Wood Fence Gate",
+ description = S("Apple Wood Fence Gate"),
texture = "default_wood.png",
material = "default:wood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}
})
doors.register_fencegate("doors:gate_acacia_wood", {
- description = "Acacia Wood Fence Gate",
+ description = S("Acacia Wood Fence Gate"),
texture = "default_acacia_wood.png",
material = "default:acacia_wood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}
})
doors.register_fencegate("doors:gate_junglewood", {
- description = "Jungle Wood Fence Gate",
+ description = S("Jungle Wood Fence Gate"),
texture = "default_junglewood.png",
material = "default:junglewood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}
})
doors.register_fencegate("doors:gate_pine_wood", {
- description = "Pine Wood Fence Gate",
+ description = S("Pine Wood Fence Gate"),
texture = "default_pine_wood.png",
material = "default:pine_wood",
groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3}
})
doors.register_fencegate("doors:gate_aspen_wood", {
- description = "Aspen Wood Fence Gate",
+ description = S("Aspen Wood Fence Gate"),
texture = "default_aspen_wood.png",
material = "default:aspen_wood",
groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3}
+-- dye/init.lua
+
dye = {}
+-- Load support for MT game translation.
+local S = minetest.get_translator("dye")
+
-- Make dye names and descriptions available globally
dye.dyes = {
- {"white", "White"},
- {"grey", "Grey"},
- {"dark_grey", "Dark grey"},
- {"black", "Black"},
- {"violet", "Violet"},
- {"blue", "Blue"},
- {"cyan", "Cyan"},
- {"dark_green", "Dark green"},
- {"green", "Green"},
- {"yellow", "Yellow"},
- {"brown", "Brown"},
- {"orange", "Orange"},
- {"red", "Red"},
- {"magenta", "Magenta"},
- {"pink", "Pink"},
+ {"white", S("White")},
+ {"grey", S("Grey")},
+ {"dark_grey", S("Dark Grey")},
+ {"black", S("Black")},
+ {"violet", S("Violet")},
+ {"blue", S("Blue")},
+ {"cyan", S("Cyan")},
+ {"dark_green", S("Dark Green")},
+ {"green", S("Green")},
+ {"yellow", S("Yellow")},
+ {"brown", S("Brown")},
+ {"orange", S("Orange")},
+ {"red", S("Red")},
+ {"magenta", S("Magenta")},
+ {"pink", S("Pink")},
}
-- Define items
minetest.register_craftitem("dye:" .. name, {
inventory_image = "dye_" .. name .. ".png",
- description = description .. " Dye",
+ description = S("@1 Dye", description),
groups = groups
})
+-- farming/api.lua
+
+-- support for MT game translation.
+local S = farming.get_translator
-- Wear out hoes, place soil
-- TODO Ignore group:flower
end
-- Check def table
if def.description == nil then
- def.description = "Hoe"
+ def.description = S("Hoe")
end
if def.inventory_image == nil then
def.inventory_image = "unknown_item.png"
-- Check def table
if not def.description then
- def.description = "Seed"
+ def.description = S("Seed")
end
if not def.inventory_image then
def.inventory_image = "unknown_item.png"
+-- farming/hoes.lua
+
+-- support for MT game translation.
+local S = farming.get_translator
+
farming.register_hoe(":farming:hoe_wood", {
- description = "Wooden Hoe",
+ description = S("Wooden Hoe"),
inventory_image = "farming_tool_woodhoe.png",
max_uses = 30,
material = "group:wood",
})
farming.register_hoe(":farming:hoe_stone", {
- description = "Stone Hoe",
+ description = S("Stone Hoe"),
inventory_image = "farming_tool_stonehoe.png",
max_uses = 90,
material = "group:stone",
})
farming.register_hoe(":farming:hoe_steel", {
- description = "Steel Hoe",
+ description = S("Steel Hoe"),
inventory_image = "farming_tool_steelhoe.png",
max_uses = 500,
material = "default:steel_ingot",
-- release.
farming.register_hoe(":farming:hoe_bronze", {
- description = "Bronze Hoe",
+ description = S("Bronze Hoe"),
inventory_image = "farming_tool_bronzehoe.png",
max_uses = 220,
groups = {hoe = 1, not_in_creative_inventory = 1},
})
farming.register_hoe(":farming:hoe_mese", {
- description = "Mese Hoe",
+ description = S("Mese Hoe"),
inventory_image = "farming_tool_mesehoe.png",
max_uses = 350,
groups = {hoe = 1, not_in_creative_inventory = 1},
})
farming.register_hoe(":farming:hoe_diamond", {
- description = "Diamond Hoe",
+ description = S("Diamond Hoe"),
inventory_image = "farming_tool_diamondhoe.png",
max_uses = 500,
groups = {hoe = 1, not_in_creative_inventory = 1},
+-- farming/init.lua
+
+-- Load support for MT game translation.
+local S = minetest.get_translator("farming")
+
-- Global farming namespace
farming = {}
farming.path = minetest.get_modpath("farming")
-
+farming.get_translator = S
-- Load files
-- WHEAT
farming.register_plant("farming:wheat", {
- description = "Wheat Seed",
+ description = S("Wheat Seed"),
paramtype2 = "meshoptions",
inventory_image = "farming_wheat_seed.png",
steps = 8,
})
minetest.register_craftitem("farming:flour", {
- description = "Flour",
+ description = S("Flour"),
inventory_image = "farming_flour.png",
groups = {food_flour = 1, flammable = 1},
})
minetest.register_craftitem("farming:bread", {
- description = "Bread",
+ description = S("Bread"),
inventory_image = "farming_bread.png",
on_use = minetest.item_eat(5),
groups = {food_bread = 1, flammable = 2},
-- Cotton
farming.register_plant("farming:cotton", {
- description = "Cotton Seed",
+ description = S("Cotton Seed"),
inventory_image = "farming_cotton_seed.png",
steps = 8,
minlight = 13,
})
minetest.register_craftitem("farming:string", {
- description = "String",
+ description = S("String"),
inventory_image = "farming_string.png",
groups = {flammable = 2},
})
+-- farming/nodes.lua
+
+-- support for MT game translation.
+local S = farming.get_translator
+
minetest.override_item("default:dirt", {
soil = {
base = "default:dirt",
})
minetest.register_node("farming:soil", {
- description = "Soil",
+ description = S("Soil"),
tiles = {"default_dirt.png^farming_soil.png", "default_dirt.png"},
drop = "default:dirt",
groups = {crumbly=3, not_in_creative_inventory=1, soil=2, grassland = 1, field = 1},
})
minetest.register_node("farming:soil_wet", {
- description = "Wet Soil",
+ description = S("Wet Soil"),
tiles = {"default_dirt.png^farming_soil_wet.png", "default_dirt.png^farming_soil_wet_side.png"},
drop = "default:dirt",
groups = {crumbly=3, not_in_creative_inventory=1, soil=3, wet = 1, grassland = 1, field = 1},
}
})
minetest.register_node("farming:desert_sand_soil", {
- description = "Desert Sand Soil",
+ description = S("Desert Sand Soil"),
drop = "default:desert_sand",
tiles = {"farming_desert_sand_soil.png", "default_desert_sand.png"},
groups = {crumbly=3, not_in_creative_inventory = 1, falling_node=1, sand=1, soil = 2, desert = 1, field = 1},
})
minetest.register_node("farming:desert_sand_soil_wet", {
- description = "Wet Desert Sand Soil",
+ description = S("Wet Desert Sand Soil"),
drop = "default:desert_sand",
tiles = {"farming_desert_sand_soil_wet.png", "farming_desert_sand_soil_wet_side.png"},
groups = {crumbly=3, falling_node=1, sand=1, not_in_creative_inventory=1, soil=3, wet = 1, desert = 1, field = 1},
})
minetest.register_node("farming:straw", {
- description = "Straw",
+ description = S("Straw"),
tiles = {"farming_straw.png"},
is_ground_content = false,
groups = {snappy=3, flammable=4, fall_damage_add_percent=-30},
"farming:straw",
{snappy = 3, flammable = 4},
{"farming_straw.png"},
- "Straw Stair",
- "Straw Slab",
+ S("Straw Stair"),
+ S("Straw Slab"),
default.node_sound_leaves_defaults(),
true
)
+-- fire/init.lua
+
-- Global namespace for functions
fire = {}
+-- Load support for MT game translation.
+local S = minetest.get_translator("fire")
+
+
-- 'Enable fire' setting
local fire_enabled = minetest.settings:get_bool("enable_fire")
})
minetest.register_node("fire:permanent_flame", {
- description = "Permanent Flame",
+ description = S("Permanent Flame"),
drawtype = "firelike",
tiles = {
{
-- Flint and steel
minetest.register_tool("fire:flint_and_steel", {
- description = "Flint and Steel",
+ description = S("Flint and Steel"),
inventory_image = "fire_flint_steel.png",
sound = {breaks = "default_tool_breaks"},
--- firefly
+-- firefly/init.lua
+
+-- Load support for MT game translation.
+local S = minetest.get_translator("fireflies")
+
+
minetest.register_node("fireflies:firefly", {
- description = "Firefly",
+ description = S("Firefly"),
drawtype = "plantlike",
tiles = {{
name = "fireflies_firefly_animated.png",
})
minetest.register_node("fireflies:hidden_firefly", {
- description = "Hidden Firefly",
+ description = S("Hidden Firefly"),
drawtype = "airlike",
inventory_image = "fireflies_firefly.png",
wield_image = "fireflies_firefly.png",
-- bug net
minetest.register_tool("fireflies:bug_net", {
- description = "Bug Net",
+ description = S("Bug Net"),
inventory_image = "fireflies_bugnet.png",
on_use = function(itemstack, player, pointed_thing)
if not pointed_thing or pointed_thing.type ~= "node" or
-- firefly in a bottle
minetest.register_node("fireflies:firefly_bottle", {
- description = "Firefly in a Bottle",
+ description = S("Firefly in a Bottle"),
inventory_image = "fireflies_bottle.png",
wield_image = "fireflies_bottle.png",
tiles = {{
+-- flowers/init.lua
+
-- Minetest 0.4 mod: default
-- See README.txt for licensing and other information.
flowers = {}
+-- Load support for MT game translation.
+local S = minetest.get_translator("flowers")
+
-- Map Generation
flowers.datas = {
{
"rose",
- "Red Rose",
+ S("Red Rose"),
{-2 / 16, -0.5, -2 / 16, 2 / 16, 5 / 16, 2 / 16},
{color_red = 1, flammable = 1}
},
{
"tulip",
- "Orange Tulip",
+ S("Orange Tulip"),
{-2 / 16, -0.5, -2 / 16, 2 / 16, 3 / 16, 2 / 16},
{color_orange = 1, flammable = 1}
},
{
"dandelion_yellow",
- "Yellow Dandelion",
+ S("Yellow Dandelion"),
{-4 / 16, -0.5, -4 / 16, 4 / 16, -2 / 16, 4 / 16},
{color_yellow = 1, flammable = 1}
},
{
"chrysanthemum_green",
- "Green Chrysanthemum",
+ S("Green Chrysanthemum"),
{-4 / 16, -0.5, -4 / 16, 4 / 16, -1 / 16, 4 / 16},
{color_green = 1, flammable = 1}
},
{
"geranium",
- "Blue Geranium",
+ S("Blue Geranium"),
{-2 / 16, -0.5, -2 / 16, 2 / 16, 2 / 16, 2 / 16},
{color_blue = 1, flammable = 1}
},
{
"viola",
- "Viola",
+ S("Viola"),
{-5 / 16, -0.5, -5 / 16, 5 / 16, -1 / 16, 5 / 16},
{color_violet = 1, flammable = 1}
},
{
"dandelion_white",
- "White Dandelion",
+ S("White Dandelion"),
{-5 / 16, -0.5, -5 / 16, 5 / 16, -2 / 16, 5 / 16},
{color_white = 1, flammable = 1}
},
{
"tulip_black",
- "Black Tulip",
+ S("Black Tulip"),
{-2 / 16, -0.5, -2 / 16, 2 / 16, 3 / 16, 2 / 16},
{color_black = 1, flammable = 1}
},
--
minetest.register_node("flowers:mushroom_red", {
- description = "Red Mushroom",
+ description = S("Red Mushroom"),
tiles = {"flowers_mushroom_red.png"},
inventory_image = "flowers_mushroom_red.png",
wield_image = "flowers_mushroom_red.png",
})
minetest.register_node("flowers:mushroom_brown", {
- description = "Brown Mushroom",
+ description = S("Brown Mushroom"),
tiles = {"flowers_mushroom_brown.png"},
inventory_image = "flowers_mushroom_brown.png",
wield_image = "flowers_mushroom_brown.png",
--
local waterlily_def = {
- description = "Waterlily",
+ description = S("Waterlily"),
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
+-- game_commands/init.lua
+
+-- Load support for MT game translation.
+local S = minetest.get_translator("game_commands")
+
+
minetest.register_chatcommand("killme", {
- description = "Kill yourself to respawn",
+ description = S("Kill yourself to respawn"),
func = function(name)
local player = minetest.get_player_by_name(name)
if player then
-- There doesn't seem to be a way to get a default spawn pos
-- from the lua API
- return false, "No static_spawnpoint defined"
+ return false, S("No static_spawnpoint defined")
end
else
-- Show error message if used when not logged in, eg: from IRC mod
- return false, "You need to be online to be killed!"
+ return false, S("You need to be online to be killed!")
end
end
})
+-- gave_initial_stuff/init.lua
+
local stuff_string = minetest.settings:get("initial_stuff") or
"default:pick_steel,default:axe_steel,default:shovel_steel," ..
"default:torch 99,default:cobble 99"
+-- map/init.lua
+
-- Mod global namespace
map = {}
+-- Load support for MT game translation.
+local S = minetest.get_translator("map")
+
+
-- Cache creative mode setting
local creative_mode_cache = minetest.settings:get_bool("creative_mode")
-- Mapping kit item
minetest.register_craftitem("map:mapping_kit", {
- description = "Mapping Kit\nUse with 'Minimap' key",
+ description = S("Mapping Kit\nUse with 'Minimap' key"),
inventory_image = "map_mapping_kit.png",
stack_max = 1,
groups = {flammable = 3},
+-- player/init.lua
+
dofile(minetest.get_modpath("player_api") .. "/api.lua")
-- Default player appearance
+-- screwdriver/init.lua
+
screwdriver = {}
+-- Load support for MT game translation.
+local S = minetest.get_translator("screwdriver")
+
+
screwdriver.ROTATE_FACE = 1
screwdriver.ROTATE_AXIS = 2
screwdriver.disallow = function(pos, node, user, mode, new_param2)
-- Screwdriver
minetest.register_tool("screwdriver:screwdriver", {
- description = "Screwdriver (left-click rotates face, right-click rotates axis)",
+ description = S("Screwdriver (left-click rotates face, right-click rotates axis)"),
inventory_image = "screwdriver.png",
groups = {tool = 1},
on_use = function(itemstack, user, pointed_thing)
+-- sethome/init.lua
sethome = {}
+-- Load support for MT game translation.
+local S = minetest.get_translator("sethome")
+
+
local homes_file = minetest.get_worldpath() .. "/homes"
local homepos = {}
end
minetest.register_privilege("home", {
- description = "Can use /sethome and /home",
+ description = S("Can use /sethome and /home"),
give_to_singleplayer = false
})
minetest.register_chatcommand("home", {
- description = "Teleport you to your home point",
+ description = S("Teleport you to your home point"),
privs = {home = true},
func = function(name)
if sethome.go(name) then
- return true, "Teleported to home!"
+ return true, S("Teleported to home!")
end
- return false, "Set a home using /sethome"
+ return false, S("Set a home using /sethome")
end,
})
minetest.register_chatcommand("sethome", {
- description = "Set your home point",
+ description = S("Set your home point"),
privs = {home = true},
func = function(name)
name = name or "" -- fallback to blank name if nil
local player = minetest.get_player_by_name(name)
if player and sethome.set(name, player:get_pos()) then
- return true, "Home set!"
+ return true, S("Home set!")
end
- return false, "Player not found!"
+ return false, S("Player not found!")
end,
})
+-- sfinv/init.lua
+
dofile(minetest.get_modpath("sfinv") .. "/api.lua")
sfinv.register_page("sfinv:crafting", {
+-- spawn/init.lua
+
-- Disable by mapgen, setting or if 'static_spawnpoint' is set
--------------------------------------------------------------
+-- stairs/init.lua
+
-- Minetest 0.4 mod: stairs
-- See README.txt for licensing and other information.
stairs = {}
+-- Load support for MT game translation.
+local S = minetest.get_translator("stairs")
+
-- Register aliases for new pine node names
new_groups.stair = 1
warn_if_exists("stairs:stair_inner_" .. subname)
minetest.register_node(":stairs:stair_inner_" .. subname, {
- description = "Inner " .. description,
+ description = S("Inner @1", description),
drawtype = "nodebox",
tiles = stair_images,
paramtype = "light",
new_groups.stair = 1
warn_if_exists("stairs:stair_outer_" .. subname)
minetest.register_node(":stairs:stair_outer_" .. subname, {
- description = "Outer " .. description,
+ description = S("Outer @1", description),
drawtype = "nodebox",
tiles = stair_images,
paramtype = "light",
"default:wood",
{choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
{"default_wood.png"},
- "Wooden Stair",
- "Wooden Slab",
+ S("Wooden Stair"),
+ S("Wooden Slab"),
default.node_sound_wood_defaults(),
false
)
"default:junglewood",
{choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
{"default_junglewood.png"},
- "Jungle Wood Stair",
- "Jungle Wood Slab",
+ S("Jungle Wood Stair"),
+ S("Jungle Wood Slab"),
default.node_sound_wood_defaults(),
false
)
"default:pine_wood",
{choppy = 3, oddly_breakable_by_hand = 2, flammable = 3},
{"default_pine_wood.png"},
- "Pine Wood Stair",
- "Pine Wood Slab",
+ S("Pine Wood Stair"),
+ S("Pine Wood Slab"),
default.node_sound_wood_defaults(),
false
)
"default:acacia_wood",
{choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
{"default_acacia_wood.png"},
- "Acacia Wood Stair",
- "Acacia Wood Slab",
+ S("Acacia Wood Stair"),
+ S("Acacia Wood Slab"),
default.node_sound_wood_defaults(),
false
)
"default:aspen_wood",
{choppy = 3, oddly_breakable_by_hand = 2, flammable = 3},
{"default_aspen_wood.png"},
- "Aspen Wood Stair",
- "Aspen Wood Slab",
+ S("Aspen Wood Stair"),
+ S("Aspen Wood Slab"),
default.node_sound_wood_defaults(),
false
)
"default:stone",
{cracky = 3},
{"default_stone.png"},
- "Stone Stair",
- "Stone Slab",
+ S("Stone Stair"),
+ S("Stone Slab"),
default.node_sound_stone_defaults(),
true
)
"default:cobble",
{cracky = 3},
{"default_cobble.png"},
- "Cobblestone Stair",
- "Cobblestone Slab",
+ S("Cobblestone Stair"),
+ S("Cobblestone Slab"),
default.node_sound_stone_defaults(),
true
)
"default:mossycobble",
{cracky = 3},
{"default_mossycobble.png"},
- "Mossy Cobblestone Stair",
- "Mossy Cobblestone Slab",
+ S("Mossy Cobblestone Stair"),
+ S("Mossy Cobblestone Slab"),
default.node_sound_stone_defaults(),
true
)
"default:stonebrick",
{cracky = 2},
{"default_stone_brick.png"},
- "Stone Brick Stair",
- "Stone Brick Slab",
+ S("Stone Brick Stair"),
+ S("Stone Brick Slab"),
default.node_sound_stone_defaults(),
false
)
"default:stone_block",
{cracky = 2},
{"default_stone_block.png"},
- "Stone Block Stair",
- "Stone Block Slab",
+ S("Stone Block Stair"),
+ S("Stone Block Slab"),
default.node_sound_stone_defaults(),
true
)
"default:desert_stone",
{cracky = 3},
{"default_desert_stone.png"},
- "Desert Stone Stair",
- "Desert Stone Slab",
+ S("Desert Stone Stair"),
+ S("Desert Stone Slab"),
default.node_sound_stone_defaults(),
true
)
"default:desert_cobble",
{cracky = 3},
{"default_desert_cobble.png"},
- "Desert Cobblestone Stair",
- "Desert Cobblestone Slab",
+ S("Desert Cobblestone Stair"),
+ S("Desert Cobblestone Slab"),
default.node_sound_stone_defaults(),
true
)
"default:desert_stonebrick",
{cracky = 2},
{"default_desert_stone_brick.png"},
- "Desert Stone Brick Stair",
- "Desert Stone Brick Slab",
+ S("Desert Stone Brick Stair"),
+ S("Desert Stone Brick Slab"),
default.node_sound_stone_defaults(),
false
)
"default:desert_stone_block",
{cracky = 2},
{"default_desert_stone_block.png"},
- "Desert Stone Block Stair",
- "Desert Stone Block Slab",
+ S("Desert Stone Block Stair"),
+ S("Desert Stone Block Slab"),
default.node_sound_stone_defaults(),
true
)
"default:sandstone",
{crumbly = 1, cracky = 3},
{"default_sandstone.png"},
- "Sandstone Stair",
- "Sandstone Slab",
+ S("Sandstone Stair"),
+ S("Sandstone Slab"),
default.node_sound_stone_defaults(),
true
)
"default:sandstonebrick",
{cracky = 2},
{"default_sandstone_brick.png"},
- "Sandstone Brick Stair",
- "Sandstone Brick Slab",
+ S("Sandstone Brick Stair"),
+ S("Sandstone Brick Slab"),
default.node_sound_stone_defaults(),
false
)
"default:sandstone_block",
{cracky = 2},
{"default_sandstone_block.png"},
- "Sandstone Block Stair",
- "Sandstone Block Slab",
+ S("Sandstone Block Stair"),
+ S("Sandstone Block Slab"),
default.node_sound_stone_defaults(),
true
)
"default:desert_sandstone",
{crumbly = 1, cracky = 3},
{"default_desert_sandstone.png"},
- "Desert Sandstone Stair",
- "Desert Sandstone Slab",
+ S("Desert Sandstone Stair"),
+ S("Desert Sandstone Slab"),
default.node_sound_stone_defaults(),
true
)
"default:desert_sandstone_brick",
{cracky = 2},
{"default_desert_sandstone_brick.png"},
- "Desert Sandstone Brick Stair",
- "Desert Sandstone Brick Slab",
+ S("Desert Sandstone Brick Stair"),
+ S("Desert Sandstone Brick Slab"),
default.node_sound_stone_defaults(),
false
)
"default:desert_sandstone_block",
{cracky = 2},
{"default_desert_sandstone_block.png"},
- "Desert Sandstone Block Stair",
- "Desert Sandstone Block Slab",
+ S("Desert Sandstone Block Stair"),
+ S("Desert Sandstone Block Slab"),
default.node_sound_stone_defaults(),
true
)
"default:silver_sandstone",
{crumbly = 1, cracky = 3},
{"default_silver_sandstone.png"},
- "Silver Sandstone Stair",
- "Silver Sandstone Slab",
+ S("Silver Sandstone Stair"),
+ S("Silver Sandstone Slab"),
default.node_sound_stone_defaults(),
true
)
"default:silver_sandstone_brick",
{cracky = 2},
{"default_silver_sandstone_brick.png"},
- "Silver Sandstone Brick Stair",
- "Silver Sandstone Brick Slab",
+ S("Silver Sandstone Brick Stair"),
+ S("Silver Sandstone Brick Slab"),
default.node_sound_stone_defaults(),
false
)
"default:silver_sandstone_block",
{cracky = 2},
{"default_silver_sandstone_block.png"},
- "Silver Sandstone Block Stair",
- "Silver Sandstone Block Slab",
+ S("Silver Sandstone Block Stair"),
+ S("Silver Sandstone Block Slab"),
default.node_sound_stone_defaults(),
true
)
"default:obsidian",
{cracky = 1, level = 2},
{"default_obsidian.png"},
- "Obsidian Stair",
- "Obsidian Slab",
+ S("Obsidian Stair"),
+ S("Obsidian Slab"),
default.node_sound_stone_defaults(),
true
)
"default:obsidianbrick",
{cracky = 1, level = 2},
{"default_obsidian_brick.png"},
- "Obsidian Brick Stair",
- "Obsidian Brick Slab",
+ S("Obsidian Brick Stair"),
+ S("Obsidian Brick Slab"),
default.node_sound_stone_defaults(),
false
)
"default:obsidian_block",
{cracky = 1, level = 2},
{"default_obsidian_block.png"},
- "Obsidian Block Stair",
- "Obsidian Block Slab",
+ S("Obsidian Block Stair"),
+ S("Obsidian Block Slab"),
default.node_sound_stone_defaults(),
true
)
"default:brick",
{cracky = 3},
{"default_brick.png"},
- "Brick Stair",
- "Brick Slab",
+ S("Brick Stair"),
+ S("Brick Slab"),
default.node_sound_stone_defaults(),
false
)
"default:steelblock",
{cracky = 1, level = 2},
{"default_steel_block.png"},
- "Steel Block Stair",
- "Steel Block Slab",
+ S("Steel Block Stair"),
+ S("Steel Block Slab"),
default.node_sound_metal_defaults(),
true
)
"default:tinblock",
{cracky = 1, level = 2},
{"default_tin_block.png"},
- "Tin Block Stair",
- "Tin Block Slab",
+ S("Tin Block Stair"),
+ S("Tin Block Slab"),
default.node_sound_metal_defaults(),
true
)
"default:copperblock",
{cracky = 1, level = 2},
{"default_copper_block.png"},
- "Copper Block Stair",
- "Copper Block Slab",
+ S("Copper Block Stair"),
+ S("Copper Block Slab"),
default.node_sound_metal_defaults(),
true
)
"default:bronzeblock",
{cracky = 1, level = 2},
{"default_bronze_block.png"},
- "Bronze Block Stair",
- "Bronze Block Slab",
+ S("Bronze Block Stair"),
+ S("Bronze Block Slab"),
default.node_sound_metal_defaults(),
true
)
"default:goldblock",
{cracky = 1},
{"default_gold_block.png"},
- "Gold Block Stair",
- "Gold Block Slab",
+ S("Gold Block Stair"),
+ S("Gold Block Slab"),
default.node_sound_metal_defaults(),
true
)
"default:ice",
{cracky = 3, cools_lava = 1, slippery = 3},
{"default_ice.png"},
- "Ice Stair",
- "Ice Slab",
+ S("Ice Stair"),
+ S("Ice Slab"),
default.node_sound_glass_defaults(),
true
)
"default:snowblock",
{crumbly = 3, cools_lava = 1, snowy = 1},
{"default_snow.png"},
- "Snow Block Stair",
- "Snow Block Slab",
+ S("Snow Block Stair"),
+ S("Snow Block Slab"),
default.node_sound_snow_defaults(),
true
)
{"stairs_glass_split.png", "default_glass.png",
"stairs_glass_stairside.png^[transformFX", "stairs_glass_stairside.png",
"default_glass.png", "stairs_glass_split.png"},
- "Glass Stair",
+ S("Glass Stair"),
default.node_sound_glass_defaults(),
false
)
"default:glass",
{cracky = 3},
{"default_glass.png", "default_glass.png", "stairs_glass_split.png"},
- "Glass Slab",
+ S("Glass Slab"),
default.node_sound_glass_defaults(),
false
)
{"stairs_glass_stairside.png^[transformR270", "default_glass.png",
"stairs_glass_stairside.png^[transformFX", "default_glass.png",
"default_glass.png", "stairs_glass_stairside.png"},
- "Glass Stair",
+ S("Glass Stair"),
default.node_sound_glass_defaults(),
false
)
{"stairs_glass_stairside.png^[transformR90", "default_glass.png",
"stairs_glass_outer_stairside.png", "stairs_glass_stairside.png",
"stairs_glass_stairside.png^[transformR90","stairs_glass_outer_stairside.png"},
- "Glass Stair",
+ S("Glass Stair"),
default.node_sound_glass_defaults(),
false
)
{"stairs_obsidian_glass_split.png", "default_obsidian_glass.png",
"stairs_obsidian_glass_stairside.png^[transformFX", "stairs_obsidian_glass_stairside.png",
"default_obsidian_glass.png", "stairs_obsidian_glass_split.png"},
- "Obsidian Glass Stair",
+ S("Obsidian Glass Stair"),
default.node_sound_glass_defaults(),
false
)
"default:obsidian_glass",
{cracky = 3},
{"default_obsidian_glass.png", "default_obsidian_glass.png", "stairs_obsidian_glass_split.png"},
- "Obsidian Glass Slab",
+ S("Obsidian Glass Slab"),
default.node_sound_glass_defaults(),
false
)
{"stairs_obsidian_glass_stairside.png^[transformR270", "default_obsidian_glass.png",
"stairs_obsidian_glass_stairside.png^[transformFX", "default_obsidian_glass.png",
"default_obsidian_glass.png", "stairs_obsidian_glass_stairside.png"},
- "Obsidian Glass Stair",
+ S("Obsidian Glass Stair"),
default.node_sound_glass_defaults(),
false
)
{"stairs_obsidian_glass_stairside.png^[transformR90", "default_obsidian_glass.png",
"stairs_obsidian_glass_outer_stairside.png", "stairs_obsidian_glass_stairside.png",
"stairs_obsidian_glass_stairside.png^[transformR90","stairs_obsidian_glass_outer_stairside.png"},
- "Obsidian Glass Stair",
+ S("Obsidian Glass Stair"),
default.node_sound_glass_defaults(),
false
)
+-- tnt/init.lua
+
tnt = {}
+-- Load support for MT game translation.
+local S = minetest.get_translator("tnt")
+
+
-- Default to enabled when in singleplayer
local enable_tnt = minetest.settings:get_bool("enable_tnt")
if enable_tnt == nil then
})
minetest.register_node("tnt:gunpowder", {
- description = "Gun Powder",
+ description = S("Gun Powder"),
drawtype = "raillike",
paramtype = "light",
is_ground_content = false,
})
minetest.register_craftitem("tnt:tnt_stick", {
- description = "TNT Stick",
+ description = S("TNT Stick"),
inventory_image = "tnt_tnt_stick.png",
groups = {flammable = 5},
})
tnt.register_tnt({
name = "tnt:tnt",
- description = "TNT",
+ description = S("TNT"),
radius = tnt_radius,
})
+-- vessels/init.lua
+
-- Minetest 0.4 mod: vessels
-- See README.txt for licensing and other information.
+-- Load support for MT game translation.
+local S = minetest.get_translator("vessels")
+
+
local vessels_shelf_formspec =
"size[8,7;]" ..
"list[context;vessels;0,0.3;8,2;]" ..
end
minetest.register_node("vessels:shelf", {
- description = "Vessels Shelf",
+ description = S("Vessels Shelf"),
tiles = {"default_wood.png", "default_wood.png", "default_wood.png",
"default_wood.png", "vessels_shelf.png", "vessels_shelf.png"},
paramtype2 = "facedir",
})
minetest.register_node("vessels:glass_bottle", {
- description = "Empty Glass Bottle",
+ description = S("Empty Glass Bottle"),
drawtype = "plantlike",
tiles = {"vessels_glass_bottle.png"},
inventory_image = "vessels_glass_bottle.png",
})
minetest.register_node("vessels:drinking_glass", {
- description = "Empty Drinking Glass",
+ description = S("Empty Drinking Glass"),
drawtype = "plantlike",
tiles = {"vessels_drinking_glass.png"},
inventory_image = "vessels_drinking_glass_inv.png",
})
minetest.register_node("vessels:steel_bottle", {
- description = "Empty Heavy Steel Bottle",
+ description = S("Empty Heavy Steel Bottle"),
drawtype = "plantlike",
tiles = {"vessels_steel_bottle.png"},
inventory_image = "vessels_steel_bottle.png",
-- Glass and steel recycling
minetest.register_craftitem("vessels:glass_fragments", {
- description = "Glass Fragments",
+ description = S("Glass Fragments"),
inventory_image = "vessels_glass_fragments.png",
})
+-- walls/init.lua
+
walls = {}
+-- Load support for MT game translation.
+local S = minetest.get_translator("walls")
+
+
walls.register = function(wall_name, wall_desc, wall_texture_table, wall_mat, wall_sounds)
--make wall_texture_table paramenter backwards compatible for mods passing single texture
if type(wall_texture_table) ~= "table" then
end
-walls.register("walls:cobble", "Cobblestone Wall", {"default_cobble.png"},
+walls.register("walls:cobble", S("Cobblestone Wall"), {"default_cobble.png"},
"default:cobble", default.node_sound_stone_defaults())
-walls.register("walls:mossycobble", "Mossy Cobblestone Wall", {"default_mossycobble.png"},
+walls.register("walls:mossycobble", S("Mossy Cobblestone Wall"), {"default_mossycobble.png"},
"default:mossycobble", default.node_sound_stone_defaults())
-walls.register("walls:desertcobble", "Desert Cobblestone Wall", {"default_desert_cobble.png"},
+walls.register("walls:desertcobble", S("Desert Cobblestone Wall"), {"default_desert_cobble.png"},
"default:desert_cobble", default.node_sound_stone_defaults())
+-- wool/init.lua
+
+-- Load support for MT game translation.
+local S = minetest.get_translator("wool")
+
local dyes = dye.dyes
for i = 1, #dyes do
local name, desc = unpack(dyes[i])
minetest.register_node("wool:" .. name, {
- description = desc .. " Wool",
+ description = S("@1 Wool", desc),
tiles = {"wool_" .. name .. ".png"},
is_ground_content = false,
groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 3,
+-- xpanes/init.lua
+
+-- Load support for MT game translation.
+local S = minetest.get_translator("xpanes")
+
local function is_pane(pos)
return minetest.get_item_group(minetest.get_node(pos).name, "pane") > 0
end
xpanes.register_pane("pane", {
- description = "Glass Pane",
+ description = S("Glass Pane"),
textures = {"default_glass.png","xpanes_pane_half.png","xpanes_edge.png"},
inventory_image = "default_glass.png",
wield_image = "default_glass.png",
})
xpanes.register_pane("obsidian_pane", {
- description = "Obsidian Glass Pane",
+ description = S("Obsidian Glass Pane"),
textures = {"default_obsidian_glass.png","xpanes_pane_half.png","xpanes_edge_obsidian.png"},
inventory_image = "default_obsidian_glass.png",
wield_image = "default_obsidian_glass.png",
})
xpanes.register_pane("bar", {
- description = "Steel Bars",
+ description = S("Steel Bars"),
textures = {"xpanes_bar.png","xpanes_bar.png","xpanes_bar_top.png"},
inventory_image = "xpanes_bar.png",
wield_image = "xpanes_bar.png",