forked from minetest/minetest_game
Add support for MT 5 game translation (rebasing ) (#2466)
rebased #2368
This commit is contained in:
@ -1,5 +1,8 @@
|
||||
default.chest = {}
|
||||
|
||||
-- support for MT game translation.
|
||||
local S = default.get_translator
|
||||
|
||||
function default.chest.get_chest_formspec(pos)
|
||||
local spos = pos.x .. "," .. pos.y .. "," .. pos.z
|
||||
local formspec =
|
||||
@ -84,7 +87,7 @@ function default.chest.register_chest(name, d)
|
||||
if def.protected then
|
||||
def.on_construct = function(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("infotext", "Locked Chest")
|
||||
meta:set_string("infotext", S("Locked Chest"))
|
||||
meta:set_string("owner", "")
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("main", 8*4)
|
||||
@ -92,8 +95,7 @@ function default.chest.register_chest(name, d)
|
||||
def.after_place_node = function(pos, placer)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("owner", placer:get_player_name() or "")
|
||||
meta:set_string("infotext", "Locked Chest (owned by " ..
|
||||
meta:get_string("owner") .. ")")
|
||||
meta:set_string("infotext", S("Locked Chest (owned by @1)", meta:get_string("owner")))
|
||||
end
|
||||
def.can_dig = function(pos,player)
|
||||
local meta = minetest.get_meta(pos);
|
||||
@ -171,7 +173,7 @@ function default.chest.register_chest(name, d)
|
||||
-- verify placer is owner of lockable chest
|
||||
if owner ~= pn then
|
||||
minetest.record_protection_violation(pos, pn)
|
||||
minetest.chat_send_player(pn, "You do not own this chest.")
|
||||
minetest.chat_send_player(pn, S("You do not own this chest."))
|
||||
return nil
|
||||
end
|
||||
|
||||
@ -181,12 +183,12 @@ function default.chest.register_chest(name, d)
|
||||
meta:set_string("key_lock_secret", secret)
|
||||
end
|
||||
|
||||
return secret, "a locked chest", owner
|
||||
return secret, S("a locked chest"), owner
|
||||
end
|
||||
else
|
||||
def.on_construct = function(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("infotext", "Chest")
|
||||
meta:set_string("infotext", S("Chest"))
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("main", 8*4)
|
||||
end
|
||||
@ -285,7 +287,7 @@ function default.chest.register_chest(name, d)
|
||||
end
|
||||
|
||||
default.chest.register_chest("chest", {
|
||||
description = "Chest",
|
||||
description = S("Chest"),
|
||||
tiles = {
|
||||
"default_chest_top.png",
|
||||
"default_chest_top.png",
|
||||
@ -301,7 +303,7 @@ default.chest.register_chest("chest", {
|
||||
})
|
||||
|
||||
default.chest.register_chest("chest_locked", {
|
||||
description = "Locked Chest",
|
||||
description = S("Locked Chest"),
|
||||
tiles = {
|
||||
"default_chest_top.png",
|
||||
"default_chest_top.png",
|
||||
|
@ -1,13 +1,16 @@
|
||||
-- mods/default/craftitems.lua
|
||||
|
||||
-- support for MT game translation.
|
||||
local S = default.get_translator
|
||||
|
||||
minetest.register_craftitem("default:stick", {
|
||||
description = "Stick",
|
||||
description = S("Stick"),
|
||||
inventory_image = "default_stick.png",
|
||||
groups = {stick = 1, flammable = 2},
|
||||
})
|
||||
|
||||
minetest.register_craftitem("default:paper", {
|
||||
description = "Paper",
|
||||
description = S("Paper"),
|
||||
inventory_image = "default_paper.png",
|
||||
groups = {flammable = 3},
|
||||
})
|
||||
@ -108,7 +111,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
if #short_title > short_title_size + 3 then
|
||||
short_title = short_title:sub(1, short_title_size) .. "..."
|
||||
end
|
||||
data.description = "\""..short_title.."\" by "..data.owner
|
||||
data.description = S("\"@1\" by @2", short_title, data.owner)
|
||||
data.text = fields.text:sub(1, max_text_size)
|
||||
data.text = data.text:gsub("\r\n", "\n"):gsub("\r", "\n")
|
||||
data.page = 1
|
||||
@ -155,14 +158,14 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
end)
|
||||
|
||||
minetest.register_craftitem("default:book", {
|
||||
description = "Book",
|
||||
description = S("Book"),
|
||||
inventory_image = "default_book.png",
|
||||
groups = {book = 1, flammable = 3},
|
||||
on_use = book_on_use,
|
||||
})
|
||||
|
||||
minetest.register_craftitem("default:book_written", {
|
||||
description = "Book With Text",
|
||||
description = S("Book With Text"),
|
||||
inventory_image = "default_book_written.png",
|
||||
groups = {book = 1, not_in_creative_inventory = 1, flammable = 3},
|
||||
stack_max = 1,
|
||||
@ -199,7 +202,7 @@ minetest.register_on_craft(function(itemstack, player, old_craft_grid, craft_inv
|
||||
end)
|
||||
|
||||
minetest.register_craftitem("default:skeleton_key", {
|
||||
description = "Skeleton Key",
|
||||
description = S("Skeleton Key"),
|
||||
inventory_image = "default_key_skeleton.png",
|
||||
groups = {key = 1},
|
||||
on_use = function(itemstack, user, pointed_thing)
|
||||
@ -238,8 +241,8 @@ minetest.register_craftitem("default:skeleton_key", {
|
||||
local new_stack = ItemStack("default:key")
|
||||
local meta = new_stack:get_meta()
|
||||
meta:set_string("secret", secret)
|
||||
meta:set_string("description", "Key to "..user:get_player_name().."'s "
|
||||
..minetest.registered_nodes[node.name].description)
|
||||
meta:set_string("description", S("Key to @1's @2", user:get_player_name(),
|
||||
minetest.registered_nodes[node.name].description))
|
||||
|
||||
if itemstack:get_count() == 0 then
|
||||
itemstack = new_stack
|
||||
@ -255,93 +258,93 @@ minetest.register_craftitem("default:skeleton_key", {
|
||||
})
|
||||
|
||||
minetest.register_craftitem("default:coal_lump", {
|
||||
description = "Coal Lump",
|
||||
description = S("Coal Lump"),
|
||||
inventory_image = "default_coal_lump.png",
|
||||
groups = {coal = 1, flammable = 1}
|
||||
})
|
||||
|
||||
minetest.register_craftitem("default:iron_lump", {
|
||||
description = "Iron Lump",
|
||||
description = S("Iron Lump"),
|
||||
inventory_image = "default_iron_lump.png"
|
||||
})
|
||||
|
||||
minetest.register_craftitem("default:copper_lump", {
|
||||
description = "Copper Lump",
|
||||
description = S("Copper Lump"),
|
||||
inventory_image = "default_copper_lump.png"
|
||||
})
|
||||
|
||||
minetest.register_craftitem("default:tin_lump", {
|
||||
description = "Tin Lump",
|
||||
description = S("Tin Lump"),
|
||||
inventory_image = "default_tin_lump.png"
|
||||
})
|
||||
|
||||
minetest.register_craftitem("default:mese_crystal", {
|
||||
description = "Mese Crystal",
|
||||
description = S("Mese Crystal"),
|
||||
inventory_image = "default_mese_crystal.png",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("default:gold_lump", {
|
||||
description = "Gold Lump",
|
||||
description = S("Gold Lump"),
|
||||
inventory_image = "default_gold_lump.png"
|
||||
})
|
||||
|
||||
minetest.register_craftitem("default:diamond", {
|
||||
description = "Diamond",
|
||||
description = S("Diamond"),
|
||||
inventory_image = "default_diamond.png",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("default:clay_lump", {
|
||||
description = "Clay Lump",
|
||||
description = S("Clay Lump"),
|
||||
inventory_image = "default_clay_lump.png",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("default:steel_ingot", {
|
||||
description = "Steel Ingot",
|
||||
description = S("Steel Ingot"),
|
||||
inventory_image = "default_steel_ingot.png"
|
||||
})
|
||||
|
||||
minetest.register_craftitem("default:copper_ingot", {
|
||||
description = "Copper Ingot",
|
||||
description = S("Copper Ingot"),
|
||||
inventory_image = "default_copper_ingot.png"
|
||||
})
|
||||
|
||||
minetest.register_craftitem("default:tin_ingot", {
|
||||
description = "Tin Ingot",
|
||||
description = S("Tin Ingot"),
|
||||
inventory_image = "default_tin_ingot.png"
|
||||
})
|
||||
|
||||
minetest.register_craftitem("default:bronze_ingot", {
|
||||
description = "Bronze Ingot",
|
||||
description = S("Bronze Ingot"),
|
||||
inventory_image = "default_bronze_ingot.png"
|
||||
})
|
||||
|
||||
minetest.register_craftitem("default:gold_ingot", {
|
||||
description = "Gold Ingot",
|
||||
description = S("Gold Ingot"),
|
||||
inventory_image = "default_gold_ingot.png"
|
||||
})
|
||||
|
||||
minetest.register_craftitem("default:mese_crystal_fragment", {
|
||||
description = "Mese Crystal Fragment",
|
||||
description = S("Mese Crystal Fragment"),
|
||||
inventory_image = "default_mese_crystal_fragment.png",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("default:clay_brick", {
|
||||
description = "Clay Brick",
|
||||
description = S("Clay Brick"),
|
||||
inventory_image = "default_clay_brick.png",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("default:obsidian_shard", {
|
||||
description = "Obsidian Shard",
|
||||
description = S("Obsidian Shard"),
|
||||
inventory_image = "default_obsidian_shard.png",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("default:flint", {
|
||||
description = "Flint",
|
||||
description = S("Flint"),
|
||||
inventory_image = "default_flint.png"
|
||||
})
|
||||
|
||||
minetest.register_craftitem("default:blueberries", {
|
||||
description = "Blueberries",
|
||||
description = S("Blueberries"),
|
||||
inventory_image = "default_blueberries.png",
|
||||
groups = {food_blueberries = 1, food_berry = 1},
|
||||
on_use = minetest.item_eat(2),
|
||||
|
@ -1,3 +1,7 @@
|
||||
-- default/furnace.lua
|
||||
|
||||
-- support for MT game translation.
|
||||
local S = default.get_translator
|
||||
|
||||
--
|
||||
-- Formspecs
|
||||
@ -60,7 +64,7 @@ local function allow_metadata_inventory_put(pos, listname, index, stack, player)
|
||||
if listname == "fuel" then
|
||||
if minetest.get_craft_result({method="fuel", width=1, items={stack}}).time ~= 0 then
|
||||
if inv:is_empty("src") then
|
||||
meta:set_string("infotext", "Furnace is empty")
|
||||
meta:set_string("infotext", S("Furnace is empty"))
|
||||
end
|
||||
return stack:get_count()
|
||||
else
|
||||
@ -209,19 +213,19 @@ local function furnace_node_timer(pos, elapsed)
|
||||
if cookable then
|
||||
item_percent = math.floor(src_time / cooked.time * 100)
|
||||
if dst_full then
|
||||
item_state = "100% (output full)"
|
||||
item_state = S("100% (output full)")
|
||||
else
|
||||
item_state = item_percent .. "%"
|
||||
item_state = S("@1%", item_percent)
|
||||
end
|
||||
else
|
||||
if srclist[1]:is_empty() then
|
||||
item_state = "Empty"
|
||||
item_state = S("Empty")
|
||||
else
|
||||
item_state = "Not cookable"
|
||||
item_state = S("Not cookable")
|
||||
end
|
||||
end
|
||||
|
||||
local fuel_state = "Empty"
|
||||
local fuel_state = S("Empty")
|
||||
local active = "inactive"
|
||||
local result = false
|
||||
|
||||
@ -243,8 +247,9 @@ local function furnace_node_timer(pos, elapsed)
|
||||
minetest.get_node_timer(pos):stop()
|
||||
end
|
||||
|
||||
local infotext = "Furnace " .. active .. "\n(Item: " .. item_state ..
|
||||
"; Fuel: " .. fuel_state .. ")"
|
||||
-- local infotext = "Furnace " .. active .. "\n(Item: " .. item_state ..
|
||||
-- "; Fuel: " .. fuel_state .. ")"
|
||||
local infotext = S("Furnace @1 \n(Item: @2; Fuel: @3)", active, item_state, fuel_state)
|
||||
|
||||
--
|
||||
-- Set meta values
|
||||
@ -263,7 +268,7 @@ end
|
||||
--
|
||||
|
||||
minetest.register_node("default:furnace", {
|
||||
description = "Furnace",
|
||||
description = S("Furnace"),
|
||||
tiles = {
|
||||
"default_furnace_top.png", "default_furnace_bottom.png",
|
||||
"default_furnace_side.png", "default_furnace_side.png",
|
||||
@ -311,7 +316,7 @@ minetest.register_node("default:furnace", {
|
||||
})
|
||||
|
||||
minetest.register_node("default:furnace_active", {
|
||||
description = "Furnace",
|
||||
description = S("Furnace"),
|
||||
tiles = {
|
||||
"default_furnace_top.png", "default_furnace_bottom.png",
|
||||
"default_furnace_side.png", "default_furnace_side.png",
|
||||
|
@ -3,10 +3,14 @@
|
||||
|
||||
-- The API documentation in here was moved into game_api.txt
|
||||
|
||||
-- Load support for MT game translation.
|
||||
local S = minetest.get_translator("default")
|
||||
|
||||
-- Definitions made by this mod that other mods can use too
|
||||
default = {}
|
||||
|
||||
default.LIGHT_MAX = 14
|
||||
default.get_translator = S
|
||||
|
||||
-- GUI related stuff
|
||||
minetest.register_on_joinplayer(function(player)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,8 @@
|
||||
-- mods/default/tools.lua
|
||||
|
||||
-- support for MT game translation.
|
||||
local S = default.get_translator
|
||||
|
||||
-- The hand
|
||||
minetest.register_item(":", {
|
||||
type = "none",
|
||||
@ -22,7 +25,7 @@ minetest.register_item(":", {
|
||||
--
|
||||
|
||||
minetest.register_tool("default:pick_wood", {
|
||||
description = "Wooden Pickaxe",
|
||||
description = S("Wooden Pickaxe"),
|
||||
inventory_image = "default_tool_woodpick.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.2,
|
||||
@ -37,7 +40,7 @@ minetest.register_tool("default:pick_wood", {
|
||||
})
|
||||
|
||||
minetest.register_tool("default:pick_stone", {
|
||||
description = "Stone Pickaxe",
|
||||
description = S("Stone Pickaxe"),
|
||||
inventory_image = "default_tool_stonepick.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.3,
|
||||
@ -52,7 +55,7 @@ minetest.register_tool("default:pick_stone", {
|
||||
})
|
||||
|
||||
minetest.register_tool("default:pick_bronze", {
|
||||
description = "Bronze Pickaxe",
|
||||
description = S("Bronze Pickaxe"),
|
||||
inventory_image = "default_tool_bronzepick.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.0,
|
||||
@ -67,7 +70,7 @@ minetest.register_tool("default:pick_bronze", {
|
||||
})
|
||||
|
||||
minetest.register_tool("default:pick_steel", {
|
||||
description = "Steel Pickaxe",
|
||||
description = S("Steel Pickaxe"),
|
||||
inventory_image = "default_tool_steelpick.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.0,
|
||||
@ -82,7 +85,7 @@ minetest.register_tool("default:pick_steel", {
|
||||
})
|
||||
|
||||
minetest.register_tool("default:pick_mese", {
|
||||
description = "Mese Pickaxe",
|
||||
description = S("Mese Pickaxe"),
|
||||
inventory_image = "default_tool_mesepick.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 0.9,
|
||||
@ -97,7 +100,7 @@ minetest.register_tool("default:pick_mese", {
|
||||
})
|
||||
|
||||
minetest.register_tool("default:pick_diamond", {
|
||||
description = "Diamond Pickaxe",
|
||||
description = S("Diamond Pickaxe"),
|
||||
inventory_image = "default_tool_diamondpick.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 0.9,
|
||||
@ -116,7 +119,7 @@ minetest.register_tool("default:pick_diamond", {
|
||||
--
|
||||
|
||||
minetest.register_tool("default:shovel_wood", {
|
||||
description = "Wooden Shovel",
|
||||
description = S("Wooden Shovel"),
|
||||
inventory_image = "default_tool_woodshovel.png",
|
||||
wield_image = "default_tool_woodshovel.png^[transformR90",
|
||||
tool_capabilities = {
|
||||
@ -132,7 +135,7 @@ minetest.register_tool("default:shovel_wood", {
|
||||
})
|
||||
|
||||
minetest.register_tool("default:shovel_stone", {
|
||||
description = "Stone Shovel",
|
||||
description = S("Stone Shovel"),
|
||||
inventory_image = "default_tool_stoneshovel.png",
|
||||
wield_image = "default_tool_stoneshovel.png^[transformR90",
|
||||
tool_capabilities = {
|
||||
@ -148,7 +151,7 @@ minetest.register_tool("default:shovel_stone", {
|
||||
})
|
||||
|
||||
minetest.register_tool("default:shovel_bronze", {
|
||||
description = "Bronze Shovel",
|
||||
description = S("Bronze Shovel"),
|
||||
inventory_image = "default_tool_bronzeshovel.png",
|
||||
wield_image = "default_tool_bronzeshovel.png^[transformR90",
|
||||
tool_capabilities = {
|
||||
@ -164,7 +167,7 @@ minetest.register_tool("default:shovel_bronze", {
|
||||
})
|
||||
|
||||
minetest.register_tool("default:shovel_steel", {
|
||||
description = "Steel Shovel",
|
||||
description = S("Steel Shovel"),
|
||||
inventory_image = "default_tool_steelshovel.png",
|
||||
wield_image = "default_tool_steelshovel.png^[transformR90",
|
||||
tool_capabilities = {
|
||||
@ -180,7 +183,7 @@ minetest.register_tool("default:shovel_steel", {
|
||||
})
|
||||
|
||||
minetest.register_tool("default:shovel_mese", {
|
||||
description = "Mese Shovel",
|
||||
description = S("Mese Shovel"),
|
||||
inventory_image = "default_tool_meseshovel.png",
|
||||
wield_image = "default_tool_meseshovel.png^[transformR90",
|
||||
tool_capabilities = {
|
||||
@ -196,7 +199,7 @@ minetest.register_tool("default:shovel_mese", {
|
||||
})
|
||||
|
||||
minetest.register_tool("default:shovel_diamond", {
|
||||
description = "Diamond Shovel",
|
||||
description = S("Diamond Shovel"),
|
||||
inventory_image = "default_tool_diamondshovel.png",
|
||||
wield_image = "default_tool_diamondshovel.png^[transformR90",
|
||||
tool_capabilities = {
|
||||
@ -216,7 +219,7 @@ minetest.register_tool("default:shovel_diamond", {
|
||||
--
|
||||
|
||||
minetest.register_tool("default:axe_wood", {
|
||||
description = "Wooden Axe",
|
||||
description = S("Wooden Axe"),
|
||||
inventory_image = "default_tool_woodaxe.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.0,
|
||||
@ -231,7 +234,7 @@ minetest.register_tool("default:axe_wood", {
|
||||
})
|
||||
|
||||
minetest.register_tool("default:axe_stone", {
|
||||
description = "Stone Axe",
|
||||
description = S("Stone Axe"),
|
||||
inventory_image = "default_tool_stoneaxe.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.2,
|
||||
@ -246,7 +249,7 @@ minetest.register_tool("default:axe_stone", {
|
||||
})
|
||||
|
||||
minetest.register_tool("default:axe_bronze", {
|
||||
description = "Bronze Axe",
|
||||
description = S("Bronze Axe"),
|
||||
inventory_image = "default_tool_bronzeaxe.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.0,
|
||||
@ -261,7 +264,7 @@ minetest.register_tool("default:axe_bronze", {
|
||||
})
|
||||
|
||||
minetest.register_tool("default:axe_steel", {
|
||||
description = "Steel Axe",
|
||||
description = S("Steel Axe"),
|
||||
inventory_image = "default_tool_steelaxe.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.0,
|
||||
@ -276,7 +279,7 @@ minetest.register_tool("default:axe_steel", {
|
||||
})
|
||||
|
||||
minetest.register_tool("default:axe_mese", {
|
||||
description = "Mese Axe",
|
||||
description = S("Mese Axe"),
|
||||
inventory_image = "default_tool_meseaxe.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 0.9,
|
||||
@ -291,7 +294,7 @@ minetest.register_tool("default:axe_mese", {
|
||||
})
|
||||
|
||||
minetest.register_tool("default:axe_diamond", {
|
||||
description = "Diamond Axe",
|
||||
description = S("Diamond Axe"),
|
||||
inventory_image = "default_tool_diamondaxe.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 0.9,
|
||||
@ -310,7 +313,7 @@ minetest.register_tool("default:axe_diamond", {
|
||||
--
|
||||
|
||||
minetest.register_tool("default:sword_wood", {
|
||||
description = "Wooden Sword",
|
||||
description = S("Wooden Sword"),
|
||||
inventory_image = "default_tool_woodsword.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1,
|
||||
@ -325,7 +328,7 @@ minetest.register_tool("default:sword_wood", {
|
||||
})
|
||||
|
||||
minetest.register_tool("default:sword_stone", {
|
||||
description = "Stone Sword",
|
||||
description = S("Stone Sword"),
|
||||
inventory_image = "default_tool_stonesword.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.2,
|
||||
@ -340,7 +343,7 @@ minetest.register_tool("default:sword_stone", {
|
||||
})
|
||||
|
||||
minetest.register_tool("default:sword_bronze", {
|
||||
description = "Bronze Sword",
|
||||
description = S("Bronze Sword"),
|
||||
inventory_image = "default_tool_bronzesword.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 0.8,
|
||||
@ -355,7 +358,7 @@ minetest.register_tool("default:sword_bronze", {
|
||||
})
|
||||
|
||||
minetest.register_tool("default:sword_steel", {
|
||||
description = "Steel Sword",
|
||||
description = S("Steel Sword"),
|
||||
inventory_image = "default_tool_steelsword.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 0.8,
|
||||
@ -370,7 +373,7 @@ minetest.register_tool("default:sword_steel", {
|
||||
})
|
||||
|
||||
minetest.register_tool("default:sword_mese", {
|
||||
description = "Mese Sword",
|
||||
description = S("Mese Sword"),
|
||||
inventory_image = "default_tool_mesesword.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 0.7,
|
||||
@ -385,7 +388,7 @@ minetest.register_tool("default:sword_mese", {
|
||||
})
|
||||
|
||||
minetest.register_tool("default:sword_diamond", {
|
||||
description = "Diamond Sword",
|
||||
description = S("Diamond Sword"),
|
||||
inventory_image = "default_tool_diamondsword.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 0.7,
|
||||
@ -400,7 +403,7 @@ minetest.register_tool("default:sword_diamond", {
|
||||
})
|
||||
|
||||
minetest.register_tool("default:key", {
|
||||
description = "Key",
|
||||
description = S("Key"),
|
||||
inventory_image = "default_key.png",
|
||||
groups = {key = 1, not_in_creative_inventory = 1},
|
||||
stack_max = 1,
|
||||
|
@ -1,3 +1,8 @@
|
||||
-- default/torch.lua
|
||||
|
||||
-- support for MT game translation.
|
||||
local S = default.get_translator
|
||||
|
||||
local function on_flood(pos, oldnode, newnode)
|
||||
minetest.add_item(pos, ItemStack("default:torch 1"))
|
||||
-- Play flame-extinguish sound if liquid is not an 'igniter'
|
||||
@ -14,7 +19,7 @@ local function on_flood(pos, oldnode, newnode)
|
||||
end
|
||||
|
||||
minetest.register_node("default:torch", {
|
||||
description = "Torch",
|
||||
description = S("Torch"),
|
||||
drawtype = "mesh",
|
||||
mesh = "torch_floor.obj",
|
||||
inventory_image = "default_torch_on_floor.png",
|
||||
|
@ -1,3 +1,8 @@
|
||||
-- default/trees.lua
|
||||
|
||||
-- support for MT game translation.
|
||||
local S = default.get_translator
|
||||
|
||||
local random = math.random
|
||||
|
||||
--
|
||||
@ -560,9 +565,12 @@ function default.sapling_on_place(itemstack, placer, pointed_thing,
|
||||
interval) then
|
||||
minetest.record_protection_violation(pos, player_name)
|
||||
-- Print extra information to explain
|
||||
-- minetest.chat_send_player(player_name,
|
||||
-- itemstack:get_definition().description .. " will intersect protection " ..
|
||||
-- "on growth")
|
||||
minetest.chat_send_player(player_name,
|
||||
itemstack:get_definition().description .. " will intersect protection " ..
|
||||
"on growth")
|
||||
S("@1 will intersect protection on growth.",
|
||||
itemstack:get_definition().description))
|
||||
return itemstack
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user