Add support for MT 5 game translation

This commit is contained in:
Zweihorn 2019-05-13 22:18:27 +02:00 committed by Yves Quemener
parent d99a176b69
commit f4d49861f5
40 changed files with 624 additions and 427 deletions

View File

@ -1,7 +1,12 @@
-- beds/beds.lua
-- Load support for MT game translation.
local S = minetest.get_translator()
-- Fancy shaped bed -- Fancy shaped bed
beds.register_bed("beds:fancy_bed", { beds.register_bed("beds:fancy_bed", {
description = "Fancy Bed", description = S("Fancy Bed"),
inventory_image = "beds_bed_fancy.png", inventory_image = "beds_bed_fancy.png",
wield_image = "beds_bed_fancy.png", wield_image = "beds_bed_fancy.png",
tiles = { tiles = {
@ -52,7 +57,7 @@ beds.register_bed("beds:fancy_bed", {
-- Simple shaped bed -- Simple shaped bed
beds.register_bed("beds:bed", { beds.register_bed("beds:bed", {
description = "Simple Bed", description = S("Simple Bed"),
inventory_image = "beds_bed.png", inventory_image = "beds_bed.png",
wield_image = "beds_bed.png", wield_image = "beds_bed.png",
tiles = { tiles = {

View File

@ -1,7 +1,12 @@
-- binoculars/init.lua
-- Mod global namespace -- Mod global namespace
binoculars = {} binoculars = {}
-- Load support for MT game translation.
local S = minetest.get_translator()
-- Detect creative mod -- Detect creative mod
local creative_mod = minetest.get_modpath("creative") local creative_mod = minetest.get_modpath("creative")
@ -54,7 +59,7 @@ minetest.after(4.7, cyclic_update)
-- Binoculars item -- Binoculars item
minetest.register_craftitem("binoculars:binoculars", { minetest.register_craftitem("binoculars:binoculars", {
description = "Binoculars\nUse with 'Zoom' key", description = S("Binoculars\nUse with 'Zoom' key"),
inventory_image = "binoculars_binoculars.png", inventory_image = "binoculars_binoculars.png",
stack_max = 1, stack_max = 1,

View File

@ -1,3 +1,8 @@
-- boats/init.lua
-- Load support for MT game translation.
local S = minetest.get_translator()
-- --
-- Helper functions -- Helper functions
-- --
@ -149,13 +154,13 @@ function boat.on_step(self, dtime)
if ctrl.up and ctrl.down then if ctrl.up and ctrl.down then
if not self.auto then if not self.auto then
self.auto = true self.auto = true
minetest.chat_send_player(self.driver, "[boats] Cruise on") minetest.chat_send_player(self.driver, S("[boats] Cruise on"))
end end
elseif ctrl.down then elseif ctrl.down then
self.v = self.v - dtime * 1.8 self.v = self.v - dtime * 1.8
if self.auto then if self.auto then
self.auto = false self.auto = false
minetest.chat_send_player(self.driver, "[boats] Cruise off") minetest.chat_send_player(self.driver, S("[boats] Cruise off"))
end end
elseif ctrl.up or self.auto then elseif ctrl.up or self.auto then
self.v = self.v + dtime * 1.8 self.v = self.v + dtime * 1.8
@ -242,7 +247,7 @@ minetest.register_entity("boats:boat", boat)
minetest.register_craftitem("boats:boat", { minetest.register_craftitem("boats:boat", {
description = "Boat", description = S("Boat"),
inventory_image = "boats_inventory.png", inventory_image = "boats_inventory.png",
wield_image = "boats_wield.png", wield_image = "boats_wield.png",
wield_scale = {x = 2, y = 2, z = 1}, wield_scale = {x = 2, y = 2, z = 1},

View File

@ -1,6 +1,12 @@
-- bones/init.lua
-- Minetest 0.4 mod: bones -- Minetest 0.4 mod: bones
-- See README.txt for licensing and other information. -- 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 function is_owner(pos, name)
@ -24,7 +30,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 local share_bones_time_early = tonumber(minetest.settings:get("share_bones_time_early")) or share_bones_time / 4
minetest.register_node("bones:bones", { minetest.register_node("bones:bones", {
description = "Bones", description = S("Bones"),
tiles = { tiles = {
"bones_top.png^[transform2", "bones_top.png^[transform2",
"bones_bottom.png", "bones_bottom.png",
@ -116,7 +122,7 @@ minetest.register_node("bones:bones", {
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
local time = meta:get_int("time") + elapsed local time = meta:get_int("time") + elapsed
if time >= share_bones_time then 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", "") meta:set_string("owner", "")
else else
meta:set_int("time", time) meta:set_int("time", time)
@ -194,7 +200,7 @@ minetest.register_on_dieplayer(function(player)
minetest.log("action", player_name .. " dies at " .. pos_string .. minetest.log("action", player_name .. " dies at " .. pos_string ..
". No bones placed") ". No bones placed")
if bones_position_message then 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 end
return return
end end
@ -204,7 +210,7 @@ minetest.register_on_dieplayer(function(player)
minetest.log("action", player_name .. " dies at " .. pos_string .. minetest.log("action", player_name .. " dies at " .. pos_string ..
". No bones placed") ". No bones placed")
if bones_position_message then 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 end
return return
end end
@ -230,8 +236,9 @@ minetest.register_on_dieplayer(function(player)
minetest.log("action", player_name .. " dies at " .. pos_string .. minetest.log("action", player_name .. " dies at " .. pos_string ..
". Inventory dropped") ". Inventory dropped")
if bones_position_message then if bones_position_message then
minetest.chat_send_player(player_name, player_name .. " died at " .. pos_string .. minetest.chat_send_player(player_name,
", and dropped their inventory.") S("@1 died at @2, and dropped their inventory.",
player_name, pos_string))
end end
return return
end end
@ -242,8 +249,9 @@ minetest.register_on_dieplayer(function(player)
minetest.log("action", player_name .. " dies at " .. pos_string .. minetest.log("action", player_name .. " dies at " .. pos_string ..
". Bones placed") ". Bones placed")
if bones_position_message then if bones_position_message then
minetest.chat_send_player(player_name, player_name .. " died at " .. pos_string .. minetest.chat_send_player(player_name,
", and bones were placed.") S("@1 died at @2, and bones were placed.",
player_name, pos_string))
end end
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
@ -266,7 +274,7 @@ minetest.register_on_dieplayer(function(player)
meta:set_string("owner", player_name) meta:set_string("owner", player_name)
if share_bones_time ~= 0 then 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 if share_bones_time_early == 0 or not minetest.is_protected(pos, player_name) then
meta:set_int("time", 0) meta:set_int("time", 0)
@ -276,6 +284,6 @@ minetest.register_on_dieplayer(function(player)
minetest.get_node_timer(pos):start(10) minetest.get_node_timer(pos):start(10)
else else
meta:set_string("infotext", player_name.."'s bones") meta:set_string("infotext", S("@1's bones.", player_name))
end end
end) end)

View File

@ -1,6 +1,10 @@
-- Minetest 0.4 mod: bucket -- Minetest 0.4 mod: bucket
-- See README.txt for licensing and other information. -- See README.txt for licensing and other information.
-- Load support for MT game translation.
local S = minetest.get_translator()
minetest.register_alias("bucket", "bucket:bucket_empty") minetest.register_alias("bucket", "bucket:bucket_empty")
minetest.register_alias("bucket_water", "bucket:bucket_water") minetest.register_alias("bucket_water", "bucket:bucket_water")
minetest.register_alias("bucket_lava", "bucket:bucket_lava") minetest.register_alias("bucket_lava", "bucket:bucket_lava")
@ -111,7 +115,7 @@ function bucket.register_liquid(source, flowing, itemname, inventory_image, name
end end
minetest.register_craftitem("bucket:bucket_empty", { minetest.register_craftitem("bucket:bucket_empty", {
description = "Empty Bucket", description = S("Empty Bucket"),
inventory_image = "bucket.png", inventory_image = "bucket.png",
groups = {tool = 1}, groups = {tool = 1},
liquids_pointable = true, liquids_pointable = true,
@ -185,7 +189,7 @@ bucket.register_liquid(
"default:water_flowing", "default:water_flowing",
"bucket:bucket_water", "bucket:bucket_water",
"bucket_water.png", "bucket_water.png",
"Water Bucket", S("Water Bucket"),
{tool = 1, water_bucket = 1} {tool = 1, water_bucket = 1}
) )
@ -200,7 +204,7 @@ bucket.register_liquid(
"default:river_water_flowing", "default:river_water_flowing",
"bucket:bucket_river_water", "bucket:bucket_river_water",
"bucket_river_water.png", "bucket_river_water.png",
"River Water Bucket", S("River Water Bucket"),
{tool = 1, water_bucket = 1}, {tool = 1, water_bucket = 1},
true true
) )
@ -210,7 +214,7 @@ bucket.register_liquid(
"default:lava_flowing", "default:lava_flowing",
"bucket:bucket_lava", "bucket:bucket_lava",
"bucket_lava.png", "bucket_lava.png",
"Lava Bucket", S("Lava Bucket"),
{tool = 1} {tool = 1}
) )

View File

@ -1,8 +1,13 @@
-- butrerflies/init.lua
-- Load support for MT game translation.
local S = minetest.get_translator()
-- register butterflies -- register butterflies
local butter_list = { local butter_list = {
{"white", "White"}, {"white", S("White")},
{"red", "Red"}, {"red", S("Red")},
{"violet", "Violet"} {"violet", S("Violet")}
} }
for i in ipairs (butter_list) do for i in ipairs (butter_list) do
@ -10,7 +15,7 @@ for i in ipairs (butter_list) do
local desc = butter_list[i][2] local desc = butter_list[i][2]
minetest.register_node("butterflies:butterfly_"..name, { minetest.register_node("butterflies:butterfly_"..name, {
description = desc.." Butterfly", description = S("@1 Butterfly", desc),
drawtype = "plantlike", drawtype = "plantlike",
tiles = {{ tiles = {{
name = "butterflies_butterfly_"..name.."_animated.png", name = "butterflies_butterfly_"..name.."_animated.png",
@ -56,7 +61,7 @@ for i in ipairs (butter_list) do
}) })
minetest.register_node("butterflies:hidden_butterfly_"..name, { minetest.register_node("butterflies:hidden_butterfly_"..name, {
description = "Hidden "..desc.." Butterfly", description = S("Hidden @1 Butterfly", desc),
drawtype = "airlike", drawtype = "airlike",
inventory_image = "insects_butterfly_"..name..".png", inventory_image = "insects_butterfly_"..name..".png",
wield_image = "insects_butterfly_"..name..".png", wield_image = "insects_butterfly_"..name..".png",

View File

@ -1,3 +1,9 @@
-- carts/cart_entity.lua
-- Load support for MT game translation.
local S = minetest.get_translator()
local cart_entity = { local cart_entity = {
initial_properties = { initial_properties = {
physical = false, -- otherwise going uphill breaks physical = false, -- otherwise going uphill breaks
@ -383,7 +389,7 @@ end
minetest.register_entity("carts:cart", cart_entity) minetest.register_entity("carts:cart", cart_entity)
minetest.register_craftitem("carts:cart", { 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"), inventory_image = minetest.inventorycube("carts_cart_top.png", "carts_cart_side.png", "carts_cart_side.png"),
wield_image = "carts_cart_side.png", wield_image = "carts_cart_side.png",
on_place = function(itemstack, placer, pointed_thing) on_place = function(itemstack, placer, pointed_thing)

View File

@ -1,5 +1,10 @@
-- carts/rails.lua
-- Load support for MT game translation.
local S = minetest.get_translator()
carts:register_rail("carts:rail", { carts:register_rail("carts:rail", {
description = "Rail", description = S("Rail"),
tiles = { tiles = {
"carts_rail_straight.png", "carts_rail_curved.png", "carts_rail_straight.png", "carts_rail_curved.png",
"carts_rail_t_junction.png", "carts_rail_crossing.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", { carts:register_rail("carts:powerrail", {
description = "Powered Rail", description = S("Powered Rail"),
tiles = { tiles = {
"carts_rail_straight_pwr.png", "carts_rail_curved_pwr.png", "carts_rail_straight_pwr.png", "carts_rail_curved_pwr.png",
"carts_rail_t_junction_pwr.png", "carts_rail_crossing_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", { carts:register_rail("carts:brakerail", {
description = "Brake Rail", description = S("Brake Rail"),
tiles = { tiles = {
"carts_rail_straight_brk.png", "carts_rail_curved_brk.png", "carts_rail_straight_brk.png", "carts_rail_curved_brk.png",
"carts_rail_t_junction_brk.png", "carts_rail_crossing_brk.png" "carts_rail_t_junction_brk.png", "carts_rail_crossing_brk.png"

View File

@ -1,3 +1,9 @@
-- creative/init.lua
-- Load support for MT game translation.
local S = minetest.get_translator()
creative = {} creative = {}
local function update_sfinv(name) local function update_sfinv(name)
@ -14,7 +20,7 @@ local function update_sfinv(name)
end end
minetest.register_privilege("creative", { 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_singleplayer = false,
give_to_admin = false, give_to_admin = false,
on_grant = update_sfinv, on_grant = update_sfinv,

View File

@ -1,3 +1,9 @@
-- creative/inventory.lua
-- Load support for MT game translation.
local S = minetest.get_translator()
local player_inventory = {} local player_inventory = {}
local inventory_cache = {} local inventory_cache = {}
@ -174,10 +180,10 @@ function creative.register_tab(name, title, items)
}) })
end end
creative.register_tab("all", "All", minetest.registered_items) creative.register_tab("all", S("All"), minetest.registered_items)
creative.register_tab("nodes", "Nodes", minetest.registered_nodes) creative.register_tab("nodes", S("Nodes"), minetest.registered_nodes)
creative.register_tab("tools", "Tools", minetest.registered_tools) creative.register_tab("tools", S("Tools"), minetest.registered_tools)
creative.register_tab("craftitems", "Items", minetest.registered_craftitems) creative.register_tab("craftitems", S("Items"), minetest.registered_craftitems)
local old_homepage_name = sfinv.get_homepage_name local old_homepage_name = sfinv.get_homepage_name
function sfinv.get_homepage_name(player) function sfinv.get_homepage_name(player)

View File

@ -1,5 +1,8 @@
default.chest = {} default.chest = {}
-- Load support for MT game translation.
local S = minetest.get_translator()
function default.chest.get_chest_formspec(pos) function default.chest.get_chest_formspec(pos)
local spos = pos.x .. "," .. pos.y .. "," .. pos.z local spos = pos.x .. "," .. pos.y .. "," .. pos.z
local formspec = local formspec =
@ -84,7 +87,7 @@ function default.chest.register_chest(name, d)
if def.protected then if def.protected then
def.on_construct = function(pos) def.on_construct = function(pos)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
meta:set_string("infotext", "Locked Chest") meta:set_string("infotext", S("Locked Chest"))
meta:set_string("owner", "") meta:set_string("owner", "")
local inv = meta:get_inventory() local inv = meta:get_inventory()
inv:set_size("main", 8*4) inv:set_size("main", 8*4)
@ -92,8 +95,8 @@ function default.chest.register_chest(name, d)
def.after_place_node = function(pos, placer) def.after_place_node = function(pos, placer)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
meta:set_string("owner", placer:get_player_name() or "") meta:set_string("owner", placer:get_player_name() or "")
meta:set_string("infotext", "Locked Chest (owned by " .. meta:set_string("infotext", S("Locked Chest (owned by @1)",
meta:get_string("owner") .. ")") meta:get_string("owner")))
end end
def.can_dig = function(pos,player) def.can_dig = function(pos,player)
local meta = minetest.get_meta(pos); local meta = minetest.get_meta(pos);
@ -171,7 +174,7 @@ function default.chest.register_chest(name, d)
-- verify placer is owner of lockable chest -- verify placer is owner of lockable chest
if owner ~= pn then if owner ~= pn then
minetest.record_protection_violation(pos, pn) 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 return nil
end end
@ -181,12 +184,12 @@ function default.chest.register_chest(name, d)
meta:set_string("key_lock_secret", secret) meta:set_string("key_lock_secret", secret)
end end
return secret, "a locked chest", owner return secret, S("a locked chest"), owner
end end
else else
def.on_construct = function(pos) def.on_construct = function(pos)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
meta:set_string("infotext", "Chest") meta:set_string("infotext", S("Chest"))
local inv = meta:get_inventory() local inv = meta:get_inventory()
inv:set_size("main", 8*4) inv:set_size("main", 8*4)
end end
@ -285,7 +288,7 @@ function default.chest.register_chest(name, d)
end end
default.chest.register_chest("chest", { default.chest.register_chest("chest", {
description = "Chest", description = S("Chest"),
tiles = { tiles = {
"default_chest_top.png", "default_chest_top.png",
"default_chest_top.png", "default_chest_top.png",
@ -301,7 +304,7 @@ default.chest.register_chest("chest", {
}) })
default.chest.register_chest("chest_locked", { default.chest.register_chest("chest_locked", {
description = "Locked Chest", description = S("Locked Chest"),
tiles = { tiles = {
"default_chest_top.png", "default_chest_top.png",
"default_chest_top.png", "default_chest_top.png",

View File

@ -1,13 +1,16 @@
-- mods/default/craftitems.lua -- mods/default/craftitems.lua
-- Load support for MT game translation.
local S = minetest.get_translator()
minetest.register_craftitem("default:stick", { minetest.register_craftitem("default:stick", {
description = "Stick", description = S("Stick"),
inventory_image = "default_stick.png", inventory_image = "default_stick.png",
groups = {stick = 1, flammable = 2}, groups = {stick = 1, flammable = 2},
}) })
minetest.register_craftitem("default:paper", { minetest.register_craftitem("default:paper", {
description = "Paper", description = S("Paper"),
inventory_image = "default_paper.png", inventory_image = "default_paper.png",
groups = {flammable = 3}, groups = {flammable = 3},
}) })
@ -108,7 +111,9 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
if #short_title > short_title_size + 3 then if #short_title > short_title_size + 3 then
short_title = short_title:sub(1, short_title_size) .. "..." short_title = short_title:sub(1, short_title_size) .. "..."
end end
data.description = "\""..short_title.."\" by "..data.owner -- Make description appropriate to intllib
-- 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 = fields.text:sub(1, max_text_size)
data.text = data.text:gsub("\r\n", "\n"):gsub("\r", "\n") data.text = data.text:gsub("\r\n", "\n"):gsub("\r", "\n")
data.page = 1 data.page = 1
@ -155,14 +160,14 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
end) end)
minetest.register_craftitem("default:book", { minetest.register_craftitem("default:book", {
description = "Book", description = S("Book"),
inventory_image = "default_book.png", inventory_image = "default_book.png",
groups = {book = 1, flammable = 3}, groups = {book = 1, flammable = 3},
on_use = book_on_use, on_use = book_on_use,
}) })
minetest.register_craftitem("default:book_written", { minetest.register_craftitem("default:book_written", {
description = "Book With Text", description = S("Book With Text"),
inventory_image = "default_book_written.png", inventory_image = "default_book_written.png",
groups = {book = 1, not_in_creative_inventory = 1, flammable = 3}, groups = {book = 1, not_in_creative_inventory = 1, flammable = 3},
stack_max = 1, stack_max = 1,
@ -199,7 +204,7 @@ minetest.register_on_craft(function(itemstack, player, old_craft_grid, craft_inv
end) end)
minetest.register_craftitem("default:skeleton_key", { minetest.register_craftitem("default:skeleton_key", {
description = "Skeleton Key", description = S("Skeleton Key"),
inventory_image = "default_key_skeleton.png", inventory_image = "default_key_skeleton.png",
groups = {key = 1}, groups = {key = 1},
on_use = function(itemstack, user, pointed_thing) on_use = function(itemstack, user, pointed_thing)
@ -255,93 +260,93 @@ minetest.register_craftitem("default:skeleton_key", {
}) })
minetest.register_craftitem("default:coal_lump", { minetest.register_craftitem("default:coal_lump", {
description = "Coal Lump", description = S("Coal Lump"),
inventory_image = "default_coal_lump.png", inventory_image = "default_coal_lump.png",
groups = {coal = 1, flammable = 1} groups = {coal = 1, flammable = 1}
}) })
minetest.register_craftitem("default:iron_lump", { minetest.register_craftitem("default:iron_lump", {
description = "Iron Lump", description = S("Iron Lump"),
inventory_image = "default_iron_lump.png" inventory_image = "default_iron_lump.png"
}) })
minetest.register_craftitem("default:copper_lump", { minetest.register_craftitem("default:copper_lump", {
description = "Copper Lump", description = S("Copper Lump"),
inventory_image = "default_copper_lump.png" inventory_image = "default_copper_lump.png"
}) })
minetest.register_craftitem("default:tin_lump", { minetest.register_craftitem("default:tin_lump", {
description = "Tin Lump", description = S("Tin Lump"),
inventory_image = "default_tin_lump.png" inventory_image = "default_tin_lump.png"
}) })
minetest.register_craftitem("default:mese_crystal", { minetest.register_craftitem("default:mese_crystal", {
description = "Mese Crystal", description = S("Mese Crystal"),
inventory_image = "default_mese_crystal.png", inventory_image = "default_mese_crystal.png",
}) })
minetest.register_craftitem("default:gold_lump", { minetest.register_craftitem("default:gold_lump", {
description = "Gold Lump", description = S("Gold Lump"),
inventory_image = "default_gold_lump.png" inventory_image = "default_gold_lump.png"
}) })
minetest.register_craftitem("default:diamond", { minetest.register_craftitem("default:diamond", {
description = "Diamond", description = S("Diamond"),
inventory_image = "default_diamond.png", inventory_image = "default_diamond.png",
}) })
minetest.register_craftitem("default:clay_lump", { minetest.register_craftitem("default:clay_lump", {
description = "Clay Lump", description = S("Clay Lump"),
inventory_image = "default_clay_lump.png", inventory_image = "default_clay_lump.png",
}) })
minetest.register_craftitem("default:steel_ingot", { minetest.register_craftitem("default:steel_ingot", {
description = "Steel Ingot", description = S("Steel Ingot"),
inventory_image = "default_steel_ingot.png" inventory_image = "default_steel_ingot.png"
}) })
minetest.register_craftitem("default:copper_ingot", { minetest.register_craftitem("default:copper_ingot", {
description = "Copper Ingot", description = S("Copper Ingot"),
inventory_image = "default_copper_ingot.png" inventory_image = "default_copper_ingot.png"
}) })
minetest.register_craftitem("default:tin_ingot", { minetest.register_craftitem("default:tin_ingot", {
description = "Tin Ingot", description = S("Tin Ingot"),
inventory_image = "default_tin_ingot.png" inventory_image = "default_tin_ingot.png"
}) })
minetest.register_craftitem("default:bronze_ingot", { minetest.register_craftitem("default:bronze_ingot", {
description = "Bronze Ingot", description = S("Bronze Ingot"),
inventory_image = "default_bronze_ingot.png" inventory_image = "default_bronze_ingot.png"
}) })
minetest.register_craftitem("default:gold_ingot", { minetest.register_craftitem("default:gold_ingot", {
description = "Gold Ingot", description = S("Gold Ingot"),
inventory_image = "default_gold_ingot.png" inventory_image = "default_gold_ingot.png"
}) })
minetest.register_craftitem("default:mese_crystal_fragment", { minetest.register_craftitem("default:mese_crystal_fragment", {
description = "Mese Crystal Fragment", description = S("Mese Crystal Fragment"),
inventory_image = "default_mese_crystal_fragment.png", inventory_image = "default_mese_crystal_fragment.png",
}) })
minetest.register_craftitem("default:clay_brick", { minetest.register_craftitem("default:clay_brick", {
description = "Clay Brick", description = S("Clay Brick"),
inventory_image = "default_clay_brick.png", inventory_image = "default_clay_brick.png",
}) })
minetest.register_craftitem("default:obsidian_shard", { minetest.register_craftitem("default:obsidian_shard", {
description = "Obsidian Shard", description = S("Obsidian Shard"),
inventory_image = "default_obsidian_shard.png", inventory_image = "default_obsidian_shard.png",
}) })
minetest.register_craftitem("default:flint", { minetest.register_craftitem("default:flint", {
description = "Flint", description = S("Flint"),
inventory_image = "default_flint.png" inventory_image = "default_flint.png"
}) })
minetest.register_craftitem("default:blueberries", { minetest.register_craftitem("default:blueberries", {
description = "Blueberries", description = S("Blueberries"),
inventory_image = "default_blueberries.png", inventory_image = "default_blueberries.png",
groups = {food_blueberries = 1, food_berry = 1}, groups = {food_blueberries = 1, food_berry = 1},
on_use = minetest.item_eat(2), on_use = minetest.item_eat(2),

View File

@ -1,3 +1,8 @@
-- default/furnace.lua
-- Load support for MT game translation.
local S = minetest.get_translator()
-- --
-- Formspecs -- Formspecs
@ -60,7 +65,7 @@ local function allow_metadata_inventory_put(pos, listname, index, stack, player)
if listname == "fuel" then if listname == "fuel" then
if minetest.get_craft_result({method="fuel", width=1, items={stack}}).time ~= 0 then if minetest.get_craft_result({method="fuel", width=1, items={stack}}).time ~= 0 then
if inv:is_empty("src") then if inv:is_empty("src") then
meta:set_string("infotext", "Furnace is empty") meta:set_string("infotext", S("Furnace is empty"))
end end
return stack:get_count() return stack:get_count()
else else
@ -209,19 +214,19 @@ local function furnace_node_timer(pos, elapsed)
if cookable then if cookable then
item_percent = math.floor(src_time / cooked.time * 100) item_percent = math.floor(src_time / cooked.time * 100)
if dst_full then if dst_full then
item_state = "100% (output full)" item_state = S("100% (output full)")
else else
item_state = item_percent .. "%" item_state = S("@1%", item_percent)
end end
else else
if srclist[1]:is_empty() then if srclist[1]:is_empty() then
item_state = "Empty" item_state = S("Empty")
else else
item_state = "Not cookable" item_state = S("Not cookable")
end end
end end
local fuel_state = "Empty" local fuel_state = S("Empty")
local active = "inactive" local active = "inactive"
local result = false local result = false
@ -243,8 +248,10 @@ local function furnace_node_timer(pos, elapsed)
minetest.get_node_timer(pos):stop() minetest.get_node_timer(pos):stop()
end end
local infotext = "Furnace " .. active .. "\n(Item: " .. item_state .. -- local infotext = "Furnace " .. active .. "\n(Item: " .. item_state ..
"; Fuel: " .. fuel_state .. ")" -- "; Fuel: " .. fuel_state .. ")"
local infotext = S("Furnace @1 \n(Item: @2; Fuel: @3)", active,
item_state, fuel_state)
-- --
-- Set meta values -- Set meta values
@ -263,7 +270,7 @@ end
-- --
minetest.register_node("default:furnace", { minetest.register_node("default:furnace", {
description = "Furnace", description = S("Furnace"),
tiles = { tiles = {
"default_furnace_top.png", "default_furnace_bottom.png", "default_furnace_top.png", "default_furnace_bottom.png",
"default_furnace_side.png", "default_furnace_side.png", "default_furnace_side.png", "default_furnace_side.png",
@ -311,7 +318,7 @@ minetest.register_node("default:furnace", {
}) })
minetest.register_node("default:furnace_active", { minetest.register_node("default:furnace_active", {
description = "Furnace", description = S("Furnace"),
tiles = { tiles = {
"default_furnace_top.png", "default_furnace_bottom.png", "default_furnace_top.png", "default_furnace_bottom.png",
"default_furnace_side.png", "default_furnace_side.png", "default_furnace_side.png", "default_furnace_side.png",

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,8 @@
-- mods/default/tools.lua -- mods/default/tools.lua
-- Load support for MT game translation.
local S = minetest.get_translator()
-- The hand -- The hand
minetest.register_item(":", { minetest.register_item(":", {
type = "none", type = "none",
@ -22,7 +25,7 @@ minetest.register_item(":", {
-- --
minetest.register_tool("default:pick_wood", { minetest.register_tool("default:pick_wood", {
description = "Wooden Pickaxe", description = S("Wooden Pickaxe"),
inventory_image = "default_tool_woodpick.png", inventory_image = "default_tool_woodpick.png",
tool_capabilities = { tool_capabilities = {
full_punch_interval = 1.2, full_punch_interval = 1.2,
@ -37,7 +40,7 @@ minetest.register_tool("default:pick_wood", {
}) })
minetest.register_tool("default:pick_stone", { minetest.register_tool("default:pick_stone", {
description = "Stone Pickaxe", description = S("Stone Pickaxe"),
inventory_image = "default_tool_stonepick.png", inventory_image = "default_tool_stonepick.png",
tool_capabilities = { tool_capabilities = {
full_punch_interval = 1.3, full_punch_interval = 1.3,
@ -52,7 +55,7 @@ minetest.register_tool("default:pick_stone", {
}) })
minetest.register_tool("default:pick_bronze", { minetest.register_tool("default:pick_bronze", {
description = "Bronze Pickaxe", description = S("Bronze Pickaxe"),
inventory_image = "default_tool_bronzepick.png", inventory_image = "default_tool_bronzepick.png",
tool_capabilities = { tool_capabilities = {
full_punch_interval = 1.0, full_punch_interval = 1.0,
@ -67,7 +70,7 @@ minetest.register_tool("default:pick_bronze", {
}) })
minetest.register_tool("default:pick_steel", { minetest.register_tool("default:pick_steel", {
description = "Steel Pickaxe", description = S("Steel Pickaxe"),
inventory_image = "default_tool_steelpick.png", inventory_image = "default_tool_steelpick.png",
tool_capabilities = { tool_capabilities = {
full_punch_interval = 1.0, full_punch_interval = 1.0,
@ -82,7 +85,7 @@ minetest.register_tool("default:pick_steel", {
}) })
minetest.register_tool("default:pick_mese", { minetest.register_tool("default:pick_mese", {
description = "Mese Pickaxe", description = S("Mese Pickaxe"),
inventory_image = "default_tool_mesepick.png", inventory_image = "default_tool_mesepick.png",
tool_capabilities = { tool_capabilities = {
full_punch_interval = 0.9, full_punch_interval = 0.9,
@ -97,7 +100,7 @@ minetest.register_tool("default:pick_mese", {
}) })
minetest.register_tool("default:pick_diamond", { minetest.register_tool("default:pick_diamond", {
description = "Diamond Pickaxe", description = S("Diamond Pickaxe"),
inventory_image = "default_tool_diamondpick.png", inventory_image = "default_tool_diamondpick.png",
tool_capabilities = { tool_capabilities = {
full_punch_interval = 0.9, full_punch_interval = 0.9,
@ -116,7 +119,7 @@ minetest.register_tool("default:pick_diamond", {
-- --
minetest.register_tool("default:shovel_wood", { minetest.register_tool("default:shovel_wood", {
description = "Wooden Shovel", description = S("Wooden Shovel"),
inventory_image = "default_tool_woodshovel.png", inventory_image = "default_tool_woodshovel.png",
wield_image = "default_tool_woodshovel.png^[transformR90", wield_image = "default_tool_woodshovel.png^[transformR90",
tool_capabilities = { tool_capabilities = {
@ -132,7 +135,7 @@ minetest.register_tool("default:shovel_wood", {
}) })
minetest.register_tool("default:shovel_stone", { minetest.register_tool("default:shovel_stone", {
description = "Stone Shovel", description = S("Stone Shovel"),
inventory_image = "default_tool_stoneshovel.png", inventory_image = "default_tool_stoneshovel.png",
wield_image = "default_tool_stoneshovel.png^[transformR90", wield_image = "default_tool_stoneshovel.png^[transformR90",
tool_capabilities = { tool_capabilities = {
@ -148,7 +151,7 @@ minetest.register_tool("default:shovel_stone", {
}) })
minetest.register_tool("default:shovel_bronze", { minetest.register_tool("default:shovel_bronze", {
description = "Bronze Shovel", description = S("Bronze Shovel"),
inventory_image = "default_tool_bronzeshovel.png", inventory_image = "default_tool_bronzeshovel.png",
wield_image = "default_tool_bronzeshovel.png^[transformR90", wield_image = "default_tool_bronzeshovel.png^[transformR90",
tool_capabilities = { tool_capabilities = {
@ -164,7 +167,7 @@ minetest.register_tool("default:shovel_bronze", {
}) })
minetest.register_tool("default:shovel_steel", { minetest.register_tool("default:shovel_steel", {
description = "Steel Shovel", description = S("Steel Shovel"),
inventory_image = "default_tool_steelshovel.png", inventory_image = "default_tool_steelshovel.png",
wield_image = "default_tool_steelshovel.png^[transformR90", wield_image = "default_tool_steelshovel.png^[transformR90",
tool_capabilities = { tool_capabilities = {
@ -180,7 +183,7 @@ minetest.register_tool("default:shovel_steel", {
}) })
minetest.register_tool("default:shovel_mese", { minetest.register_tool("default:shovel_mese", {
description = "Mese Shovel", description = S("Mese Shovel"),
inventory_image = "default_tool_meseshovel.png", inventory_image = "default_tool_meseshovel.png",
wield_image = "default_tool_meseshovel.png^[transformR90", wield_image = "default_tool_meseshovel.png^[transformR90",
tool_capabilities = { tool_capabilities = {
@ -196,7 +199,7 @@ minetest.register_tool("default:shovel_mese", {
}) })
minetest.register_tool("default:shovel_diamond", { minetest.register_tool("default:shovel_diamond", {
description = "Diamond Shovel", description = S("Diamond Shovel"),
inventory_image = "default_tool_diamondshovel.png", inventory_image = "default_tool_diamondshovel.png",
wield_image = "default_tool_diamondshovel.png^[transformR90", wield_image = "default_tool_diamondshovel.png^[transformR90",
tool_capabilities = { tool_capabilities = {
@ -216,7 +219,7 @@ minetest.register_tool("default:shovel_diamond", {
-- --
minetest.register_tool("default:axe_wood", { minetest.register_tool("default:axe_wood", {
description = "Wooden Axe", description = S("Wooden Axe"),
inventory_image = "default_tool_woodaxe.png", inventory_image = "default_tool_woodaxe.png",
tool_capabilities = { tool_capabilities = {
full_punch_interval = 1.0, full_punch_interval = 1.0,
@ -231,7 +234,7 @@ minetest.register_tool("default:axe_wood", {
}) })
minetest.register_tool("default:axe_stone", { minetest.register_tool("default:axe_stone", {
description = "Stone Axe", description = S("Stone Axe"),
inventory_image = "default_tool_stoneaxe.png", inventory_image = "default_tool_stoneaxe.png",
tool_capabilities = { tool_capabilities = {
full_punch_interval = 1.2, full_punch_interval = 1.2,
@ -246,7 +249,7 @@ minetest.register_tool("default:axe_stone", {
}) })
minetest.register_tool("default:axe_bronze", { minetest.register_tool("default:axe_bronze", {
description = "Bronze Axe", description = S("Bronze Axe"),
inventory_image = "default_tool_bronzeaxe.png", inventory_image = "default_tool_bronzeaxe.png",
tool_capabilities = { tool_capabilities = {
full_punch_interval = 1.0, full_punch_interval = 1.0,
@ -261,7 +264,7 @@ minetest.register_tool("default:axe_bronze", {
}) })
minetest.register_tool("default:axe_steel", { minetest.register_tool("default:axe_steel", {
description = "Steel Axe", description = S("Steel Axe"),
inventory_image = "default_tool_steelaxe.png", inventory_image = "default_tool_steelaxe.png",
tool_capabilities = { tool_capabilities = {
full_punch_interval = 1.0, full_punch_interval = 1.0,
@ -276,7 +279,7 @@ minetest.register_tool("default:axe_steel", {
}) })
minetest.register_tool("default:axe_mese", { minetest.register_tool("default:axe_mese", {
description = "Mese Axe", description = S("Mese Axe"),
inventory_image = "default_tool_meseaxe.png", inventory_image = "default_tool_meseaxe.png",
tool_capabilities = { tool_capabilities = {
full_punch_interval = 0.9, full_punch_interval = 0.9,
@ -291,7 +294,7 @@ minetest.register_tool("default:axe_mese", {
}) })
minetest.register_tool("default:axe_diamond", { minetest.register_tool("default:axe_diamond", {
description = "Diamond Axe", description = S("Diamond Axe"),
inventory_image = "default_tool_diamondaxe.png", inventory_image = "default_tool_diamondaxe.png",
tool_capabilities = { tool_capabilities = {
full_punch_interval = 0.9, full_punch_interval = 0.9,
@ -310,7 +313,7 @@ minetest.register_tool("default:axe_diamond", {
-- --
minetest.register_tool("default:sword_wood", { minetest.register_tool("default:sword_wood", {
description = "Wooden Sword", description = S("Wooden Sword"),
inventory_image = "default_tool_woodsword.png", inventory_image = "default_tool_woodsword.png",
tool_capabilities = { tool_capabilities = {
full_punch_interval = 1, full_punch_interval = 1,
@ -325,7 +328,7 @@ minetest.register_tool("default:sword_wood", {
}) })
minetest.register_tool("default:sword_stone", { minetest.register_tool("default:sword_stone", {
description = "Stone Sword", description = S("Stone Sword"),
inventory_image = "default_tool_stonesword.png", inventory_image = "default_tool_stonesword.png",
tool_capabilities = { tool_capabilities = {
full_punch_interval = 1.2, full_punch_interval = 1.2,
@ -340,7 +343,7 @@ minetest.register_tool("default:sword_stone", {
}) })
minetest.register_tool("default:sword_bronze", { minetest.register_tool("default:sword_bronze", {
description = "Bronze Sword", description = S("Bronze Sword"),
inventory_image = "default_tool_bronzesword.png", inventory_image = "default_tool_bronzesword.png",
tool_capabilities = { tool_capabilities = {
full_punch_interval = 0.8, full_punch_interval = 0.8,
@ -355,7 +358,7 @@ minetest.register_tool("default:sword_bronze", {
}) })
minetest.register_tool("default:sword_steel", { minetest.register_tool("default:sword_steel", {
description = "Steel Sword", description = S("Steel Sword"),
inventory_image = "default_tool_steelsword.png", inventory_image = "default_tool_steelsword.png",
tool_capabilities = { tool_capabilities = {
full_punch_interval = 0.8, full_punch_interval = 0.8,
@ -370,7 +373,7 @@ minetest.register_tool("default:sword_steel", {
}) })
minetest.register_tool("default:sword_mese", { minetest.register_tool("default:sword_mese", {
description = "Mese Sword", description = S("Mese Sword"),
inventory_image = "default_tool_mesesword.png", inventory_image = "default_tool_mesesword.png",
tool_capabilities = { tool_capabilities = {
full_punch_interval = 0.7, full_punch_interval = 0.7,
@ -385,7 +388,7 @@ minetest.register_tool("default:sword_mese", {
}) })
minetest.register_tool("default:sword_diamond", { minetest.register_tool("default:sword_diamond", {
description = "Diamond Sword", description = S("Diamond Sword"),
inventory_image = "default_tool_diamondsword.png", inventory_image = "default_tool_diamondsword.png",
tool_capabilities = { tool_capabilities = {
full_punch_interval = 0.7, full_punch_interval = 0.7,
@ -400,7 +403,7 @@ minetest.register_tool("default:sword_diamond", {
}) })
minetest.register_tool("default:key", { minetest.register_tool("default:key", {
description = "Key", description = S("Key"),
inventory_image = "default_key.png", inventory_image = "default_key.png",
groups = {key = 1, not_in_creative_inventory = 1}, groups = {key = 1, not_in_creative_inventory = 1},
stack_max = 1, stack_max = 1,

View File

@ -1,3 +1,8 @@
-- default/torch.lua
-- Load support for MT game translation.
local S = minetest.get_translator()
local function on_flood(pos, oldnode, newnode) local function on_flood(pos, oldnode, newnode)
minetest.add_item(pos, ItemStack("default:torch 1")) minetest.add_item(pos, ItemStack("default:torch 1"))
-- Play flame-extinguish sound if liquid is not an 'igniter' -- Play flame-extinguish sound if liquid is not an 'igniter'
@ -14,7 +19,7 @@ local function on_flood(pos, oldnode, newnode)
end end
minetest.register_node("default:torch", { minetest.register_node("default:torch", {
description = "Torch", description = S("Torch"),
drawtype = "mesh", drawtype = "mesh",
mesh = "torch_floor.obj", mesh = "torch_floor.obj",
inventory_image = "default_torch_on_floor.png", inventory_image = "default_torch_on_floor.png",

View File

@ -1,3 +1,9 @@
-- default/trees.lua
-- Load support for MT game translation.
local S = minetest.get_translator()
local random = math.random local random = math.random
-- --
@ -560,9 +566,12 @@ function default.sapling_on_place(itemstack, placer, pointed_thing,
interval) then interval) then
minetest.record_protection_violation(pos, player_name) minetest.record_protection_violation(pos, player_name)
-- Print extra information to explain -- 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, minetest.chat_send_player(player_name,
itemstack:get_definition().description .. " will intersect protection " .. S("@1 will intersect protection on growth.",
"on growth") itemstack:get_definition().description))
return itemstack return itemstack
end end

View File

@ -1,9 +1,15 @@
-- doors/init.lua
-- our API object -- our API object
doors = {} doors = {}
doors.registered_doors = {} doors.registered_doors = {}
doors.registered_trapdoors = {} doors.registered_trapdoors = {}
-- Load support for MT game translation.
local S = minetest.get_translator()
local function replace_old_owner_information(pos) local function replace_old_owner_information(pos)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
local owner = meta:get_string("doors_owner") local owner = meta:get_string("doors_owner")
@ -71,7 +77,7 @@ end
-- this hidden node is placed on top of the bottom, and prevents -- this hidden node is placed on top of the bottom, and prevents
-- nodes from being placed in the top half of the door. -- nodes from being placed in the top half of the door.
minetest.register_node("doors:hidden", { 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 -- can't use airlike otherwise falling nodes will turn to entities
-- and will be forever stuck until door is removed. -- and will be forever stuck until door is removed.
drawtype = "nodebox", drawtype = "nodebox",
@ -327,7 +333,7 @@ function doors.register(name, def)
if def.protected then if def.protected then
meta:set_string("owner", pn) meta:set_string("owner", pn)
meta:set_string("infotext", "Owned by " .. pn) meta:set_string("infotext", S("Owned by @1", pn))
end end
if not (creative and creative.is_enabled_for and creative.is_enabled_for(pn)) then 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 -- verify placer is owner of lockable door
if owner ~= pname then if owner ~= pname then
minetest.record_protection_violation(pos, pname) 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 return nil
end end
@ -449,7 +455,7 @@ end
doors.register("door_wood", { doors.register("door_wood", {
tiles = {{ name = "doors_door_wood.png", backface_culling = true }}, tiles = {{ name = "doors_door_wood.png", backface_culling = true }},
description = "Wooden Door", description = S("Wooden Door"),
inventory_image = "doors_item_wood.png", inventory_image = "doors_item_wood.png",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
recipe = { recipe = {
@ -461,7 +467,7 @@ doors.register("door_wood", {
doors.register("door_steel", { doors.register("door_steel", {
tiles = {{name = "doors_door_steel.png", backface_culling = true}}, tiles = {{name = "doors_door_steel.png", backface_culling = true}},
description = "Steel Door", description = S("Steel Door"),
inventory_image = "doors_item_steel.png", inventory_image = "doors_item_steel.png",
protected = true, protected = true,
groups = {cracky = 1, level = 2}, groups = {cracky = 1, level = 2},
@ -477,7 +483,7 @@ doors.register("door_steel", {
doors.register("door_glass", { doors.register("door_glass", {
tiles = {"doors_door_glass.png"}, tiles = {"doors_door_glass.png"},
description = "Glass Door", description = S("Glass Door"),
inventory_image = "doors_item_glass.png", inventory_image = "doors_item_glass.png",
groups = {cracky=3, oddly_breakable_by_hand=3}, groups = {cracky=3, oddly_breakable_by_hand=3},
sounds = default.node_sound_glass_defaults(), sounds = default.node_sound_glass_defaults(),
@ -492,7 +498,7 @@ doors.register("door_glass", {
doors.register("door_obsidian_glass", { doors.register("door_obsidian_glass", {
tiles = {"doors_door_obsidian_glass.png"}, tiles = {"doors_door_obsidian_glass.png"},
description = "Obsidian Glass Door", description = S("Obsidian Glass Door"),
inventory_image = "doors_item_obsidian_glass.png", inventory_image = "doors_item_obsidian_glass.png",
groups = {cracky=3}, groups = {cracky=3},
sounds = default.node_sound_glass_defaults(), sounds = default.node_sound_glass_defaults(),
@ -580,7 +586,7 @@ function doors.register_trapdoor(name, def)
local pn = placer:get_player_name() local pn = placer:get_player_name()
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
meta:set_string("owner", pn) 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)) return (creative and creative.is_enabled_for and creative.is_enabled_for(pn))
end end
@ -599,7 +605,7 @@ function doors.register_trapdoor(name, def)
-- verify placer is owner of lockable door -- verify placer is owner of lockable door
if owner ~= pname then if owner ~= pname then
minetest.record_protection_violation(pos, pname) 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 return nil
end end
@ -679,7 +685,7 @@ function doors.register_trapdoor(name, def)
end end
doors.register_trapdoor("doors:trapdoor", { doors.register_trapdoor("doors:trapdoor", {
description = "Wooden Trapdoor", description = S("Wooden Trapdoor"),
inventory_image = "doors_trapdoor.png", inventory_image = "doors_trapdoor.png",
wield_image = "doors_trapdoor.png", wield_image = "doors_trapdoor.png",
tile_front = "doors_trapdoor.png", tile_front = "doors_trapdoor.png",
@ -688,7 +694,7 @@ doors.register_trapdoor("doors:trapdoor", {
}) })
doors.register_trapdoor("doors:trapdoor_steel", { doors.register_trapdoor("doors:trapdoor_steel", {
description = "Steel Trapdoor", description = S("Steel Trapdoor"),
inventory_image = "doors_trapdoor_steel.png", inventory_image = "doors_trapdoor_steel.png",
wield_image = "doors_trapdoor_steel.png", wield_image = "doors_trapdoor_steel.png",
tile_front = "doors_trapdoor_steel.png", tile_front = "doors_trapdoor_steel.png",
@ -795,35 +801,35 @@ function doors.register_fencegate(name, def)
end end
doors.register_fencegate("doors:gate_wood", { doors.register_fencegate("doors:gate_wood", {
description = "Apple Wood Fence Gate", description = S("Apple Wood Fence Gate"),
texture = "default_wood.png", texture = "default_wood.png",
material = "default:wood", material = "default:wood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2} groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}
}) })
doors.register_fencegate("doors:gate_acacia_wood", { doors.register_fencegate("doors:gate_acacia_wood", {
description = "Acacia Wood Fence Gate", description = S("Acacia Wood Fence Gate"),
texture = "default_acacia_wood.png", texture = "default_acacia_wood.png",
material = "default:acacia_wood", material = "default:acacia_wood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2} groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}
}) })
doors.register_fencegate("doors:gate_junglewood", { doors.register_fencegate("doors:gate_junglewood", {
description = "Jungle Wood Fence Gate", description = S("Jungle Wood Fence Gate"),
texture = "default_junglewood.png", texture = "default_junglewood.png",
material = "default:junglewood", material = "default:junglewood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2} groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}
}) })
doors.register_fencegate("doors:gate_pine_wood", { doors.register_fencegate("doors:gate_pine_wood", {
description = "Pine Wood Fence Gate", description = S("Pine Wood Fence Gate"),
texture = "default_pine_wood.png", texture = "default_pine_wood.png",
material = "default:pine_wood", material = "default:pine_wood",
groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3} groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3}
}) })
doors.register_fencegate("doors:gate_aspen_wood", { doors.register_fencegate("doors:gate_aspen_wood", {
description = "Aspen Wood Fence Gate", description = S("Aspen Wood Fence Gate"),
texture = "default_aspen_wood.png", texture = "default_aspen_wood.png",
material = "default:aspen_wood", material = "default:aspen_wood",
groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3} groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3}

View File

@ -1,23 +1,28 @@
-- dye/init.lua
dye = {} dye = {}
-- Load support for MT game translation.
local S = minetest.get_translator()
-- Make dye names and descriptions available globally -- Make dye names and descriptions available globally
dye.dyes = { dye.dyes = {
{"white", "White"}, {"white", S("White")},
{"grey", "Grey"}, {"grey", S("Grey")},
{"dark_grey", "Dark grey"}, {"dark_grey", S("Dark grey")},
{"black", "Black"}, {"black", S("Black")},
{"violet", "Violet"}, {"violet", S("Violet")},
{"blue", "Blue"}, {"blue", S("Blue")},
{"cyan", "Cyan"}, {"cyan", S("Cyan")},
{"dark_green", "Dark green"}, {"dark_green", S("Dark green")},
{"green", "Green"}, {"green", S("Green")},
{"yellow", "Yellow"}, {"yellow", S("Yellow")},
{"brown", "Brown"}, {"brown", S("Brown")},
{"orange", "Orange"}, {"orange", S("Orange")},
{"red", "Red"}, {"red", S("Red")},
{"magenta", "Magenta"}, {"magenta", S("Magenta")},
{"pink", "Pink"}, {"pink", S("Pink")},
} }
-- Define items -- Define items
@ -30,7 +35,7 @@ for _, row in ipairs(dye.dyes) do
minetest.register_craftitem("dye:" .. name, { minetest.register_craftitem("dye:" .. name, {
inventory_image = "dye_" .. name .. ".png", inventory_image = "dye_" .. name .. ".png",
description = description .. " Dye", description = S("@1 Dye", description),
groups = groups groups = groups
}) })

View File

@ -1,3 +1,7 @@
-- farming/api.lua
-- Load support for MT game translation.
local S = minetest.get_translator()
-- Wear out hoes, place soil -- Wear out hoes, place soil
-- TODO Ignore group:flower -- TODO Ignore group:flower
@ -78,7 +82,7 @@ farming.register_hoe = function(name, def)
end end
-- Check def table -- Check def table
if def.description == nil then if def.description == nil then
def.description = "Hoe" def.description = S("Hoe")
end end
if def.inventory_image == nil then if def.inventory_image == nil then
def.inventory_image = "unknown_item.png" def.inventory_image = "unknown_item.png"
@ -251,7 +255,7 @@ farming.register_plant = function(name, def)
-- Check def table -- Check def table
if not def.description then if not def.description then
def.description = "Seed" def.description = S("Seed")
end end
if not def.inventory_image then if not def.inventory_image then
def.inventory_image = "unknown_item.png" def.inventory_image = "unknown_item.png"

View File

@ -1,5 +1,10 @@
-- farming/hoes.lua
-- Load support for MT game translation.
local S = minetest.get_translator()
farming.register_hoe(":farming:hoe_wood", { farming.register_hoe(":farming:hoe_wood", {
description = "Wooden Hoe", description = S("Wooden Hoe"),
inventory_image = "farming_tool_woodhoe.png", inventory_image = "farming_tool_woodhoe.png",
max_uses = 30, max_uses = 30,
material = "group:wood", material = "group:wood",
@ -7,7 +12,7 @@ farming.register_hoe(":farming:hoe_wood", {
}) })
farming.register_hoe(":farming:hoe_stone", { farming.register_hoe(":farming:hoe_stone", {
description = "Stone Hoe", description = S("Stone Hoe"),
inventory_image = "farming_tool_stonehoe.png", inventory_image = "farming_tool_stonehoe.png",
max_uses = 90, max_uses = 90,
material = "group:stone", material = "group:stone",
@ -15,7 +20,7 @@ farming.register_hoe(":farming:hoe_stone", {
}) })
farming.register_hoe(":farming:hoe_steel", { farming.register_hoe(":farming:hoe_steel", {
description = "Steel Hoe", description = S("Steel Hoe"),
inventory_image = "farming_tool_steelhoe.png", inventory_image = "farming_tool_steelhoe.png",
max_uses = 500, max_uses = 500,
material = "default:steel_ingot", material = "default:steel_ingot",
@ -28,21 +33,21 @@ farming.register_hoe(":farming:hoe_steel", {
-- release. -- release.
farming.register_hoe(":farming:hoe_bronze", { farming.register_hoe(":farming:hoe_bronze", {
description = "Bronze Hoe", description = S("Bronze Hoe"),
inventory_image = "farming_tool_bronzehoe.png", inventory_image = "farming_tool_bronzehoe.png",
max_uses = 220, max_uses = 220,
groups = {hoe = 1, not_in_creative_inventory = 1}, groups = {hoe = 1, not_in_creative_inventory = 1},
}) })
farming.register_hoe(":farming:hoe_mese", { farming.register_hoe(":farming:hoe_mese", {
description = "Mese Hoe", description = S("Mese Hoe"),
inventory_image = "farming_tool_mesehoe.png", inventory_image = "farming_tool_mesehoe.png",
max_uses = 350, max_uses = 350,
groups = {hoe = 1, not_in_creative_inventory = 1}, groups = {hoe = 1, not_in_creative_inventory = 1},
}) })
farming.register_hoe(":farming:hoe_diamond", { farming.register_hoe(":farming:hoe_diamond", {
description = "Diamond Hoe", description = S("Diamond Hoe"),
inventory_image = "farming_tool_diamondhoe.png", inventory_image = "farming_tool_diamondhoe.png",
max_uses = 500, max_uses = 500,
groups = {hoe = 1, not_in_creative_inventory = 1}, groups = {hoe = 1, not_in_creative_inventory = 1},

View File

@ -1,3 +1,5 @@
-- farming/init.lua
-- Global farming namespace -- Global farming namespace
farming = {} farming = {}
@ -11,10 +13,14 @@ dofile(farming.path .. "/nodes.lua")
dofile(farming.path .. "/hoes.lua") dofile(farming.path .. "/hoes.lua")
-- Load support for MT game translation.
local S = minetest.get_translator()
-- WHEAT -- WHEAT
farming.register_plant("farming:wheat", { farming.register_plant("farming:wheat", {
description = "Wheat Seed", description = S("Wheat Seed"),
paramtype2 = "meshoptions", paramtype2 = "meshoptions",
inventory_image = "farming_wheat_seed.png", inventory_image = "farming_wheat_seed.png",
steps = 8, steps = 8,
@ -26,13 +32,13 @@ farming.register_plant("farming:wheat", {
}) })
minetest.register_craftitem("farming:flour", { minetest.register_craftitem("farming:flour", {
description = "Flour", description = S("Flour"),
inventory_image = "farming_flour.png", inventory_image = "farming_flour.png",
groups = {food_flour = 1, flammable = 1}, groups = {food_flour = 1, flammable = 1},
}) })
minetest.register_craftitem("farming:bread", { minetest.register_craftitem("farming:bread", {
description = "Bread", description = S("Bread"),
inventory_image = "farming_bread.png", inventory_image = "farming_bread.png",
on_use = minetest.item_eat(5), on_use = minetest.item_eat(5),
groups = {food_bread = 1, flammable = 2}, groups = {food_bread = 1, flammable = 2},
@ -55,7 +61,7 @@ minetest.register_craft({
-- Cotton -- Cotton
farming.register_plant("farming:cotton", { farming.register_plant("farming:cotton", {
description = "Cotton Seed", description = S("Cotton Seed"),
inventory_image = "farming_cotton_seed.png", inventory_image = "farming_cotton_seed.png",
steps = 8, steps = 8,
minlight = 13, minlight = 13,
@ -65,7 +71,7 @@ farming.register_plant("farming:cotton", {
}) })
minetest.register_craftitem("farming:string", { minetest.register_craftitem("farming:string", {
description = "String", description = S("String"),
inventory_image = "farming_string.png", inventory_image = "farming_string.png",
groups = {flammable = 2}, groups = {flammable = 2},
}) })

View File

@ -1,3 +1,9 @@
-- farming/nodes.lua
-- Load support for MT game translation.
local S = minetest.get_translator()
minetest.override_item("default:dirt", { minetest.override_item("default:dirt", {
soil = { soil = {
base = "default:dirt", base = "default:dirt",
@ -55,7 +61,7 @@ minetest.override_item("default:dry_dirt_with_dry_grass", {
}) })
minetest.register_node("farming:soil", { minetest.register_node("farming:soil", {
description = "Soil", description = S("Soil"),
tiles = {"default_dirt.png^farming_soil.png", "default_dirt.png"}, tiles = {"default_dirt.png^farming_soil.png", "default_dirt.png"},
drop = "default:dirt", drop = "default:dirt",
groups = {crumbly=3, not_in_creative_inventory=1, soil=2, grassland = 1, field = 1}, groups = {crumbly=3, not_in_creative_inventory=1, soil=2, grassland = 1, field = 1},
@ -68,7 +74,7 @@ minetest.register_node("farming:soil", {
}) })
minetest.register_node("farming:soil_wet", { 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"}, tiles = {"default_dirt.png^farming_soil_wet.png", "default_dirt.png^farming_soil_wet_side.png"},
drop = "default:dirt", drop = "default:dirt",
groups = {crumbly=3, not_in_creative_inventory=1, soil=3, wet = 1, grassland = 1, field = 1}, groups = {crumbly=3, not_in_creative_inventory=1, soil=3, wet = 1, grassland = 1, field = 1},
@ -115,7 +121,7 @@ minetest.override_item("default:desert_sand", {
} }
}) })
minetest.register_node("farming:desert_sand_soil", { minetest.register_node("farming:desert_sand_soil", {
description = "Desert Sand Soil", description = S("Desert Sand Soil"),
drop = "default:desert_sand", drop = "default:desert_sand",
tiles = {"farming_desert_sand_soil.png", "default_desert_sand.png"}, 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}, groups = {crumbly=3, not_in_creative_inventory = 1, falling_node=1, sand=1, soil = 2, desert = 1, field = 1},
@ -128,7 +134,7 @@ minetest.register_node("farming:desert_sand_soil", {
}) })
minetest.register_node("farming:desert_sand_soil_wet", { minetest.register_node("farming:desert_sand_soil_wet", {
description = "Wet Desert Sand Soil", description = S("Wet Desert Sand Soil"),
drop = "default:desert_sand", drop = "default:desert_sand",
tiles = {"farming_desert_sand_soil_wet.png", "farming_desert_sand_soil_wet_side.png"}, 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}, groups = {crumbly=3, falling_node=1, sand=1, not_in_creative_inventory=1, soil=3, wet = 1, desert = 1, field = 1},
@ -141,7 +147,7 @@ minetest.register_node("farming:desert_sand_soil_wet", {
}) })
minetest.register_node("farming:straw", { minetest.register_node("farming:straw", {
description = "Straw", description = S("Straw"),
tiles = {"farming_straw.png"}, tiles = {"farming_straw.png"},
is_ground_content = false, is_ground_content = false,
groups = {snappy=3, flammable=4, fall_damage_add_percent=-30}, groups = {snappy=3, flammable=4, fall_damage_add_percent=-30},
@ -153,8 +159,8 @@ stairs.register_stair_and_slab(
"farming:straw", "farming:straw",
{snappy = 3, flammable = 4}, {snappy = 3, flammable = 4},
{"farming_straw.png"}, {"farming_straw.png"},
"Straw Stair", S("Straw Stair"),
"Straw Slab", S("Straw Slab"),
default.node_sound_leaves_defaults(), default.node_sound_leaves_defaults(),
true true
) )

View File

@ -1,7 +1,13 @@
-- fire/init.lua
-- Global namespace for functions -- Global namespace for functions
fire = {} fire = {}
-- Load support for MT game translation.
local S = minetest.get_translator()
-- 'Enable fire' setting -- 'Enable fire' setting
local fire_enabled = minetest.settings:get_bool("enable_fire") 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", { minetest.register_node("fire:permanent_flame", {
description = "Permanent Flame", description = S("Permanent Flame"),
drawtype = "firelike", drawtype = "firelike",
tiles = { tiles = {
{ {
@ -113,7 +119,7 @@ minetest.register_node("fire:permanent_flame", {
-- Flint and steel -- Flint and steel
minetest.register_tool("fire: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", inventory_image = "fire_flint_steel.png",
sound = {breaks = "default_tool_breaks"}, sound = {breaks = "default_tool_breaks"},
@ -320,7 +326,7 @@ if fire_enabled then
interval = 7, interval = 7,
chance = 12, chance = 12,
catch_up = false, catch_up = false,
action = function(pos) action = function(pos, node, active_object_count, active_object_count_wider)
local p = minetest.find_node_near(pos, 1, {"air"}) local p = minetest.find_node_near(pos, 1, {"air"})
if p then if p then
minetest.set_node(p, {name = "fire:basic_flame"}) minetest.set_node(p, {name = "fire:basic_flame"})
@ -337,7 +343,7 @@ if fire_enabled then
interval = 5, interval = 5,
chance = 18, chance = 18,
catch_up = false, catch_up = false,
action = function(pos) action = function(pos, node, active_object_count, active_object_count_wider)
local p = minetest.find_node_near(pos, 1, {"group:flammable"}) local p = minetest.find_node_near(pos, 1, {"group:flammable"})
if not p then if not p then
return return

View File

@ -1,6 +1,11 @@
-- firefly -- firefly/init.lua
-- Load support for MT game translation.
local S = minetest.get_translator()
minetest.register_node("fireflies:firefly", { minetest.register_node("fireflies:firefly", {
description = "Firefly", description = S("Firefly"),
drawtype = "plantlike", drawtype = "plantlike",
tiles = {{ tiles = {{
name = "fireflies_firefly_animated.png", name = "fireflies_firefly_animated.png",
@ -47,7 +52,7 @@ minetest.register_node("fireflies:firefly", {
}) })
minetest.register_node("fireflies:hidden_firefly", { minetest.register_node("fireflies:hidden_firefly", {
description = "Hidden Firefly", description = S("Hidden Firefly"),
drawtype = "airlike", drawtype = "airlike",
inventory_image = "fireflies_firefly.png", inventory_image = "fireflies_firefly.png",
wield_image = "fireflies_firefly.png", wield_image = "fireflies_firefly.png",
@ -84,7 +89,7 @@ minetest.register_node("fireflies:hidden_firefly", {
-- bug net -- bug net
minetest.register_tool("fireflies:bug_net", { minetest.register_tool("fireflies:bug_net", {
description = "Bug Net", description = S("Bug Net"),
inventory_image = "fireflies_bugnet.png", inventory_image = "fireflies_bugnet.png",
on_use = function(itemstack, player, pointed_thing) on_use = function(itemstack, player, pointed_thing)
if not pointed_thing or pointed_thing.type ~= "node" or if not pointed_thing or pointed_thing.type ~= "node" or
@ -113,14 +118,14 @@ minetest.register_craft( {
recipe = { recipe = {
{"farming:string", "farming:string"}, {"farming:string", "farming:string"},
{"farming:string", "farming:string"}, {"farming:string", "farming:string"},
{"group:stick", ""} {"default:stick", ""}
} }
}) })
-- firefly in a bottle -- firefly in a bottle
minetest.register_node("fireflies:firefly_bottle", { minetest.register_node("fireflies:firefly_bottle", {
description = "Firefly in a Bottle", description = S("Firefly in a Bottle"),
inventory_image = "fireflies_bottle.png", inventory_image = "fireflies_bottle.png",
wield_image = "fireflies_bottle.png", wield_image = "fireflies_bottle.png",
tiles = {{ tiles = {{

View File

@ -1,3 +1,5 @@
-- flowers/init.lua
-- Minetest 0.4 mod: default -- Minetest 0.4 mod: default
-- See README.txt for licensing and other information. -- See README.txt for licensing and other information.
@ -6,6 +8,9 @@
flowers = {} flowers = {}
-- Load support for MT game translation.
local S = minetest.get_translator()
-- Map Generation -- Map Generation
@ -58,49 +63,49 @@ end
flowers.datas = { flowers.datas = {
{ {
"rose", "rose",
"Red Rose", S("Red Rose"),
{-2 / 16, -0.5, -2 / 16, 2 / 16, 5 / 16, 2 / 16}, {-2 / 16, -0.5, -2 / 16, 2 / 16, 5 / 16, 2 / 16},
{color_red = 1, flammable = 1} {color_red = 1, flammable = 1}
}, },
{ {
"tulip", "tulip",
"Orange Tulip", S("Orange Tulip"),
{-2 / 16, -0.5, -2 / 16, 2 / 16, 3 / 16, 2 / 16}, {-2 / 16, -0.5, -2 / 16, 2 / 16, 3 / 16, 2 / 16},
{color_orange = 1, flammable = 1} {color_orange = 1, flammable = 1}
}, },
{ {
"dandelion_yellow", "dandelion_yellow",
"Yellow Dandelion", S("Yellow Dandelion"),
{-4 / 16, -0.5, -4 / 16, 4 / 16, -2 / 16, 4 / 16}, {-4 / 16, -0.5, -4 / 16, 4 / 16, -2 / 16, 4 / 16},
{color_yellow = 1, flammable = 1} {color_yellow = 1, flammable = 1}
}, },
{ {
"chrysanthemum_green", "chrysanthemum_green",
"Green Chrysanthemum", S("Green Chrysanthemum"),
{-4 / 16, -0.5, -4 / 16, 4 / 16, -1 / 16, 4 / 16}, {-4 / 16, -0.5, -4 / 16, 4 / 16, -1 / 16, 4 / 16},
{color_green = 1, flammable = 1} {color_green = 1, flammable = 1}
}, },
{ {
"geranium", "geranium",
"Blue Geranium", S("Blue Geranium"),
{-2 / 16, -0.5, -2 / 16, 2 / 16, 2 / 16, 2 / 16}, {-2 / 16, -0.5, -2 / 16, 2 / 16, 2 / 16, 2 / 16},
{color_blue = 1, flammable = 1} {color_blue = 1, flammable = 1}
}, },
{ {
"viola", "viola",
"Viola", S("Viola"),
{-5 / 16, -0.5, -5 / 16, 5 / 16, -1 / 16, 5 / 16}, {-5 / 16, -0.5, -5 / 16, 5 / 16, -1 / 16, 5 / 16},
{color_violet = 1, flammable = 1} {color_violet = 1, flammable = 1}
}, },
{ {
"dandelion_white", "dandelion_white",
"White Dandelion", S("White Dandelion"),
{-5 / 16, -0.5, -5 / 16, 5 / 16, -2 / 16, 5 / 16}, {-5 / 16, -0.5, -5 / 16, 5 / 16, -2 / 16, 5 / 16},
{color_white = 1, flammable = 1} {color_white = 1, flammable = 1}
}, },
{ {
"tulip_black", "tulip_black",
"Black Tulip", S("Black Tulip"),
{-2 / 16, -0.5, -2 / 16, 2 / 16, 3 / 16, 2 / 16}, {-2 / 16, -0.5, -2 / 16, 2 / 16, 3 / 16, 2 / 16},
{color_black = 1, flammable = 1} {color_black = 1, flammable = 1}
}, },
@ -180,7 +185,7 @@ minetest.register_abm({
-- --
minetest.register_node("flowers:mushroom_red", { minetest.register_node("flowers:mushroom_red", {
description = "Red Mushroom", description = S("Red Mushroom"),
tiles = {"flowers_mushroom_red.png"}, tiles = {"flowers_mushroom_red.png"},
inventory_image = "flowers_mushroom_red.png", inventory_image = "flowers_mushroom_red.png",
wield_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", { minetest.register_node("flowers:mushroom_brown", {
description = "Brown Mushroom", description = S("Brown Mushroom"),
tiles = {"flowers_mushroom_brown.png"}, tiles = {"flowers_mushroom_brown.png"},
inventory_image = "flowers_mushroom_brown.png", inventory_image = "flowers_mushroom_brown.png",
wield_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 = { local waterlily_def = {
description = "Waterlily", description = S("Waterlily"),
drawtype = "nodebox", drawtype = "nodebox",
paramtype = "light", paramtype = "light",
paramtype2 = "facedir", paramtype2 = "facedir",

View File

@ -1,5 +1,11 @@
-- game_commands/init.lua
-- Load support for MT game translation.
local S = minetest.get_translator()
minetest.register_chatcommand("killme", { minetest.register_chatcommand("killme", {
description = "Kill yourself to respawn", description = S("Kill yourself to respawn"),
func = function(name) func = function(name)
local player = minetest.get_player_by_name(name) local player = minetest.get_player_by_name(name)
if player then 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 -- There doesn't seem to be a way to get a default spawn pos
-- from the lua API -- from the lua API
return false, "No static_spawnpoint defined" return false, S("No static_spawnpoint defined")
end end
else else
-- Show error message if used when not logged in, eg: from IRC mod -- 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
end end
}) })

View File

@ -1,3 +1,5 @@
-- gave_initial_stuff/init.lua
local stuff_string = minetest.settings:get("initial_stuff") or local stuff_string = minetest.settings:get("initial_stuff") or
"default:pick_steel,default:axe_steel,default:shovel_steel," .. "default:pick_steel,default:axe_steel,default:shovel_steel," ..
"default:torch 99,default:cobble 99" "default:torch 99,default:cobble 99"

View File

@ -1,8 +1,14 @@
-- map/init.lua
-- Mod global namespace -- Mod global namespace
map = {} map = {}
-- Load support for MT game translation.
local S = minetest.get_translator()
-- Cache creative mode setting -- Cache creative mode setting
local creative_mode_cache = minetest.settings:get_bool("creative_mode") local creative_mode_cache = minetest.settings:get_bool("creative_mode")
@ -49,7 +55,7 @@ minetest.after(5.3, cyclic_update)
-- Mapping kit item -- Mapping kit item
minetest.register_craftitem("map:mapping_kit", { 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", inventory_image = "map_mapping_kit.png",
stack_max = 1, stack_max = 1,
groups = {flammable = 3}, groups = {flammable = 3},
@ -65,7 +71,7 @@ minetest.register_craftitem("map:mapping_kit", {
minetest.register_craft({ minetest.register_craft({
output = "map:mapping_kit", output = "map:mapping_kit",
recipe = { recipe = {
{"default:glass", "default:paper", "group:stick"}, {"default:glass", "default:paper", "default:stick"},
{"default:steel_ingot", "default:paper", "default:steel_ingot"}, {"default:steel_ingot", "default:paper", "default:steel_ingot"},
{"group:wood", "default:paper", "dye:black"}, {"group:wood", "default:paper", "dye:black"},
} }

View File

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

View File

@ -1,5 +1,11 @@
-- screwdriver/init.lua
screwdriver = {} screwdriver = {}
-- Load support for MT game translation.
local S = minetest.get_translator()
screwdriver.ROTATE_FACE = 1 screwdriver.ROTATE_FACE = 1
screwdriver.ROTATE_AXIS = 2 screwdriver.ROTATE_AXIS = 2
screwdriver.disallow = function(pos, node, user, mode, new_param2) screwdriver.disallow = function(pos, node, user, mode, new_param2)
@ -144,7 +150,7 @@ end
-- Screwdriver -- Screwdriver
minetest.register_tool("screwdriver: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", inventory_image = "screwdriver.png",
groups = {tool = 1}, groups = {tool = 1},
on_use = function(itemstack, user, pointed_thing) on_use = function(itemstack, user, pointed_thing)

View File

@ -1,6 +1,11 @@
-- sethome/init.lua
sethome = {} sethome = {}
-- Load support for MT game translation.
local S = minetest.get_translator()
local homes_file = minetest.get_worldpath() .. "/homes" local homes_file = minetest.get_worldpath() .. "/homes"
local homepos = {} local homepos = {}
@ -68,30 +73,30 @@ sethome.go = function(name)
end end
minetest.register_privilege("home", { minetest.register_privilege("home", {
description = "Can use /sethome and /home", description = S("Can use /sethome and /home"),
give_to_singleplayer = false give_to_singleplayer = false
}) })
minetest.register_chatcommand("home", { minetest.register_chatcommand("home", {
description = "Teleport you to your home point", description = S("Teleport you to your home point"),
privs = {home = true}, privs = {home = true},
func = function(name) func = function(name)
if sethome.go(name) then if sethome.go(name) then
return true, "Teleported to home!" return true, S("Teleported to home!")
end end
return false, "Set a home using /sethome" return false, S("Set a home using /sethome")
end, end,
}) })
minetest.register_chatcommand("sethome", { minetest.register_chatcommand("sethome", {
description = "Set your home point", description = S("Set your home point"),
privs = {home = true}, privs = {home = true},
func = function(name) func = function(name)
name = name or "" -- fallback to blank name if nil name = name or "" -- fallback to blank name if nil
local player = minetest.get_player_by_name(name) local player = minetest.get_player_by_name(name)
if player and sethome.set(name, player:get_pos()) then if player and sethome.set(name, player:get_pos()) then
return true, "Home set!" return true, S("Home set!")
end end
return false, "Player not found!" return false, S("Player not found!")
end, end,
}) })

View File

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

View File

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

View File

@ -1,3 +1,5 @@
-- stairs/init.lua
-- Minetest 0.4 mod: stairs -- Minetest 0.4 mod: stairs
-- See README.txt for licensing and other information. -- See README.txt for licensing and other information.
@ -6,6 +8,9 @@
stairs = {} stairs = {}
-- Load support for MT game translation.
local S = minetest.get_translator()
-- Register aliases for new pine node names -- Register aliases for new pine node names
@ -317,7 +322,7 @@ function stairs.register_stair_inner(subname, recipeitem, groups, images,
new_groups.stair = 1 new_groups.stair = 1
warn_if_exists("stairs:stair_inner_" .. subname) warn_if_exists("stairs:stair_inner_" .. subname)
minetest.register_node(":stairs:stair_inner_" .. subname, { minetest.register_node(":stairs:stair_inner_" .. subname, {
description = "Inner " .. description, description = S("Inner @1", description),
drawtype = "nodebox", drawtype = "nodebox",
tiles = stair_images, tiles = stair_images,
paramtype = "light", paramtype = "light",
@ -399,7 +404,7 @@ function stairs.register_stair_outer(subname, recipeitem, groups, images,
new_groups.stair = 1 new_groups.stair = 1
warn_if_exists("stairs:stair_outer_" .. subname) warn_if_exists("stairs:stair_outer_" .. subname)
minetest.register_node(":stairs:stair_outer_" .. subname, { minetest.register_node(":stairs:stair_outer_" .. subname, {
description = "Outer " .. description, description = S("Outer @1", description),
drawtype = "nodebox", drawtype = "nodebox",
tiles = stair_images, tiles = stair_images,
paramtype = "light", paramtype = "light",
@ -472,8 +477,8 @@ stairs.register_stair_and_slab(
"default:wood", "default:wood",
{choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
{"default_wood.png"}, {"default_wood.png"},
"Wooden Stair", S("Wooden Stair"),
"Wooden Slab", S("Wooden Slab"),
default.node_sound_wood_defaults(), default.node_sound_wood_defaults(),
false false
) )
@ -483,8 +488,8 @@ stairs.register_stair_and_slab(
"default:junglewood", "default:junglewood",
{choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
{"default_junglewood.png"}, {"default_junglewood.png"},
"Jungle Wood Stair", S("Jungle Wood Stair"),
"Jungle Wood Slab", S("Jungle Wood Slab"),
default.node_sound_wood_defaults(), default.node_sound_wood_defaults(),
false false
) )
@ -494,8 +499,8 @@ stairs.register_stair_and_slab(
"default:pine_wood", "default:pine_wood",
{choppy = 3, oddly_breakable_by_hand = 2, flammable = 3}, {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3},
{"default_pine_wood.png"}, {"default_pine_wood.png"},
"Pine Wood Stair", S("Pine Wood Stair"),
"Pine Wood Slab", S("Pine Wood Slab"),
default.node_sound_wood_defaults(), default.node_sound_wood_defaults(),
false false
) )
@ -505,8 +510,8 @@ stairs.register_stair_and_slab(
"default:acacia_wood", "default:acacia_wood",
{choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
{"default_acacia_wood.png"}, {"default_acacia_wood.png"},
"Acacia Wood Stair", S("Acacia Wood Stair"),
"Acacia Wood Slab", S("Acacia Wood Slab"),
default.node_sound_wood_defaults(), default.node_sound_wood_defaults(),
false false
) )
@ -516,8 +521,8 @@ stairs.register_stair_and_slab(
"default:aspen_wood", "default:aspen_wood",
{choppy = 3, oddly_breakable_by_hand = 2, flammable = 3}, {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3},
{"default_aspen_wood.png"}, {"default_aspen_wood.png"},
"Aspen Wood Stair", S("Aspen Wood Stair"),
"Aspen Wood Slab", S("Aspen Wood Slab"),
default.node_sound_wood_defaults(), default.node_sound_wood_defaults(),
false false
) )
@ -527,8 +532,8 @@ stairs.register_stair_and_slab(
"default:stone", "default:stone",
{cracky = 3}, {cracky = 3},
{"default_stone.png"}, {"default_stone.png"},
"Stone Stair", S("Stone Stair"),
"Stone Slab", S("Stone Slab"),
default.node_sound_stone_defaults(), default.node_sound_stone_defaults(),
true true
) )
@ -538,8 +543,8 @@ stairs.register_stair_and_slab(
"default:cobble", "default:cobble",
{cracky = 3}, {cracky = 3},
{"default_cobble.png"}, {"default_cobble.png"},
"Cobblestone Stair", S("Cobblestone Stair"),
"Cobblestone Slab", S("Cobblestone Slab"),
default.node_sound_stone_defaults(), default.node_sound_stone_defaults(),
true true
) )
@ -549,8 +554,8 @@ stairs.register_stair_and_slab(
"default:mossycobble", "default:mossycobble",
{cracky = 3}, {cracky = 3},
{"default_mossycobble.png"}, {"default_mossycobble.png"},
"Mossy Cobblestone Stair", S("Mossy Cobblestone Stair"),
"Mossy Cobblestone Slab", S("Mossy Cobblestone Slab"),
default.node_sound_stone_defaults(), default.node_sound_stone_defaults(),
true true
) )
@ -560,8 +565,8 @@ stairs.register_stair_and_slab(
"default:stonebrick", "default:stonebrick",
{cracky = 2}, {cracky = 2},
{"default_stone_brick.png"}, {"default_stone_brick.png"},
"Stone Brick Stair", S("Stone Brick Stair"),
"Stone Brick Slab", S("Stone Brick Slab"),
default.node_sound_stone_defaults(), default.node_sound_stone_defaults(),
false false
) )
@ -571,8 +576,8 @@ stairs.register_stair_and_slab(
"default:stone_block", "default:stone_block",
{cracky = 2}, {cracky = 2},
{"default_stone_block.png"}, {"default_stone_block.png"},
"Stone Block Stair", S("Stone Block Stair"),
"Stone Block Slab", S("Stone Block Slab"),
default.node_sound_stone_defaults(), default.node_sound_stone_defaults(),
true true
) )
@ -582,8 +587,8 @@ stairs.register_stair_and_slab(
"default:desert_stone", "default:desert_stone",
{cracky = 3}, {cracky = 3},
{"default_desert_stone.png"}, {"default_desert_stone.png"},
"Desert Stone Stair", S("Desert Stone Stair"),
"Desert Stone Slab", S("Desert Stone Slab"),
default.node_sound_stone_defaults(), default.node_sound_stone_defaults(),
true true
) )
@ -593,8 +598,8 @@ stairs.register_stair_and_slab(
"default:desert_cobble", "default:desert_cobble",
{cracky = 3}, {cracky = 3},
{"default_desert_cobble.png"}, {"default_desert_cobble.png"},
"Desert Cobblestone Stair", S("Desert Cobblestone Stair"),
"Desert Cobblestone Slab", S("Desert Cobblestone Slab"),
default.node_sound_stone_defaults(), default.node_sound_stone_defaults(),
true true
) )
@ -604,8 +609,8 @@ stairs.register_stair_and_slab(
"default:desert_stonebrick", "default:desert_stonebrick",
{cracky = 2}, {cracky = 2},
{"default_desert_stone_brick.png"}, {"default_desert_stone_brick.png"},
"Desert Stone Brick Stair", S("Desert Stone Brick Stair"),
"Desert Stone Brick Slab", S("Desert Stone Brick Slab"),
default.node_sound_stone_defaults(), default.node_sound_stone_defaults(),
false false
) )
@ -615,8 +620,8 @@ stairs.register_stair_and_slab(
"default:desert_stone_block", "default:desert_stone_block",
{cracky = 2}, {cracky = 2},
{"default_desert_stone_block.png"}, {"default_desert_stone_block.png"},
"Desert Stone Block Stair", S("Desert Stone Block Stair"),
"Desert Stone Block Slab", S("Desert Stone Block Slab"),
default.node_sound_stone_defaults(), default.node_sound_stone_defaults(),
true true
) )
@ -626,8 +631,8 @@ stairs.register_stair_and_slab(
"default:sandstone", "default:sandstone",
{crumbly = 1, cracky = 3}, {crumbly = 1, cracky = 3},
{"default_sandstone.png"}, {"default_sandstone.png"},
"Sandstone Stair", S("Sandstone Stair"),
"Sandstone Slab", S("Sandstone Slab"),
default.node_sound_stone_defaults(), default.node_sound_stone_defaults(),
true true
) )
@ -637,8 +642,8 @@ stairs.register_stair_and_slab(
"default:sandstonebrick", "default:sandstonebrick",
{cracky = 2}, {cracky = 2},
{"default_sandstone_brick.png"}, {"default_sandstone_brick.png"},
"Sandstone Brick Stair", S("Sandstone Brick Stair"),
"Sandstone Brick Slab", S("Sandstone Brick Slab"),
default.node_sound_stone_defaults(), default.node_sound_stone_defaults(),
false false
) )
@ -648,8 +653,8 @@ stairs.register_stair_and_slab(
"default:sandstone_block", "default:sandstone_block",
{cracky = 2}, {cracky = 2},
{"default_sandstone_block.png"}, {"default_sandstone_block.png"},
"Sandstone Block Stair", S("Sandstone Block Stair"),
"Sandstone Block Slab", S("Sandstone Block Slab"),
default.node_sound_stone_defaults(), default.node_sound_stone_defaults(),
true true
) )
@ -659,8 +664,8 @@ stairs.register_stair_and_slab(
"default:desert_sandstone", "default:desert_sandstone",
{crumbly = 1, cracky = 3}, {crumbly = 1, cracky = 3},
{"default_desert_sandstone.png"}, {"default_desert_sandstone.png"},
"Desert Sandstone Stair", S("Desert Sandstone Stair"),
"Desert Sandstone Slab", S("Desert Sandstone Slab"),
default.node_sound_stone_defaults(), default.node_sound_stone_defaults(),
true true
) )
@ -670,8 +675,8 @@ stairs.register_stair_and_slab(
"default:desert_sandstone_brick", "default:desert_sandstone_brick",
{cracky = 2}, {cracky = 2},
{"default_desert_sandstone_brick.png"}, {"default_desert_sandstone_brick.png"},
"Desert Sandstone Brick Stair", S("Desert Sandstone Brick Stair"),
"Desert Sandstone Brick Slab", S("Desert Sandstone Brick Slab"),
default.node_sound_stone_defaults(), default.node_sound_stone_defaults(),
false false
) )
@ -681,8 +686,8 @@ stairs.register_stair_and_slab(
"default:desert_sandstone_block", "default:desert_sandstone_block",
{cracky = 2}, {cracky = 2},
{"default_desert_sandstone_block.png"}, {"default_desert_sandstone_block.png"},
"Desert Sandstone Block Stair", S("Desert Sandstone Block Stair"),
"Desert Sandstone Block Slab", S("Desert Sandstone Block Slab"),
default.node_sound_stone_defaults(), default.node_sound_stone_defaults(),
true true
) )
@ -692,8 +697,8 @@ stairs.register_stair_and_slab(
"default:silver_sandstone", "default:silver_sandstone",
{crumbly = 1, cracky = 3}, {crumbly = 1, cracky = 3},
{"default_silver_sandstone.png"}, {"default_silver_sandstone.png"},
"Silver Sandstone Stair", S("Silver Sandstone Stair"),
"Silver Sandstone Slab", S("Silver Sandstone Slab"),
default.node_sound_stone_defaults(), default.node_sound_stone_defaults(),
true true
) )
@ -703,8 +708,8 @@ stairs.register_stair_and_slab(
"default:silver_sandstone_brick", "default:silver_sandstone_brick",
{cracky = 2}, {cracky = 2},
{"default_silver_sandstone_brick.png"}, {"default_silver_sandstone_brick.png"},
"Silver Sandstone Brick Stair", S("Silver Sandstone Brick Stair"),
"Silver Sandstone Brick Slab", S("Silver Sandstone Brick Slab"),
default.node_sound_stone_defaults(), default.node_sound_stone_defaults(),
false false
) )
@ -714,8 +719,8 @@ stairs.register_stair_and_slab(
"default:silver_sandstone_block", "default:silver_sandstone_block",
{cracky = 2}, {cracky = 2},
{"default_silver_sandstone_block.png"}, {"default_silver_sandstone_block.png"},
"Silver Sandstone Block Stair", S("Silver Sandstone Block Stair"),
"Silver Sandstone Block Slab", S("Silver Sandstone Block Slab"),
default.node_sound_stone_defaults(), default.node_sound_stone_defaults(),
true true
) )
@ -725,8 +730,8 @@ stairs.register_stair_and_slab(
"default:obsidian", "default:obsidian",
{cracky = 1, level = 2}, {cracky = 1, level = 2},
{"default_obsidian.png"}, {"default_obsidian.png"},
"Obsidian Stair", S("Obsidian Stair"),
"Obsidian Slab", S("Obsidian Slab"),
default.node_sound_stone_defaults(), default.node_sound_stone_defaults(),
true true
) )
@ -736,8 +741,8 @@ stairs.register_stair_and_slab(
"default:obsidianbrick", "default:obsidianbrick",
{cracky = 1, level = 2}, {cracky = 1, level = 2},
{"default_obsidian_brick.png"}, {"default_obsidian_brick.png"},
"Obsidian Brick Stair", S("Obsidian Brick Stair"),
"Obsidian Brick Slab", S("Obsidian Brick Slab"),
default.node_sound_stone_defaults(), default.node_sound_stone_defaults(),
false false
) )
@ -747,8 +752,8 @@ stairs.register_stair_and_slab(
"default:obsidian_block", "default:obsidian_block",
{cracky = 1, level = 2}, {cracky = 1, level = 2},
{"default_obsidian_block.png"}, {"default_obsidian_block.png"},
"Obsidian Block Stair", S("Obsidian Block Stair"),
"Obsidian Block Slab", S("Obsidian Block Slab"),
default.node_sound_stone_defaults(), default.node_sound_stone_defaults(),
true true
) )
@ -758,8 +763,8 @@ stairs.register_stair_and_slab(
"default:brick", "default:brick",
{cracky = 3}, {cracky = 3},
{"default_brick.png"}, {"default_brick.png"},
"Brick Stair", S("Brick Stair"),
"Brick Slab", S("Brick Slab"),
default.node_sound_stone_defaults(), default.node_sound_stone_defaults(),
false false
) )
@ -769,8 +774,8 @@ stairs.register_stair_and_slab(
"default:steelblock", "default:steelblock",
{cracky = 1, level = 2}, {cracky = 1, level = 2},
{"default_steel_block.png"}, {"default_steel_block.png"},
"Steel Block Stair", S("Steel Block Stair"),
"Steel Block Slab", S("Steel Block Slab"),
default.node_sound_metal_defaults(), default.node_sound_metal_defaults(),
true true
) )
@ -780,8 +785,8 @@ stairs.register_stair_and_slab(
"default:tinblock", "default:tinblock",
{cracky = 1, level = 2}, {cracky = 1, level = 2},
{"default_tin_block.png"}, {"default_tin_block.png"},
"Tin Block Stair", S("Tin Block Stair"),
"Tin Block Slab", S("Tin Block Slab"),
default.node_sound_metal_defaults(), default.node_sound_metal_defaults(),
true true
) )
@ -791,8 +796,8 @@ stairs.register_stair_and_slab(
"default:copperblock", "default:copperblock",
{cracky = 1, level = 2}, {cracky = 1, level = 2},
{"default_copper_block.png"}, {"default_copper_block.png"},
"Copper Block Stair", S("Copper Block Stair"),
"Copper Block Slab", S("Copper Block Slab"),
default.node_sound_metal_defaults(), default.node_sound_metal_defaults(),
true true
) )
@ -802,8 +807,8 @@ stairs.register_stair_and_slab(
"default:bronzeblock", "default:bronzeblock",
{cracky = 1, level = 2}, {cracky = 1, level = 2},
{"default_bronze_block.png"}, {"default_bronze_block.png"},
"Bronze Block Stair", S("Bronze Block Stair"),
"Bronze Block Slab", S("Bronze Block Slab"),
default.node_sound_metal_defaults(), default.node_sound_metal_defaults(),
true true
) )
@ -813,8 +818,8 @@ stairs.register_stair_and_slab(
"default:goldblock", "default:goldblock",
{cracky = 1}, {cracky = 1},
{"default_gold_block.png"}, {"default_gold_block.png"},
"Gold Block Stair", S("Gold Block Stair"),
"Gold Block Slab", S("Gold Block Slab"),
default.node_sound_metal_defaults(), default.node_sound_metal_defaults(),
true true
) )
@ -824,8 +829,8 @@ stairs.register_stair_and_slab(
"default:ice", "default:ice",
{cracky = 3, cools_lava = 1, slippery = 3}, {cracky = 3, cools_lava = 1, slippery = 3},
{"default_ice.png"}, {"default_ice.png"},
"Ice Stair", S("Ice Stair"),
"Ice Slab", S("Ice Slab"),
default.node_sound_glass_defaults(), default.node_sound_glass_defaults(),
true true
) )
@ -835,8 +840,8 @@ stairs.register_stair_and_slab(
"default:snowblock", "default:snowblock",
{crumbly = 3, cools_lava = 1, snowy = 1}, {crumbly = 3, cools_lava = 1, snowy = 1},
{"default_snow.png"}, {"default_snow.png"},
"Snow Block Stair", S("Snow Block Stair"),
"Snow Block Slab", S("Snow Block Slab"),
default.node_sound_snow_defaults(), default.node_sound_snow_defaults(),
true true
) )
@ -850,7 +855,7 @@ stairs.register_stair(
{"stairs_glass_split.png", "default_glass.png", {"stairs_glass_split.png", "default_glass.png",
"stairs_glass_stairside.png^[transformFX", "stairs_glass_stairside.png", "stairs_glass_stairside.png^[transformFX", "stairs_glass_stairside.png",
"default_glass.png", "stairs_glass_split.png"}, "default_glass.png", "stairs_glass_split.png"},
"Glass Stair", S("Glass Stair"),
default.node_sound_glass_defaults(), default.node_sound_glass_defaults(),
false false
) )
@ -860,7 +865,7 @@ stairs.register_slab(
"default:glass", "default:glass",
{cracky = 3}, {cracky = 3},
{"default_glass.png", "default_glass.png", "stairs_glass_split.png"}, {"default_glass.png", "default_glass.png", "stairs_glass_split.png"},
"Glass Slab", S("Glass Slab"),
default.node_sound_glass_defaults(), default.node_sound_glass_defaults(),
false false
) )
@ -872,7 +877,7 @@ stairs.register_stair_inner(
{"stairs_glass_stairside.png^[transformR270", "default_glass.png", {"stairs_glass_stairside.png^[transformR270", "default_glass.png",
"stairs_glass_stairside.png^[transformFX", "default_glass.png", "stairs_glass_stairside.png^[transformFX", "default_glass.png",
"default_glass.png", "stairs_glass_stairside.png"}, "default_glass.png", "stairs_glass_stairside.png"},
"Glass Stair", S("Glass Stair"),
default.node_sound_glass_defaults(), default.node_sound_glass_defaults(),
false false
) )
@ -884,7 +889,7 @@ stairs.register_stair_outer(
{"stairs_glass_stairside.png^[transformR90", "default_glass.png", {"stairs_glass_stairside.png^[transformR90", "default_glass.png",
"stairs_glass_outer_stairside.png", "stairs_glass_stairside.png", "stairs_glass_outer_stairside.png", "stairs_glass_stairside.png",
"stairs_glass_stairside.png^[transformR90","stairs_glass_outer_stairside.png"}, "stairs_glass_stairside.png^[transformR90","stairs_glass_outer_stairside.png"},
"Glass Stair", S("Glass Stair"),
default.node_sound_glass_defaults(), default.node_sound_glass_defaults(),
false false
) )
@ -896,7 +901,7 @@ stairs.register_stair(
{"stairs_obsidian_glass_split.png", "default_obsidian_glass.png", {"stairs_obsidian_glass_split.png", "default_obsidian_glass.png",
"stairs_obsidian_glass_stairside.png^[transformFX", "stairs_obsidian_glass_stairside.png", "stairs_obsidian_glass_stairside.png^[transformFX", "stairs_obsidian_glass_stairside.png",
"default_obsidian_glass.png", "stairs_obsidian_glass_split.png"}, "default_obsidian_glass.png", "stairs_obsidian_glass_split.png"},
"Obsidian Glass Stair", S("Obsidian Glass Stair"),
default.node_sound_glass_defaults(), default.node_sound_glass_defaults(),
false false
) )
@ -906,7 +911,7 @@ stairs.register_slab(
"default:obsidian_glass", "default:obsidian_glass",
{cracky = 3}, {cracky = 3},
{"default_obsidian_glass.png", "default_obsidian_glass.png", "stairs_obsidian_glass_split.png"}, {"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(), default.node_sound_glass_defaults(),
false false
) )
@ -918,7 +923,7 @@ stairs.register_stair_inner(
{"stairs_obsidian_glass_stairside.png^[transformR270", "default_obsidian_glass.png", {"stairs_obsidian_glass_stairside.png^[transformR270", "default_obsidian_glass.png",
"stairs_obsidian_glass_stairside.png^[transformFX", "default_obsidian_glass.png", "stairs_obsidian_glass_stairside.png^[transformFX", "default_obsidian_glass.png",
"default_obsidian_glass.png", "stairs_obsidian_glass_stairside.png"}, "default_obsidian_glass.png", "stairs_obsidian_glass_stairside.png"},
"Obsidian Glass Stair", S("Obsidian Glass Stair"),
default.node_sound_glass_defaults(), default.node_sound_glass_defaults(),
false false
) )
@ -930,7 +935,7 @@ stairs.register_stair_outer(
{"stairs_obsidian_glass_stairside.png^[transformR90", "default_obsidian_glass.png", {"stairs_obsidian_glass_stairside.png^[transformR90", "default_obsidian_glass.png",
"stairs_obsidian_glass_outer_stairside.png", "stairs_obsidian_glass_stairside.png", "stairs_obsidian_glass_outer_stairside.png", "stairs_obsidian_glass_stairside.png",
"stairs_obsidian_glass_stairside.png^[transformR90","stairs_obsidian_glass_outer_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(), default.node_sound_glass_defaults(),
false false
) )

View File

@ -1,5 +1,11 @@
-- tnt/init.lua
tnt = {} tnt = {}
-- Load support for MT game translation.
local S = minetest.get_translator()
-- Default to enabled when in singleplayer -- Default to enabled when in singleplayer
local enable_tnt = minetest.settings:get_bool("enable_tnt") local enable_tnt = minetest.settings:get_bool("enable_tnt")
if enable_tnt == nil then if enable_tnt == nil then
@ -422,7 +428,7 @@ minetest.register_node("tnt:boom", {
}) })
minetest.register_node("tnt:gunpowder", { minetest.register_node("tnt:gunpowder", {
description = "Gun Powder", description = S("Gun Powder"),
drawtype = "raillike", drawtype = "raillike",
paramtype = "light", paramtype = "light",
is_ground_content = false, is_ground_content = false,
@ -547,7 +553,7 @@ minetest.register_craft({
}) })
minetest.register_craftitem("tnt:tnt_stick", { minetest.register_craftitem("tnt:tnt_stick", {
description = "TNT Stick", description = S("TNT Stick"),
inventory_image = "tnt_tnt_stick.png", inventory_image = "tnt_tnt_stick.png",
groups = {flammable = 5}, groups = {flammable = 5},
}) })
@ -675,6 +681,6 @@ end
tnt.register_tnt({ tnt.register_tnt({
name = "tnt:tnt", name = "tnt:tnt",
description = "TNT", description = S("TNT"),
radius = tnt_radius, radius = tnt_radius,
}) })

View File

@ -1,6 +1,12 @@
-- vessels/init.lua
-- Minetest 0.4 mod: vessels -- Minetest 0.4 mod: vessels
-- See README.txt for licensing and other information. -- See README.txt for licensing and other information.
-- Load support for MT game translation.
local S = minetest.get_translator()
local vessels_shelf_formspec = local vessels_shelf_formspec =
"size[8,7;]" .. "size[8,7;]" ..
"list[context;vessels;0,0.3;8,2;]" .. "list[context;vessels;0,0.3;8,2;]" ..
@ -30,7 +36,7 @@ local function get_vessels_shelf_formspec(inv)
end end
minetest.register_node("vessels:shelf", { minetest.register_node("vessels:shelf", {
description = "Vessels Shelf", description = S("Vessels Shelf"),
tiles = {"default_wood.png", "default_wood.png", "default_wood.png", tiles = {"default_wood.png", "default_wood.png", "default_wood.png",
"default_wood.png", "vessels_shelf.png", "vessels_shelf.png"}, "default_wood.png", "vessels_shelf.png", "vessels_shelf.png"},
paramtype2 = "facedir", paramtype2 = "facedir",
@ -91,7 +97,7 @@ minetest.register_craft({
}) })
minetest.register_node("vessels:glass_bottle", { minetest.register_node("vessels:glass_bottle", {
description = "Empty Glass Bottle", description = S("Empty Glass Bottle"),
drawtype = "plantlike", drawtype = "plantlike",
tiles = {"vessels_glass_bottle.png"}, tiles = {"vessels_glass_bottle.png"},
inventory_image = "vessels_glass_bottle.png", inventory_image = "vessels_glass_bottle.png",
@ -117,7 +123,7 @@ minetest.register_craft( {
}) })
minetest.register_node("vessels:drinking_glass", { minetest.register_node("vessels:drinking_glass", {
description = "Empty Drinking Glass", description = S("Empty Drinking Glass"),
drawtype = "plantlike", drawtype = "plantlike",
tiles = {"vessels_drinking_glass.png"}, tiles = {"vessels_drinking_glass.png"},
inventory_image = "vessels_drinking_glass_inv.png", inventory_image = "vessels_drinking_glass_inv.png",
@ -143,7 +149,7 @@ minetest.register_craft( {
}) })
minetest.register_node("vessels:steel_bottle", { minetest.register_node("vessels:steel_bottle", {
description = "Empty Heavy Steel Bottle", description = S("Empty Heavy Steel Bottle"),
drawtype = "plantlike", drawtype = "plantlike",
tiles = {"vessels_steel_bottle.png"}, tiles = {"vessels_steel_bottle.png"},
inventory_image = "vessels_steel_bottle.png", inventory_image = "vessels_steel_bottle.png",
@ -172,7 +178,7 @@ minetest.register_craft( {
-- Glass and steel recycling -- Glass and steel recycling
minetest.register_craftitem("vessels:glass_fragments", { minetest.register_craftitem("vessels:glass_fragments", {
description = "Glass Fragments", description = S("Glass Fragments"),
inventory_image = "vessels_glass_fragments.png", inventory_image = "vessels_glass_fragments.png",
}) })

View File

@ -1,5 +1,11 @@
-- walls/init.lua
walls = {} walls = {}
-- Load support for MT game translation.
local S = minetest.get_translator()
walls.register = function(wall_name, wall_desc, wall_texture_table, wall_mat, wall_sounds) 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 --make wall_texture_table paramenter backwards compatible for mods passing single texture
if type(wall_texture_table) ~= "table" then 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 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()) "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()) "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()) "default:desert_cobble", default.node_sound_stone_defaults())

View File

@ -4,7 +4,7 @@ for i = 1, #dyes do
local name, desc = unpack(dyes[i]) local name, desc = unpack(dyes[i])
minetest.register_node("wool:" .. name, { minetest.register_node("wool:" .. name, {
description = desc .. " Wool", description = S("@1 Wool", desc),
tiles = {"wool_" .. name .. ".png"}, tiles = {"wool_" .. name .. ".png"},
is_ground_content = false, is_ground_content = false,
groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 3, 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()
local function is_pane(pos) local function is_pane(pos)
return minetest.get_item_group(minetest.get_node(pos).name, "pane") > 0 return minetest.get_item_group(minetest.get_node(pos).name, "pane") > 0
@ -148,7 +153,7 @@ function xpanes.register_pane(name, def)
end end
xpanes.register_pane("pane", { xpanes.register_pane("pane", {
description = "Glass Pane", description = S("Glass Pane"),
textures = {"default_glass.png","xpanes_pane_half.png","xpanes_edge.png"}, textures = {"default_glass.png","xpanes_pane_half.png","xpanes_edge.png"},
inventory_image = "default_glass.png", inventory_image = "default_glass.png",
wield_image = "default_glass.png", wield_image = "default_glass.png",
@ -161,7 +166,7 @@ xpanes.register_pane("pane", {
}) })
xpanes.register_pane("obsidian_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"}, textures = {"default_obsidian_glass.png","xpanes_pane_half.png","xpanes_edge_obsidian.png"},
inventory_image = "default_obsidian_glass.png", inventory_image = "default_obsidian_glass.png",
wield_image = "default_obsidian_glass.png", wield_image = "default_obsidian_glass.png",
@ -174,7 +179,7 @@ xpanes.register_pane("obsidian_pane", {
}) })
xpanes.register_pane("bar", { xpanes.register_pane("bar", {
description = "Steel Bars", description = S("Steel Bars"),
textures = {"xpanes_bar.png","xpanes_bar.png","xpanes_bar_top.png"}, textures = {"xpanes_bar.png","xpanes_bar.png","xpanes_bar_top.png"},
inventory_image = "xpanes_bar.png", inventory_image = "xpanes_bar.png",
wield_image = "xpanes_bar.png", wield_image = "xpanes_bar.png",