Add support for MT 5 game translation (rebasing ) (#2466)

rebased #2368
This commit is contained in:
Yves Quemener 2019-09-11 02:09:51 +09:00 committed by sfan5
parent d99a176b69
commit bb9279ccb8
43 changed files with 632 additions and 433 deletions

View File

@ -1,7 +1,12 @@
-- 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 = {
@ -52,7 +57,7 @@ beds.register_bed("beds:fancy_bed", {
-- 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 = {

View File

@ -1,13 +1,20 @@
-- 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")

View File

@ -1,7 +1,12 @@
-- 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")
@ -54,7 +59,7 @@ minetest.after(4.7, cyclic_update)
-- 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,

View File

@ -1,3 +1,8 @@
-- boats/init.lua
-- Load support for MT game translation.
local S = minetest.get_translator("boats")
--
-- Helper functions
--
@ -149,13 +154,13 @@ function boat.on_step(self, dtime)
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
@ -242,7 +247,7 @@ minetest.register_entity("boats:boat", boat)
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},

View File

@ -1,6 +1,11 @@
-- 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)
@ -24,7 +29,7 @@ local share_bones_time = tonumber(minetest.settings:get("share_bones_time")) or
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",
@ -116,7 +121,7 @@ minetest.register_node("bones:bones", {
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)
@ -194,7 +199,7 @@ minetest.register_on_dieplayer(function(player)
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
@ -204,7 +209,7 @@ minetest.register_on_dieplayer(function(player)
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
@ -230,8 +235,7 @@ minetest.register_on_dieplayer(function(player)
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
@ -242,8 +246,7 @@ minetest.register_on_dieplayer(function(player)
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)
@ -266,7 +269,7 @@ minetest.register_on_dieplayer(function(player)
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)
@ -276,6 +279,6 @@ minetest.register_on_dieplayer(function(player)
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)

View File

@ -1,6 +1,10 @@
-- 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")
@ -111,7 +115,7 @@ function bucket.register_liquid(source, flowing, itemname, inventory_image, name
end
minetest.register_craftitem("bucket:bucket_empty", {
description = "Empty Bucket",
description = S("Empty Bucket"),
inventory_image = "bucket.png",
groups = {tool = 1},
liquids_pointable = true,
@ -185,7 +189,7 @@ bucket.register_liquid(
"default:water_flowing",
"bucket:bucket_water",
"bucket_water.png",
"Water Bucket",
S("Water Bucket"),
{tool = 1, water_bucket = 1}
)
@ -200,7 +204,7 @@ bucket.register_liquid(
"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
)
@ -210,7 +214,7 @@ bucket.register_liquid(
"default:lava_flowing",
"bucket:bucket_lava",
"bucket_lava.png",
"Lava Bucket",
S("Lava Bucket"),
{tool = 1}
)

View File

@ -1,8 +1,13 @@
-- 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
@ -10,7 +15,7 @@ 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",
@ -56,7 +61,7 @@ for i in ipairs (butter_list) do
})
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",

View File

@ -1,3 +1,8 @@
-- 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
@ -383,7 +388,7 @@ end
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)

View File

@ -1,7 +1,12 @@
-- 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

View File

@ -1,5 +1,10 @@
-- 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"
@ -22,7 +27,7 @@ minetest.register_alias("default:rail", "carts:rail")
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"
@ -41,7 +46,7 @@ minetest.register_craft({
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"

View File

@ -1,4 +1,10 @@
-- 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()
@ -14,7 +20,7 @@ local function update_sfinv(name)
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,

View File

@ -1,3 +1,8 @@
-- creative/inventory.lua
-- support for MT game translation.
local S = creative.get_translator
local player_inventory = {}
local inventory_cache = {}
@ -114,10 +119,10 @@ function creative.register_tab(name, title, items)
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]
]] ..
@ -174,10 +179,10 @@ function creative.register_tab(name, title, items)
})
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)

View File

@ -1,5 +1,8 @@
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 =
@ -84,7 +87,7 @@ function default.chest.register_chest(name, d)
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)
@ -92,8 +95,7 @@ function default.chest.register_chest(name, d)
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);
@ -171,7 +173,7 @@ function default.chest.register_chest(name, d)
-- 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
@ -181,12 +183,12 @@ function default.chest.register_chest(name, d)
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
@ -285,7 +287,7 @@ function default.chest.register_chest(name, d)
end
default.chest.register_chest("chest", {
description = "Chest",
description = S("Chest"),
tiles = {
"default_chest_top.png",
"default_chest_top.png",
@ -301,7 +303,7 @@ default.chest.register_chest("chest", {
})
default.chest.register_chest("chest_locked", {
description = "Locked Chest",
description = S("Locked Chest"),
tiles = {
"default_chest_top.png",
"default_chest_top.png",

View File

@ -1,13 +1,16 @@
-- 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},
})
@ -108,7 +111,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
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
@ -155,14 +158,14 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
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,
@ -199,7 +202,7 @@ minetest.register_on_craft(function(itemstack, player, old_craft_grid, craft_inv
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)
@ -238,8 +241,8 @@ minetest.register_craftitem("default:skeleton_key", {
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
@ -255,93 +258,93 @@ minetest.register_craftitem("default:skeleton_key", {
})
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),

View File

@ -1,3 +1,7 @@
-- default/furnace.lua
-- support for MT game translation.
local S = default.get_translator
--
-- Formspecs
@ -60,7 +64,7 @@ local function allow_metadata_inventory_put(pos, listname, index, stack, player)
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
@ -209,19 +213,19 @@ local function furnace_node_timer(pos, elapsed)
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
@ -243,8 +247,9 @@ local function furnace_node_timer(pos, elapsed)
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
@ -263,7 +268,7 @@ end
--
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",
@ -311,7 +316,7 @@ minetest.register_node("default:furnace", {
})
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",

View File

@ -3,10 +3,14 @@
-- 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)

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,8 @@
-- mods/default/tools.lua
-- support for MT game translation.
local S = default.get_translator
-- The hand
minetest.register_item(":", {
type = "none",
@ -22,7 +25,7 @@ minetest.register_item(":", {
--
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,
@ -37,7 +40,7 @@ minetest.register_tool("default:pick_wood", {
})
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,
@ -52,7 +55,7 @@ minetest.register_tool("default:pick_stone", {
})
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,
@ -67,7 +70,7 @@ minetest.register_tool("default:pick_bronze", {
})
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,
@ -82,7 +85,7 @@ minetest.register_tool("default:pick_steel", {
})
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,
@ -97,7 +100,7 @@ minetest.register_tool("default:pick_mese", {
})
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,
@ -116,7 +119,7 @@ minetest.register_tool("default:pick_diamond", {
--
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 = {
@ -132,7 +135,7 @@ minetest.register_tool("default:shovel_wood", {
})
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 = {
@ -148,7 +151,7 @@ minetest.register_tool("default:shovel_stone", {
})
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 = {
@ -164,7 +167,7 @@ minetest.register_tool("default:shovel_bronze", {
})
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 = {
@ -180,7 +183,7 @@ minetest.register_tool("default:shovel_steel", {
})
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 = {
@ -196,7 +199,7 @@ minetest.register_tool("default:shovel_mese", {
})
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 = {
@ -216,7 +219,7 @@ minetest.register_tool("default:shovel_diamond", {
--
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,
@ -231,7 +234,7 @@ minetest.register_tool("default:axe_wood", {
})
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,
@ -246,7 +249,7 @@ minetest.register_tool("default:axe_stone", {
})
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,
@ -261,7 +264,7 @@ minetest.register_tool("default:axe_bronze", {
})
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,
@ -276,7 +279,7 @@ minetest.register_tool("default:axe_steel", {
})
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,
@ -291,7 +294,7 @@ minetest.register_tool("default:axe_mese", {
})
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,
@ -310,7 +313,7 @@ minetest.register_tool("default:axe_diamond", {
--
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,
@ -325,7 +328,7 @@ minetest.register_tool("default:sword_wood", {
})
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,
@ -340,7 +343,7 @@ minetest.register_tool("default:sword_stone", {
})
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,
@ -355,7 +358,7 @@ minetest.register_tool("default:sword_bronze", {
})
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,
@ -370,7 +373,7 @@ minetest.register_tool("default:sword_steel", {
})
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,
@ -385,7 +388,7 @@ minetest.register_tool("default:sword_mese", {
})
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,
@ -400,7 +403,7 @@ minetest.register_tool("default:sword_diamond", {
})
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,

View File

@ -1,3 +1,8 @@
-- 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'
@ -14,7 +19,7 @@ local function on_flood(pos, oldnode, newnode)
end
minetest.register_node("default:torch", {
description = "Torch",
description = S("Torch"),
drawtype = "mesh",
mesh = "torch_floor.obj",
inventory_image = "default_torch_on_floor.png",

View File

@ -1,3 +1,8 @@
-- default/trees.lua
-- support for MT game translation.
local S = default.get_translator
local random = math.random
--
@ -560,9 +565,12 @@ function default.sapling_on_place(itemstack, placer, pointed_thing,
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

View File

@ -1,9 +1,15 @@
-- 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")
@ -71,7 +77,7 @@ end
-- 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",
@ -327,7 +333,7 @@ function doors.register(name, def)
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
@ -401,7 +407,7 @@ function doors.register(name, def)
-- 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
@ -411,7 +417,7 @@ function doors.register(name, def)
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
@ -449,7 +455,7 @@ end
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 = {
@ -461,7 +467,7 @@ doors.register("door_wood", {
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},
@ -477,7 +483,7 @@ doors.register("door_steel", {
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(),
@ -492,7 +498,7 @@ doors.register("door_glass", {
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(),
@ -580,7 +586,7 @@ function doors.register_trapdoor(name, def)
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
@ -599,7 +605,7 @@ function doors.register_trapdoor(name, def)
-- 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
@ -609,7 +615,7 @@ function doors.register_trapdoor(name, def)
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
@ -679,7 +685,7 @@ function doors.register_trapdoor(name, def)
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",
@ -688,7 +694,7 @@ doors.register_trapdoor("doors:trapdoor", {
})
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",
@ -795,35 +801,35 @@ function doors.register_fencegate(name, def)
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}

View File

@ -1,23 +1,28 @@
-- 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
@ -30,7 +35,7 @@ for _, row in ipairs(dye.dyes) do
minetest.register_craftitem("dye:" .. name, {
inventory_image = "dye_" .. name .. ".png",
description = description .. " Dye",
description = S("@1 Dye", description),
groups = groups
})

View File

@ -1,3 +1,7 @@
-- farming/api.lua
-- support for MT game translation.
local S = farming.get_translator
-- Wear out hoes, place soil
-- TODO Ignore group:flower
@ -78,7 +82,7 @@ farming.register_hoe = function(name, def)
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"
@ -251,7 +255,7 @@ farming.register_plant = function(name, def)
-- 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"

View File

@ -1,5 +1,10 @@
-- 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",
@ -7,7 +12,7 @@ farming.register_hoe(":farming:hoe_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",
@ -15,7 +20,7 @@ farming.register_hoe(":farming:hoe_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",
@ -28,21 +33,21 @@ farming.register_hoe(":farming:hoe_steel", {
-- 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},

View File

@ -1,8 +1,13 @@
-- 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
@ -14,7 +19,7 @@ dofile(farming.path .. "/hoes.lua")
-- WHEAT
farming.register_plant("farming:wheat", {
description = "Wheat Seed",
description = S("Wheat Seed"),
paramtype2 = "meshoptions",
inventory_image = "farming_wheat_seed.png",
steps = 8,
@ -26,13 +31,13 @@ farming.register_plant("farming:wheat", {
})
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},
@ -55,7 +60,7 @@ minetest.register_craft({
-- Cotton
farming.register_plant("farming:cotton", {
description = "Cotton Seed",
description = S("Cotton Seed"),
inventory_image = "farming_cotton_seed.png",
steps = 8,
minlight = 13,
@ -65,7 +70,7 @@ farming.register_plant("farming:cotton", {
})
minetest.register_craftitem("farming:string", {
description = "String",
description = S("String"),
inventory_image = "farming_string.png",
groups = {flammable = 2},
})

View File

@ -1,3 +1,8 @@
-- farming/nodes.lua
-- support for MT game translation.
local S = farming.get_translator
minetest.override_item("default:dirt", {
soil = {
base = "default:dirt",
@ -55,7 +60,7 @@ minetest.override_item("default:dry_dirt_with_dry_grass", {
})
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},
@ -68,7 +73,7 @@ minetest.register_node("farming:soil", {
})
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},
@ -115,7 +120,7 @@ minetest.override_item("default:desert_sand", {
}
})
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},
@ -128,7 +133,7 @@ minetest.register_node("farming:desert_sand_soil", {
})
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},
@ -141,7 +146,7 @@ minetest.register_node("farming:desert_sand_soil_wet", {
})
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},
@ -153,8 +158,8 @@ stairs.register_stair_and_slab(
"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
)

View File

@ -1,7 +1,13 @@
-- 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")
@ -82,7 +88,7 @@ minetest.register_node("fire:basic_flame", {
})
minetest.register_node("fire:permanent_flame", {
description = "Permanent Flame",
description = S("Permanent Flame"),
drawtype = "firelike",
tiles = {
{
@ -113,7 +119,7 @@ minetest.register_node("fire:permanent_flame", {
-- 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"},

View File

@ -1,6 +1,11 @@
-- 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",
@ -47,7 +52,7 @@ minetest.register_node("fireflies:firefly", {
})
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",
@ -84,7 +89,7 @@ minetest.register_node("fireflies:hidden_firefly", {
-- 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
@ -120,7 +125,7 @@ minetest.register_craft( {
-- 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 = {{

View File

@ -1,3 +1,5 @@
-- flowers/init.lua
-- Minetest 0.4 mod: default
-- See README.txt for licensing and other information.
@ -6,6 +8,9 @@
flowers = {}
-- Load support for MT game translation.
local S = minetest.get_translator("flowers")
-- Map Generation
@ -58,49 +63,49 @@ end
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}
},
@ -180,7 +185,7 @@ minetest.register_abm({
--
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",
@ -199,7 +204,7 @@ minetest.register_node("flowers:mushroom_red", {
})
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",
@ -267,7 +272,7 @@ minetest.register_alias("mushroom:red_natural", "flowers:mushroom_red")
--
local waterlily_def = {
description = "Waterlily",
description = S("Waterlily"),
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",

View File

@ -1,5 +1,11 @@
-- 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
@ -15,11 +21,11 @@ minetest.register_chatcommand("killme", {
-- 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
})

View File

@ -1,3 +1,5 @@
-- 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"

View File

@ -1,8 +1,14 @@
-- 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")
@ -49,7 +55,7 @@ minetest.after(5.3, cyclic_update)
-- 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},

View File

@ -1,3 +1,5 @@
-- player/init.lua
dofile(minetest.get_modpath("player_api") .. "/api.lua")
-- Default player appearance

View File

@ -1,5 +1,11 @@
-- 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)
@ -144,7 +150,7 @@ end
-- 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)

View File

@ -1,6 +1,11 @@
-- 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 = {}
@ -68,30 +73,30 @@ sethome.go = function(name)
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,
})

View File

@ -1,3 +1,5 @@
-- sfinv/init.lua
dofile(minetest.get_modpath("sfinv") .. "/api.lua")
sfinv.register_page("sfinv:crafting", {

View File

@ -1,3 +1,5 @@
-- spawn/init.lua
-- Disable by mapgen, setting or if 'static_spawnpoint' is set
--------------------------------------------------------------

View File

@ -1,3 +1,5 @@
-- stairs/init.lua
-- Minetest 0.4 mod: stairs
-- See README.txt for licensing and other information.
@ -6,6 +8,9 @@
stairs = {}
-- Load support for MT game translation.
local S = minetest.get_translator("stairs")
-- Register aliases for new pine node names
@ -317,7 +322,7 @@ function stairs.register_stair_inner(subname, recipeitem, groups, images,
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",
@ -399,7 +404,7 @@ function stairs.register_stair_outer(subname, recipeitem, groups, images,
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",
@ -472,8 +477,8 @@ stairs.register_stair_and_slab(
"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
)
@ -483,8 +488,8 @@ stairs.register_stair_and_slab(
"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
)
@ -494,8 +499,8 @@ stairs.register_stair_and_slab(
"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
)
@ -505,8 +510,8 @@ stairs.register_stair_and_slab(
"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
)
@ -516,8 +521,8 @@ stairs.register_stair_and_slab(
"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
)
@ -527,8 +532,8 @@ stairs.register_stair_and_slab(
"default:stone",
{cracky = 3},
{"default_stone.png"},
"Stone Stair",
"Stone Slab",
S("Stone Stair"),
S("Stone Slab"),
default.node_sound_stone_defaults(),
true
)
@ -538,8 +543,8 @@ stairs.register_stair_and_slab(
"default:cobble",
{cracky = 3},
{"default_cobble.png"},
"Cobblestone Stair",
"Cobblestone Slab",
S("Cobblestone Stair"),
S("Cobblestone Slab"),
default.node_sound_stone_defaults(),
true
)
@ -549,8 +554,8 @@ stairs.register_stair_and_slab(
"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
)
@ -560,8 +565,8 @@ stairs.register_stair_and_slab(
"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
)
@ -571,8 +576,8 @@ stairs.register_stair_and_slab(
"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
)
@ -582,8 +587,8 @@ stairs.register_stair_and_slab(
"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
)
@ -593,8 +598,8 @@ stairs.register_stair_and_slab(
"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
)
@ -604,8 +609,8 @@ stairs.register_stair_and_slab(
"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
)
@ -615,8 +620,8 @@ stairs.register_stair_and_slab(
"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
)
@ -626,8 +631,8 @@ stairs.register_stair_and_slab(
"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
)
@ -637,8 +642,8 @@ stairs.register_stair_and_slab(
"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
)
@ -648,8 +653,8 @@ stairs.register_stair_and_slab(
"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
)
@ -659,8 +664,8 @@ stairs.register_stair_and_slab(
"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
)
@ -670,8 +675,8 @@ stairs.register_stair_and_slab(
"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
)
@ -681,8 +686,8 @@ stairs.register_stair_and_slab(
"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
)
@ -692,8 +697,8 @@ stairs.register_stair_and_slab(
"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
)
@ -703,8 +708,8 @@ stairs.register_stair_and_slab(
"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
)
@ -714,8 +719,8 @@ stairs.register_stair_and_slab(
"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
)
@ -725,8 +730,8 @@ stairs.register_stair_and_slab(
"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
)
@ -736,8 +741,8 @@ stairs.register_stair_and_slab(
"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
)
@ -747,8 +752,8 @@ stairs.register_stair_and_slab(
"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
)
@ -758,8 +763,8 @@ stairs.register_stair_and_slab(
"default:brick",
{cracky = 3},
{"default_brick.png"},
"Brick Stair",
"Brick Slab",
S("Brick Stair"),
S("Brick Slab"),
default.node_sound_stone_defaults(),
false
)
@ -769,8 +774,8 @@ stairs.register_stair_and_slab(
"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
)
@ -780,8 +785,8 @@ stairs.register_stair_and_slab(
"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
)
@ -791,8 +796,8 @@ stairs.register_stair_and_slab(
"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
)
@ -802,8 +807,8 @@ stairs.register_stair_and_slab(
"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
)
@ -813,8 +818,8 @@ stairs.register_stair_and_slab(
"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
)
@ -824,8 +829,8 @@ stairs.register_stair_and_slab(
"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
)
@ -835,8 +840,8 @@ stairs.register_stair_and_slab(
"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
)
@ -850,7 +855,7 @@ stairs.register_stair(
{"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
)
@ -860,7 +865,7 @@ stairs.register_slab(
"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
)
@ -872,7 +877,7 @@ stairs.register_stair_inner(
{"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
)
@ -884,7 +889,7 @@ stairs.register_stair_outer(
{"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
)
@ -896,7 +901,7 @@ stairs.register_stair(
{"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
)
@ -906,7 +911,7 @@ stairs.register_slab(
"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
)
@ -918,7 +923,7 @@ stairs.register_stair_inner(
{"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
)
@ -930,7 +935,7 @@ stairs.register_stair_outer(
{"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
)

View File

@ -1,5 +1,11 @@
-- 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
@ -422,7 +428,7 @@ minetest.register_node("tnt:boom", {
})
minetest.register_node("tnt:gunpowder", {
description = "Gun Powder",
description = S("Gun Powder"),
drawtype = "raillike",
paramtype = "light",
is_ground_content = false,
@ -547,7 +553,7 @@ minetest.register_craft({
})
minetest.register_craftitem("tnt:tnt_stick", {
description = "TNT Stick",
description = S("TNT Stick"),
inventory_image = "tnt_tnt_stick.png",
groups = {flammable = 5},
})
@ -675,6 +681,6 @@ end
tnt.register_tnt({
name = "tnt:tnt",
description = "TNT",
description = S("TNT"),
radius = tnt_radius,
})

View File

@ -1,6 +1,12 @@
-- 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;]" ..
@ -30,7 +36,7 @@ local function get_vessels_shelf_formspec(inv)
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",
@ -91,7 +97,7 @@ minetest.register_craft({
})
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",
@ -117,7 +123,7 @@ minetest.register_craft( {
})
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",
@ -143,7 +149,7 @@ minetest.register_craft( {
})
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",
@ -172,7 +178,7 @@ minetest.register_craft( {
-- Glass and steel recycling
minetest.register_craftitem("vessels:glass_fragments", {
description = "Glass Fragments",
description = S("Glass Fragments"),
inventory_image = "vessels_glass_fragments.png",
})

View File

@ -1,5 +1,11 @@
-- 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
@ -39,12 +45,12 @@ walls.register = function(wall_name, wall_desc, wall_texture_table, wall_mat, wa
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())

View File

@ -1,10 +1,15 @@
-- 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,

View File

@ -1,3 +1,8 @@
-- 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
@ -148,7 +153,7 @@ function xpanes.register_pane(name, def)
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",
@ -161,7 +166,7 @@ xpanes.register_pane("pane", {
})
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",
@ -174,7 +179,7 @@ xpanes.register_pane("obsidian_pane", {
})
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",