MT5 translation for homedecor_common

- Remove intllib support
- Fix luacheck warnings (except for 1 I don't know what to do)
- Removes homedecor_common/mt_game_beds_functions.lua (we can get the
function directly from `beds` mod instead of using an obsolete copie; I
have not re-enabled bed-sleeping, but it should work)
This commit is contained in:
Louis Royer 2020-08-05 02:36:06 +02:00
parent f0ab7a6c78
commit 1c7ceb2e90
34 changed files with 307 additions and 17060 deletions

View File

@ -11,7 +11,6 @@ read_globals = {
"vector", "nodeupdate",
"VoxelManip", "VoxelArea",
"PseudoRandom", "ItemStack",
"intllib",
"default",
"doors",
"stairsplus",
@ -22,7 +21,6 @@ read_globals = {
"mesecon",
"unifieddyes",
"creative",
"homedecor_i18n",
"homedecor",
"player_api",
"skins",

View File

@ -1,6 +1,6 @@
local S = minetest.get_translator("homedecor_bedroom")
local sc = minetest.get_modpath("screwdriver") and screwdriver.disallow or nil
local sc_disallow = minetest.get_modpath("screwdriver") and screwdriver.disallow or nil
local bed_sbox = {
type = "wallmounted",
@ -30,6 +30,9 @@ local kbed_cbox = {
}
}
-- local bed_on_rightclick = minetest.registered_nodes["beds:bed"].on_rightclick
homedecor.register("bed_regular", {
mesh = "homedecor_bed_regular.obj",
tiles = {
@ -65,7 +68,7 @@ homedecor.register("bed_regular", {
homedecor.bed_expansion(pos, clicker, itemstack, pointed_thing, true)
return itemstack
-- else
-- homedecor.beds_on_rightclick(pos, node, clicker)
-- bed_on_rightclick(pos, node, clicker)
-- return itemstack
end
end
@ -94,7 +97,7 @@ homedecor.register("bed_extended", {
end,
on_dig = unifieddyes.on_dig,
-- on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
-- homedecor.beds_on_rightclick(pos, node, clicker)
-- bed_on_rightclick(pos, node, clicker)
-- return itemstack
-- end,
drop = "homedecor:bed_regular"
@ -131,7 +134,7 @@ homedecor.register("bed_kingsize", {
end,
on_dig = unifieddyes.on_dig,
-- on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
-- homedecor.beds_on_rightclick(pos, node, clicker)
-- bed_on_rightclick(pos, node, clicker)
-- return itemstack
-- end,
})

View File

@ -1,4 +1,4 @@
name = homedecor_bedroom
description = Homedecor mod: bedroom
depends = homedecor_common, default, basic_materials, unifieddyes, creative
depends = homedecor_common, default, basic_materials, unifieddyes, creative, beds
optional_depends = screwdriver

View File

@ -1,6 +1,6 @@
-- crafts for common items that are used by more than one home decor component
local S = homedecor.gettext
local S = minetest.get_translator("homedecor_common")
-- items

View File

@ -1,3 +0,0 @@
default
creative
intllib?

View File

@ -1,5 +1,4 @@
local S = homedecor.gettext
local S = minetest.get_translator("homedecor_common")
-- vectors to place one node next to or behind another
@ -214,19 +213,13 @@ function homedecor.bed_expansion(pos, placer, itemstack, pointed_thing, trybunks
local rightpos = {x=pos.x+rxd, y=pos.y, z=pos.z+rzd}
local rightnode = minetest.get_node(rightpos)
local inv = placer:get_inventory()
if leftnode.name == "homedecor:bed_regular" then
local newname = string.gsub(thisnode.name, "_regular", "_kingsize")
local meta = minetest.get_meta(pos)
local leftmeta = minetest.get_meta(leftpos)
minetest.set_node(pos, {name = "air"})
minetest.swap_node(leftpos, { name = newname, param2 = param2})
elseif rightnode.name == "homedecor:bed_regular" then
local newname = string.gsub(thisnode.name, "_regular", "_kingsize")
local meta = minetest.get_meta(pos)
local rightmeta = minetest.get_meta(rightpos)
minetest.set_node(rightpos, {name = "air"})
minetest.swap_node(pos, { name = newname, param2 = param2})
@ -238,6 +231,7 @@ function homedecor.bed_expansion(pos, placer, itemstack, pointed_thing, trybunks
if trybunks and is_buildable_to(placer_name, toppos, topposfwd) then
local newname = string.gsub(thisnode.name, "_regular", "_extended")
local newparam2 = param2 % 8
-- FIXME: is newparam2 a legacy unused variable from a8729575abfbd15cc622b413b71976c9157fbab4? or should this variable be used somewhere?
minetest.swap_node(toppos, { name = thisnode.name, param2 = param2})
minetest.swap_node(pos, { name = newname, param2 = param2})
itemstack:take_item()

View File

@ -1,6 +1,6 @@
-- This code supplies an oven/stove. Basically it's just a copy of the default furnace with different textures.
local S = homedecor.gettext
local S = minetest.get_translator("homedecor_common")
local function swap_node(pos, name)
local node = minetest.get_node(pos)

View File

@ -6,11 +6,6 @@ local modpath = minetest.get_modpath("homedecor_common")
homedecor = {}
homedecor.modpath = modpath
-- Intllib support
homedecor.gettext, homedecor.ngettext = dofile(modpath.."/intllib.lua")
local S = homedecor.gettext
-- Determine if the item being pointed at is the underside of a node (e.g a ceiling)
function homedecor.find_ceiling(itemstack, placer, pointed_thing)
-- most of this is copied from the rotate-and-place function in builtin
@ -54,8 +49,6 @@ function homedecor.find_ceiling(itemstack, placer, pointed_thing)
return isceiling, pos
end
screwdriver = screwdriver or {}
homedecor.plain_wood = { name = "homedecor_generic_wood_plain.png", color = 0xffa76820 }
homedecor.mahogany_wood = { name = "homedecor_generic_wood_plain.png", color = 0xff7d2506 }
homedecor.white_wood = "homedecor_generic_wood_plain.png"
@ -73,10 +66,9 @@ dofile(modpath.."/furnaces.lua")
dofile(modpath.."/inventory.lua")
dofile(modpath.."/registration.lua")
dofile(modpath.."/water_particles.lua")
dofile(modpath.."/mt_game_beds_functions.lua")
dofile(modpath.."/sit.lua")
dofile(modpath.."/crafts.lua")
if minetest.settings:get_bool("log_mod") then
minetest.log("action", "[HomeDecor API] " .. S("Loaded!"))
minetest.log("action", "[HomeDecor API] Loaded!")
end

View File

@ -1,45 +0,0 @@
-- Fallback functions for when `intllib` is not installed.
-- Code released under Unlicense <http://unlicense.org>.
-- Get the latest version of this file at:
-- https://raw.githubusercontent.com/minetest-mods/intllib/master/lib/intllib.lua
local function format(str, ...)
local args = { ... }
local function repl(escape, open, num, close)
if escape == "" then
local replacement = tostring(args[tonumber(num)])
if open == "" then
replacement = replacement..close
end
return replacement
else
return "@"..open..num..close
end
end
return (str:gsub("(@?)@(%(?)(%d+)(%)?)", repl))
end
local gettext, ngettext
if minetest.get_modpath("intllib") then
if intllib.make_gettext_pair then
-- New method using gettext.
gettext, ngettext = intllib.make_gettext_pair()
else
-- Old method using text files.
gettext = intllib.Getter()
end
end
-- Fill in missing functions.
gettext = gettext or function(msgid, ...)
return format(msgid, ...)
end
ngettext = ngettext or function(msgid, msgid_plural, n, ...)
return format(n==1 and msgid or msgid_plural, ...)
end
return gettext, ngettext

View File

@ -1,5 +1,4 @@
local S = homedecor.gettext
local S = minetest.get_translator("homedecor_common")
local default_can_dig = function(pos,player)
local meta = minetest.get_meta(pos)
@ -86,19 +85,15 @@ function homedecor.handle_inventory(name, def, original_def)
def.can_dig = def.can_dig or default_can_dig
def.on_metadata_inventory_move = def.on_metadata_inventory_move or
function(pos, from_list, from_index, to_list, to_index, count, player)
minetest.log("action", S("@1 moves stuff in @2 at @3",
player:get_player_name(), name, minetest.pos_to_string(pos)
))
minetest.log("action", player:get_player_name().." moves stuff in "..name.." at "..minetest.pos_to_string(pos))
end
def.on_metadata_inventory_put = def.on_metadata_inventory_put or function(pos, listname, index, stack, player)
minetest.log("action", S("@1 moves @2 to @3 at @4",
player:get_player_name(), stack:get_name(), name, minetest.pos_to_string(pos)
))
minetest.log("action", player:get_player_name().." moves "..stack:get_name()
.." to "..name.." at "..minetest.pos_to_string(pos))
end
def.on_metadata_inventory_take = def.on_metadata_inventory_take or function(pos, listname, index, stack, player)
minetest.log("action", S("@1 takes @2 from @3 at @4",
player:get_player_name(), stack:get_name(), name, minetest.pos_to_string(pos)
))
minetest.log("action", player:get_player_name().." takes "..stack:get_name()
.." from "..name.." at "..minetest.pos_to_string(pos))
end
local locked = inventory.locked
@ -116,10 +111,8 @@ function homedecor.handle_inventory(name, def, original_def)
local allow_move = def.allow_metadata_inventory_move
def.allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
if not default.can_interact_with_node(player, pos) then
minetest.log("action", S("@1 tried to access a @2 belonging to @3 at @4",
player:get_player_name(), name,
minetest.get_meta(pos):get_string("owner"), minetest.pos_to_string(pos)
))
minetest.log("action", player:get_player_name().." tried to access a "..name.." belonging to "
..minetest.get_meta(pos):get_string("owner").." at "..minetest.pos_to_string(pos))
return 0
end
return allow_move and allow_move(pos, from_list, from_index, to_list, to_index, count, player) or
@ -129,10 +122,8 @@ function homedecor.handle_inventory(name, def, original_def)
local allow_put = def.allow_metadata_inventory_put
def.allow_metadata_inventory_put = function(pos, listname, index, stack, player)
if not default.can_interact_with_node(player, pos) then
minetest.log("action", S("@1 tried to access a @2 belonging to @3 at @4",
player:get_player_name(), name,
minetest.get_meta(pos):get_string("owner"), minetest.pos_to_string(pos)
))
minetest.log("action", player:get_player_name().." tried to access a "..name.." belonging to"
..minetest.get_meta(pos):get_string("owner").." at "..minetest.pos_to_string(pos))
return 0
end
return allow_put and allow_put(pos, listname, index, stack, player) or
@ -142,10 +133,8 @@ function homedecor.handle_inventory(name, def, original_def)
local allow_take = def.allow_metadata_inventory_take
def.allow_metadata_inventory_take = function(pos, listname, index, stack, player)
if not default.can_interact_with_node(player, pos) then
minetest.log("action", S("@1 tried to access a @2 belonging to @3 at @4",
player:get_player_name(), name,
minetest.get_meta(pos):get_string("owner"), minetest.pos_to_string(pos)
))
minetest.log("action", player:get_player_name().." tried to access a "..name.." belonging to"
..minetest.get_meta(pos):get_string("owner").." at ".. minetest.pos_to_string(pos))
return 0
end
return allow_take and allow_take(pos, listname, index, stack, player) or

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,28 @@
# textdomain: homedecor_common
### crafts.lua ###
Small Wooden Drawer=Kleine Holzschublade
Terracotta Roof Tile=Terrakottadachziegel
### expansion.lua ###
Not enough room - the space for the headboard is occupied!=Nicht genügeng Platz Der Platz für das Kopfende ist belegt!
Not enough room - the upper space is occupied!=Nicht genügend Platz der obere Teil ist belegt!
Someone already owns that spot.=Jemanden gehört diese Stelle schon.
Someone already owns the spot where the headboard goes.=Jemanden gehört schon der Platz, wo das Kopfende hingehen würde.
### furnaces.lua ###
@1 (active)=@1 (aktiv)
@1 (active: @2%)=@1 (aktiv: @2%)
@1 (empty)=@1 (leer)
@1 (out of fuel)=@1 (kein Brennmaterial vorhanden)
@1 (output bins are full)=@1 (Ausgabe ist voll)
Furnace=Ofen
### inventory.lua ###
@1 (Locked)=@1 (abgeschlossen)
@1 (owned by @2)=@1 (gehört @2)

View File

@ -0,0 +1,28 @@
# textdomain: homedecor_common
### crafts.lua ###
Small Wooden Drawer=Cajón de madera pequeño
Terracotta Roof Tile=Tejado de terracota
### expansion.lua ###
Not enough room - the space for the headboard is occupied!=No hay suficiente espacio - ¡El espacio para la cabecera está ocupado!
Not enough room - the upper space is occupied!=No hay suficiente espacio - ¡El espacio de encima está ocupado!
Someone already owns that spot.=Alguien ya es dueño de ese lugar.
Someone already owns the spot where the headboard goes.=Alguien ya es dueño del lugar donde va la cabecera.
### furnaces.lua ###
@1 (active)=@1 (activo)
@1 (active: @2%)=@1 (activo: @2%)
@1 (empty)=@1 (vacía)
@1 (out of fuel)=@1 (sin combustible)
@1 (output bins are full)=@1 (ranuras de salida llenas)
Furnace=Horno
### inventory.lua ###
@1 (Locked)=@1 (Cerrado)
@1 (owned by @2)=@1 (propiedad de @2)

View File

@ -0,0 +1,28 @@
# textdomain: homedecor_common
### crafts.lua ###
Small Wooden Drawer=Petit tiroir en bois
Terracotta Roof Tile=Tuile en terre cuite
### expansion.lua ###
Not enough room - the space for the headboard is occupied!=Pas assez de place - l'espace pour la tête de lit est occupé !
Not enough room - the upper space is occupied!=Pas assez de place - l'espace en haut est occupé !
Someone already owns that spot.=Quelqu'un est déjà propriétaire de cette zone.
Someone already owns the spot where the headboard goes.=Quelqu'un possède déjà l'endroit où doit aller la tête de lit.
### furnaces.lua ###
@1 (active)=@1 (actif)
@1 (active: @2%)=@1 (actif : @2%)
@1 (empty)=@1 (vide)
@1 (out of fuel)=@1 (pas de combustible)
@1 (output bins are full)=@1 (les réceptacles de sortie sont pleins)
Furnace=Fourneau
### inventory.lua ###
@1 (Locked)=@1 (verrouillé)
@1 (owned by @2)=@1 (propriété de @2)

View File

@ -0,0 +1,28 @@
# textdomain: homedecor_common
### crafts.lua ###
Small Wooden Drawer=Bauletto in legno
Terracotta Roof Tile=Tegole di terracotta
### expansion.lua ###
Not enough room - the space for the headboard is occupied!=
Not enough room - the upper space is occupied!=
Someone already owns that spot.=Spiacente, quel punto è di proprietà di %s.
Someone already owns the spot where the headboard goes.=
### furnaces.lua ###
@1 (active)=
@1 (active: @2%)=
@1 (empty)=
@1 (out of fuel)=Senza combustibile
@1 (output bins are full)=i contenitori sono pieni
Furnace=
### inventory.lua ###
@1 (Locked)=%s (Con lucchetto)
@1 (owned by @2)=%s (di proprietà di %s)

View File

@ -0,0 +1,28 @@
# textdomain: homedecor_common
### crafts.lua ###
Small Wooden Drawer=Laci Kayu Kecil
Terracotta Roof Tile=Genting Bumbung Terracotta
### expansion.lua ###
Not enough room - the space for the headboard is occupied!=Tidak cukup ruang - ada barang di kawasan untuk letak kepala katil!
Not enough room - the upper space is occupied!=Tidak cukup ruang - ada barang di kawasan atas!
Someone already owns that spot.=Kawasan itu kepunyaan orang lain.
Someone already owns the spot where the headboard goes.=Tempat untuk letak kepala katil itu kawasan kepunyaan orang lain.
### furnaces.lua ###
@1 (active)=@1 (aktif)
@1 (active: @2%)=@1 (aktif: @2)
@1 (empty)=@1 (kosong)
@1 (out of fuel)=@1 (kehabisan bahan api)
@1 (output bins are full)=@1 (dulang keluar penuh)
Furnace=Relau
### inventory.lua ###
@1 (Locked)=@1 (Berkunci)
@1 (owned by @2)=@1 (hak milik @2)

View File

@ -0,0 +1,28 @@
# textdomain: homedecor_common
### crafts.lua ###
Small Wooden Drawer=Gaveta Pequena de Madeira
Terracotta Roof Tile=Telha de Terracota
### expansion.lua ###
Not enough room - the space for the headboard is occupied!=Sem espaço - o espaço para a cabeceira está ocupado!
Not enough room - the upper space is occupied!=Sem espaço - o espaço acima está ocupado!
Someone already owns that spot.=Alguém já é proprietário deste lugar.
Someone already owns the spot where the headboard goes.=Alguém já é proprietário do local onde a cabeceira vai.
### furnaces.lua ###
@1 (active)=@1 (ativo)
@1 (active: @2%)=@1 (ativo: @2%)
@1 (empty)=@1 (vazio)
@1 (out of fuel)=@1 (sem combustível)
@1 (output bins are full)=@1 (saída de itens está lotada)
Furnace=Forno
### inventory.lua ###
@1 (Locked)=@1 (trancado)
@1 (owned by @2)=@1 (pertence a @2)

View File

@ -0,0 +1,28 @@
# textdomain: homedecor_common
### crafts.lua ###
Small Wooden Drawer=Gaveta Pequena de Madeira
Terracotta Roof Tile=Telha de Terracota
### expansion.lua ###
Not enough room - the space for the headboard is occupied!=Sem espaço - o espaço para a cabeceira está ocupado!
Not enough room - the upper space is occupied!=Sem espaço - o espaço acima está ocupado!
Someone already owns that spot.=Alguém já é proprietário deste lugar.
Someone already owns the spot where the headboard goes.=Alguém já é proprietário do local onde a cabeceira vai.
### furnaces.lua ###
@1 (active)=@1 (ativo)
@1 (active: @2%)=@1 (ativo: @2%)
@1 (empty)=@1 (vazio)
@1 (out of fuel)=@1 (sem combustível)
@1 (output bins are full)=@1 (saída de itens está lotada)
Furnace=Forno
### inventory.lua ###
@1 (Locked)=@1 (trancado)
@1 (owned by @2)=@1 (pertence a @2)

View File

@ -0,0 +1,28 @@
# textdomain: homedecor_common
### crafts.lua ###
Small Wooden Drawer=Маленький деревянный выдвижной ящик
Terracotta Roof Tile=Терракотовая крыша
### expansion.lua ###
Not enough room - the space for the headboard is occupied!=Не хватает места - пространство для изголовья занято!
Not enough room - the upper space is occupied!=Не хватает места - верхнее пространство занято!
Someone already owns that spot.=Та точка уже принадлежит кому-то.
Someone already owns the spot where the headboard goes.=Точка, куда ставится изголовье, уже принадлежит кому-то.
### furnaces.lua ###
@1 (active)=@1 (активно)
@1 (active: @2%)=@1 (активно: @2%)
@1 (empty)=@1 (пусто)
@1 (out of fuel)=@1 (не хватает топлива)
@1 (output bins are full)=@1 (выходные ячейки заполнены)
Furnace=Печь
### inventory.lua ###
@1 (Locked)=@1 (Закрыто)
@1 (owned by @2)=@1 (принадлежит @2)

View File

@ -0,0 +1,28 @@
# textdomain: homedecor_common
### crafts.lua ###
Small Wooden Drawer=小的木抽屉
Terracotta Roof Tile=陶土屋顶瓦
### expansion.lua ###
Not enough room - the space for the headboard is occupied!=没有足够的空间-床头板的空间被占用了!
Not enough room - the upper space is occupied!=没有足够的空间-上面的空间被占用了!
Someone already owns that spot.=已经有东西占用那个地方了。
Someone already owns the spot where the headboard goes.=有东西已经占用床头板的位置了。
### furnaces.lua ###
@1 (active)=@1活动
@1 (active: @2%)=@1活动@2%
@1 (empty)=@1
@1 (out of fuel)=@1燃油耗尽
@1 (output bins are full)=@1输出箱已满
Furnace=熔炉
### inventory.lua ###
@1 (Locked)=@1锁定
@1 (owned by @2)=@1归@2所有

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,28 @@
# textdomain: homedecor_common
### crafts.lua ###
Small Wooden Drawer=
Terracotta Roof Tile=
### expansion.lua ###
Not enough room - the space for the headboard is occupied!=
Not enough room - the upper space is occupied!=
Someone already owns that spot.=
Someone already owns the spot where the headboard goes.=
### furnaces.lua ###
@1 (active)=
@1 (active: @2%)=
@1 (empty)=
@1 (out of fuel)=
@1 (output bins are full)=
Furnace=
### inventory.lua ###
@1 (Locked)=
@1 (owned by @2)=

View File

@ -1,770 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: lastet\n"
"Report-Msgid-Bugs-To: pevernow\n"
"POT-Creation-Date: 2017-11-14 03:47+0800\n"
"PO-Revision-Date: 2020-04-18 12:47+0800\n"
"Last-Translator: pevernow <3450354617@qq.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: zh_CN\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "Granite"
msgstr "花岗岩"
msgid "Grate"
msgstr "磨碎"
msgid "Streak Free Glass"
msgstr "无条纹玻璃"
msgid "Wood Framed Glass"
msgstr "木框玻璃"
msgid "Adobe"
msgstr "土砖"
msgid "Fake Grass"
msgstr "塑料草"
msgid "Hardwood"
msgstr "硬木"
msgid "Roof block"
msgstr "天台"
msgid "Tar"
msgstr "焦油"
msgid "Marble"
msgstr "大理石"
msgid "Brobble Spread"
msgstr "石砖路面"
msgid "Gravel Spread"
msgstr "碎石路面"
msgid "Tarmac Spread"
msgstr "柏油路面"
msgid "Terrycloth towel"
msgstr "毛巾"
msgid "Chess board tiling"
msgstr "棋盘铺贴"
msgid "Fireplace"
msgstr "壁炉"
msgid "Small bundle of sticks"
msgstr "小捆棍子"
msgid "Tar base"
msgstr "焦油基"
msgid "Tar Knife"
msgstr "焦油刀"
msgid "Hanging chain (wrought iron)"
msgstr "吊链(锻铁)"
msgid "Hanging chain (brass)"
msgstr "吊链(黄铜)"
msgid "Hanging chain (ceiling mount, wrought iron)"
msgstr "锻铁吊链"
msgid "Hanging chain (ceiling mount, brass)"
msgstr "黄铜吊链"
msgid "Chandelier (wrought iron)"
msgstr "锻铁吊灯"
msgid "Chandelier (brass)"
msgstr "黄铜吊灯"
msgid "Monitor and keyboard"
msgstr "显示器和键盘"
msgid "WIFI Router"
msgstr "无线路由器"
msgid "Computer Tower"
msgstr "计算机箱"
msgid "Printer-Scanner Combo"
msgstr "打印扫描一体机"
msgid "Rack Server"
msgstr "机架式服务器"
msgid "Not enough vertical space to place a server!"
msgstr "高度不足,无法放置服务器!"
msgid "Plastic sheet"
msgstr "塑料板"
msgid "Unprocessed Plastic base"
msgstr "未加工的塑料基板"
msgid "L"
msgstr "左"
msgid "R"
msgstr "右"
msgid "New Game"
msgstr "新游戏"
msgid "Next..."
msgstr "下一个。。。"
msgid "Score: "
msgstr "分数:"
msgid "Tetris Arcade"
msgstr "俄罗斯方块游戏机"
msgid "No room for place the Arcade!"
msgstr "没有地方放游戏机!"
msgid "Ice fire"
msgstr "冰火"
msgid "Fancy Fire"
msgstr "花式火"
msgid "Glowing Embers"
msgstr "发光的余烬"
msgid "Stone chimney top"
msgstr "鹅卵石烟囱顶部"
msgid "Sandstone chimney top"
msgstr "砂石烟囱顶部"
msgid "Bathroom/kitchen tiles (dark)"
msgstr "深色浴室/厨房瓷砖"
msgid "Bathroom/kitchen tiles (medium)"
msgstr "浴室/厨房瓷砖"
msgid "Bathroom/kitchen tiles (light)"
msgstr "浅色浴室/厨房瓷砖"
msgid "Towel rod with towel"
msgstr "毛巾杆"
msgid "Medicine cabinet"
msgstr "药柜"
msgid "Toilet"
msgstr "卫生间"
msgid "Toilet paper"
msgstr "厕纸"
msgid "Bathroom Sink"
msgstr "浴室水槽"
msgid "Bathroom taps/faucet"
msgstr "浴室水龙头"
msgid "Bathroom taps/faucet (brass)"
msgstr "黄铜浴室水龙头"
msgid "Shower Tray"
msgstr "淋浴盆"
msgid "Shower Head"
msgstr "淋浴喷头"
msgid "Bathtub, clawfoot, with brass taps"
msgstr "带黄铜水龙头的浴缸"
msgid "Bathtub, clawfoot, with chrome taps"
msgstr "带镀铬水龙头的浴缸"
msgid "Bathroom sundries set"
msgstr "浴室杂物套装"
msgid "Bed"
msgstr "床"
msgid "Bed (king sized)"
msgstr "双人床"
msgid "mahogany"
msgstr "桃花心木"
msgid "oak"
msgstr "橡木"
msgid "Nightstand with One Drawer (@1)"
msgstr "带一个抽屉的床头柜(@1)"
msgid "One-drawer Nightstand"
msgstr "单抽屉床头柜"
msgid "Nightstand with Two Drawers (@1)"
msgstr "带两个抽屉的床头柜(@1)"
msgid "Two-drawer Nightstand"
msgstr "两抽屉床头柜"
msgid "red"
msgstr "红色"
msgid "green"
msgstr "绿色"
msgid "blue"
msgstr "蓝色"
msgid "violet"
msgstr "紫罗兰"
msgid "grey"
msgstr "灰色"
msgid "brown"
msgstr "棕色的"
msgid "Writable Book (@1)"
msgstr "可写书(@1"
msgid "@1 has written in a book (title: \"@2\"): \"@3\" at location @4"
msgstr "@我在一本书中写过(书名:\@2\\@3\,地点@4"
msgid "Air Conditioner"
msgstr "空调"
msgid "Desk Fan"
msgstr "台扇"
msgid "Ceiling Fan"
msgstr "吊扇"
msgid "Space heater"
msgstr "暖气机"
msgid "Radiator heater"
msgstr "散热器加热器"
msgid "Plastic analog clock"
msgstr "塑料时钟"
msgid "Wooden analog clock"
msgstr "木钟"
msgid "Digital clock"
msgstr "数字时钟"
msgid "Alarm clock"
msgstr "闹钟"
msgid "Grandfather Clock"
msgstr "祖父钟"
msgid "Cobweb"
msgstr "蛛网"
msgid "Uncooked Terracotta Base"
msgstr "生陶底座"
msgid "Terracotta Roof Tile"
msgstr "陶土屋顶瓦"
msgid "Oil extract"
msgstr "油萃取物"
msgid "Unprocessed paraffin"
msgstr "未加工石蜡"
msgid "Plastic strips"
msgstr "塑料条"
msgid "Small Wooden Drawer"
msgstr "小的木抽屉"
msgid "Simple Integrated Circuit"
msgstr "简单集成电路"
msgid "Heating element"
msgstr "加热元件"
msgid "Motor"
msgstr "电动机"
msgid "Power Crystal"
msgstr "功率晶体"
msgid "Blank Canvas"
msgstr "空白画布"
msgid "VCR"
msgstr "录像机"
msgid "DVD Player"
msgstr "光盘播放机"
msgid "Spool of copper wire"
msgstr "铜线卷轴"
msgid "Spool of steel wire"
msgstr "钢丝卷轴"
msgid "Speaker driver"
msgstr "扬声器"
msgid "Fan blades"
msgstr "风扇叶片"
msgid "Copper Strip"
msgstr "铜带"
msgid "Steel Strip"
msgstr "钢带"
msgid "Steel chainlink"
msgstr "钢链节"
msgid "Brass chainlink"
msgstr "黄铜链节"
msgid "Soda Can"
msgstr "易拉罐"
msgid "Gold Coin (for soda vending machine)"
msgstr "金币(汽水贩卖机专用)"
msgid "Silicon lump"
msgstr "硅块"
msgid "Brass Ingot"
msgstr "铜锭"
msgid "Small Flower Pot"
msgstr "小花盆"
msgid "coin crafting is disabled!"
msgstr "无法进行硬币制作!"
msgid "Mahogany Closet Door (@1 opening)"
msgstr "桃花心木壁橱门(@1开"
msgid "Oak Closet Door (@1 opening)"
msgstr "橡木壁橱门(@1开"
msgid "Fancy Wood/Glass Door (@1 opening)"
msgstr "花式木门/玻璃门(@1开"
msgid "Glass Office Door (@1 opening)"
msgstr "玻璃办公门(@1开"
msgid "Glass and Wood, Oak-colored (@1 opening)"
msgstr "橡木色玻璃和木材(@1开口"
msgid "Glass and Wood, Mahogany-colored (@1 opening)"
msgstr "桃花心木色玻璃和木材(@1开口"
msgid "Glass and Wood, White (@1 opening)"
msgstr "玻璃和木材,白色(@1开口"
msgid "Plain Wooden Door (@1 opening)"
msgstr "普通木门(@1开"
msgid "White Bedroom Door (@1 opening)"
msgstr "白色卧室门(@1开"
msgid "Wrought Iron Gate/Door (@1 opening)"
msgstr "铁门1开"
msgid "Wooden door with glass insert (@1 opening)"
msgstr "带玻璃嵌件的木门(@1开"
msgid "Wooden door with glass insert, type 2 (@1 opening)"
msgstr "带玻璃嵌件的木门2型1个开口处"
msgid "left"
msgstr "左边"
msgid "right"
msgstr "正确的"
msgid "Unpainted Picket Fence Gate"
msgstr "未上漆的尖桩栅栏门"
msgid "White Picket Fence Gate"
msgstr "白色尖桩栅栏门"
msgid "Barbed Wire Fence Gate"
msgstr "铁丝网栅栏门"
msgid "Chainlink Fence Gate"
msgstr "铁链栅栏门"
msgid "\"Half\" Door"
msgstr "\半门"
msgid "\"Half\" Door (white)"
msgstr "\半门(白色)"
msgid "Japanese wall (top)"
msgstr "日本墙(上)"
msgid "Japanese wall"
msgstr "日本墙"
msgid "Japanese wall (bottom)"
msgstr "日本墙(下)"
msgid "Japanese tatami"
msgstr "日本榻榻米"
msgid "Japanese-style door"
msgstr "日式门"
msgid "Power Outlet"
msgstr "电源插座"
msgid "Light switch"
msgstr "灯光开关"
msgid "Doorbell"
msgstr "门铃"
msgid "Large Stereo Speaker"
msgstr "大型立体声扬声器"
msgid "Large Stereo Speaker, open front"
msgstr "开放式大立体声扬声器"
msgid "Small Surround Speaker"
msgstr "小型环绕扬声器"
msgid "Stereo Receiver"
msgstr "立体声接收机"
msgid "Projection Screen Material"
msgstr "投影屏幕材料"
msgid "Small CRT Television"
msgstr "小型CRT电视"
msgid "DVD and VCR"
msgstr "DVD和VCR"
msgid "Telephone"
msgstr "电话"
msgid "Barbecue"
msgstr "烧烤"
msgid "Garden Bench (style 1)"
msgstr "花园长凳样式1"
msgid "Garden Bench (style 2)"
msgstr "花园长凳样式2"
msgid "Deck Chair"
msgstr "躺椅"
msgid "Deck Chair (blue striped)"
msgstr "躺椅(蓝色条纹)"
msgid "Doghouse"
msgstr "狗窝"
msgid "Simple Bench"
msgstr "简易长凳"
msgid "Garden stone path"
msgstr "花园石径"
msgid "wood"
msgstr "木材"
msgid "white wood"
msgstr "白木"
msgid "wood, with vegetation"
msgstr "带植被的木材"
msgid "white wood, with vegetation"
msgstr "带植被的白木"
msgid "Garden Lattice (@1)"
msgstr "花园格子(@1"
msgid "Tree's swing"
msgstr "树的秋千"
msgid "Water well"
msgstr "水井"
msgid "yellow"
msgstr "黄色的"
msgid "Shrubbery (large, @1)"
msgstr "大灌木丛(@1"
msgid "Shrubbery (@1)"
msgstr "灌木丛(@1"
msgid "brass"
msgstr "黄铜"
msgid "wrought iron"
msgstr "锻铁"
msgid "Fence/railing (@1)"
msgstr "围栏/栏杆(@1"
msgid "Fence/railing with sign (@1)"
msgstr "带标志的围栏/栏杆(@1"
msgid "Unpainted Picket Fence"
msgstr "未上漆的尖桩篱笆"
msgid "Unpainted Picket Fence Corner"
msgstr "未上漆的尖桩围栏角"
msgid "White Picket Fence"
msgstr "白色尖桩篱笆"
msgid "White Picket Fence Corner"
msgstr "白色尖桩篱笆角"
msgid "Wooden Privacy Fence"
msgstr "木质隐私围栏"
msgid "Wooden Privacy Fence Corner"
msgstr "木质隐私围栏角"
msgid "Barbed Wire Fence"
msgstr "带刺铁丝网"
msgid "Barbed Wire Fence Corner"
msgstr "铁丝网围栏角"
msgid "Chainlink Fence"
msgstr "铁丝网围栏"
msgid "Chainlink Fence Corner"
msgstr "铁丝网围栏角"
msgid "Wrought Iron fence (type 2)"
msgstr "锻铁栅栏2型"
msgid "Wrought Iron fence (type 2) Corner"
msgstr "锻铁围栏2类转角"
msgid "Wall-mounted coat rack"
msgstr "壁挂衣架"
msgid "Coat tree"
msgstr "种树"
msgid "Green welcome mat"
msgstr "绿色迎宾垫"
msgid "Brown welcome mat"
msgstr "棕色迎宾垫"
msgid "Grey welcome mat"
msgstr "灰色迎宾垫"
msgid "Table"
msgstr "桌子"
msgid "Mahogany Table"
msgstr "红木桌"
msgid "White Table"
msgstr "白色桌子"
msgid "Kitchen chair"
msgstr "厨房椅"
msgid "Armchair"
msgstr "扶手椅"
msgid "Bookshelf (open-frame)"
msgstr "书架(开架)"
msgid "Wall Shelf"
msgstr "墙架"
msgid "Bars"
msgstr "酒吧"
msgid "Binding Bars"
msgstr "绑扎钢筋"
msgid "Chains"
msgstr "链"
msgid "Wall Torch"
msgstr "壁灯"
msgid "Wall Lamp"
msgstr "壁灯"
msgid "Cutlery set"
msgstr "餐具套装"
msgid "Brown bottle"
msgstr "棕色瓶子"
msgid "Four brown bottles"
msgstr "四个棕色瓶子"
msgid "Four green bottles"
msgstr "四个绿色瓶子"
msgid "Green bottle"
msgstr "绿瓶"
msgid "Four misc brown/green bottles"
msgstr "四个其他棕色/绿色瓶子"
msgid "Wine rack"
msgstr "酒架"
msgid "Dartboard"
msgstr "飞镖板"
msgid "Beer tap"
msgstr "啤酒龙头"
msgid "Ahh, a frosty cold beer - look in your inventory for it!"
msgstr "啊,一杯冰凉的啤酒-看看你的库存吧!"
msgid "No room in your inventory to add a beer mug!"
msgstr "你的库存里没有地方放啤酒杯!"
msgid "Beer mug"
msgstr "啤酒杯"
msgid "Soda vending machine"
msgstr "汽水自动售货机"
msgid "Please insert a coin in the machine."
msgstr "请在机器里放一枚硬币。"
msgid "Not enough room - the space for the headboard is occupied!"
msgstr "没有足够的空间-床头板的空间被占用了!"
msgid "Someone already owns the spot where the headboard goes."
msgstr "有东西已经占用床头板的位置了。"
msgid "Not enough room - the upper space is occupied!"
msgstr "没有足够的空间-上面的空间被占用了!"
msgid "Someone already owns that spot."
msgstr "已经有东西占用那个地方了。"
msgid "Furnace"
msgstr "熔炉"
msgid "@1 (empty)"
msgstr "@1"
msgid "@1 (active)"
msgstr "@1活动"
msgid "@1 (active: @2%)"
msgstr "@1活动@2%"
msgid "@1 (out of fuel)"
msgstr "@1燃油耗尽"
msgid "@1 (output bins are full)"
msgstr "@1输出箱已满"
msgid "@1 moves stuff in @2 at @3"
msgstr "@1在@2和@3移动物品"
msgid "@1 moves @2 to @3 at @4"
msgstr "@1在@4移动@2到@3"
msgid "@1 takes @2 from @3 at @4"
msgstr "@1从@3到@4取@2"
msgid "@1 (owned by @2)"
msgstr "@1归@2所有"
msgid "@1 tried to access a @2 belonging to @3 at @4"
msgstr "@1试图在@4访问属于@3的@2"
msgid "@1 (Locked)"
msgstr "@1锁定"
msgid "Loaded!"
msgstr "加载!"
msgid "Refrigerator (stainless steel)"
msgstr "冰箱(不锈钢)"
msgid "Refrigerator"
msgstr "冰箱"
msgid "Oven"
msgstr "烤箱"
msgid "Oven (stainless steel)"
msgstr "烤箱(不锈钢)"
msgid "Microwave Oven"
msgstr "微波炉"
msgid "Coffee Maker"
msgstr "咖啡机"
msgid "Toaster"
msgstr "烤面包机"
msgid "Dishwasher"
msgstr "洗碗机"
msgid "granite"
msgstr "花岗岩"
msgid "marble"
msgstr "大理石"
msgid "steel"
msgstr "钢"
msgid "Dishwasher (@1)"
msgstr "洗碗机(@1"
msgid "Kitchen Cabinet"
msgstr "厨柜"
msgid "Kitchen Cabinet (@1 top)"
msgstr "厨柜(@1顶"
msgid "Half-height Kitchen Cabinet (on ceiling)"
msgstr "半高厨柜(悬挂式)"
msgid "Kitchen Cabinet with sink"
msgstr "带水槽的橱柜"
msgid "Under-sink cabinet"
msgstr "水槽柜下"
msgid "Copper pans"
msgstr "铜锅"
msgid "Kitchen Faucet"
msgstr "厨房水龙头"
msgid "Paper towels"
msgstr "纸巾"
msgid "Thick Glowlight"
msgstr "厚辉光"
msgid "Thin Glowlight"
msgstr "薄辉光"
msgid "Small Glowlight Cube"
msgstr "小发光体"
msgid "Plasma Lamp"
msgstr "等离子灯"
msgid "Plasma Ball"
msgstr "等离子球"
msgid "Thick Candle"
msgstr "粗蜡烛"
msgid "Thin Candle"
msgstr "薄蜡烛"
msgid "Candlestick (wrought iron)"
msgstr "烛台(锻铁)"
msgid "Candlestick (brass)"
msgstr "烛台(黄铜)"
msgid "Wall sconce"
msgstr "壁灯"
msgid "Oil lamp (hurricane)"
msgstr "油灯(飓风)"
msgid "Oil Lamp (tabletop)"
msgstr "油灯(桌面)"
msgid "Ground Lantern"
msgstr "地灯"
msgid "Hanging Lantern"
msgstr "吊灯"
msgid "Ceiling Lantern"
msgstr "吊灯"
msgid "Lattice lantern (large)"
msgstr "格子灯(大)"
msgid "Lattice lantern (small)"
msgstr "格子灯(小)"
msgid "Table Lamp"
msgstr "台灯"
msgid "Standing Lamp"
msgstr "台灯"
msgid "Desk Lamp"
msgstr "台灯"
msgid "Ceiling Lamp"
msgstr "顶灯"
msgid "Ceiling Lamp (off)"
msgstr "顶灯(关)"
msgid "Textured Ceiling Paint"
msgstr "纹理天花板漆"
msgid "Drop-Ceiling Tile"
msgstr "落地砖"
msgid "small"
msgstr "小的"
msgid "large"
msgstr "大的"
msgid "persian"
msgstr "波斯的"
msgid "Rug (@1)"
msgstr "地毯(@1"
msgid "black"
msgstr "黑色"
msgid "terracotta"
msgstr "陶土"
msgid "Flower Pot (@1)"
msgstr "花盆(@1"
msgid "Rose"
msgstr "玫瑰"
msgid "Tulip"
msgstr "郁金香"
msgid "Yellow Dandelion"
msgstr "黄色蒲公英"
msgid "White Dandelion"
msgstr "白色蒲公英"
msgid "Blue Geranium"
msgstr "蓝色天竺葵"
msgid "Viola"
msgstr "中提琴"
msgid "Cactus"
msgstr "仙人掌"
msgid "Bonsai"
msgstr "盆景"
msgid "Potted flower (@1)"
msgstr "盆花(@1"
msgid "Brass Pole"
msgstr "铜柱"
msgid "Wrought Iron Pole"
msgstr "锻铁杆"
msgid "Fishtank"
msgstr "鱼缸"
msgid "Fishtank (lighted)"
msgstr "鱼缸(带灯光)"
msgid "Cardboard box (big)"
msgstr "纸箱(大)"
msgid "Cardboard box"
msgstr "纸箱"
msgid "DVD/CD cabinet"
msgstr "DVD/CD柜"
msgid "Pool Table"
msgstr "台球桌"
msgid "Piano"
msgstr "钢琴"
msgid "Trophy"
msgstr "奖杯"
msgid "Sport bench"
msgstr "运动板凳"
msgid "Skateboard"
msgstr "滑板"
msgid "Metal tool cabinet and work table"
msgstr "金属工具柜及工作台"
msgid "Picture Frame "
msgstr "相框"
msgid "Decorative painting #@1"
msgstr "装饰画 #@1"
msgid "dark topped"
msgstr "暗顶"
msgid "diagonal"
msgstr "对角线的"
msgid "horizontal"
msgstr "水平的"
msgid "Banister for Stairs (@1, @2)"
msgstr "楼梯栏杆(@1@2"
msgid "not enough space"
msgstr "空间不足"
msgid "Filing cabinet"
msgstr "文件柜"
msgid "Desk"
msgstr "办公桌"
msgid "Desk globe"
msgstr "台式地球仪"
msgid "Calendar"
msgstr "日历"
msgid ""
"日期 (右键更新):\n"
"@1"
msgstr ""
msgid "Basic office chair"
msgstr "办公椅"
msgid "Upscale office chair"
msgstr "高档办公椅"
msgid "Glass Skylight"
msgstr "玻璃天窗"
msgid "Glass Skylight Frosted"
msgstr "磨砂玻璃天窗"
msgid "asphalt"
msgstr "沥青"
msgid "Shingles (@1)"
msgstr "瓦(@1"
msgid "@1 (outer corner)"
msgstr "@1外角"
msgid "@1 (inner corner)"
msgstr "@1内角"
msgid "Wood Shingles"
msgstr "木头瓦"
msgid "Asphalt Shingles"
msgstr "沥青瓦"
msgid "Terracotta Shingles"
msgstr "陶瓦"
msgid "Glass Shingles"
msgstr "玻璃瓦"
msgid "Chimney"
msgstr "烟囱"
msgid "Wooden Shutter"
msgstr "木快门"
msgid "Small square glass table"
msgstr "小方形玻璃桌"
msgid "Small round glass table"
msgstr "小圆形玻璃桌"
msgid "Large glass table piece"
msgstr "大玻璃桌片"
msgid "Small square wooden table"
msgstr "小方木桌"
msgid "Small round wooden table"
msgstr "小圆桌"
msgid "Large wooden table piece"
msgstr "大木桌片"
msgid "Utility Table"
msgstr "效用表"
msgid "Table Legs (@1)"
msgstr "桌腿(@1"
msgid "Legs for Utility Table"
msgstr "通用桌腿"
msgid "Green Trash Can"
msgstr "绿色垃圾桶"
msgid "Trash Can"
msgstr "垃圾桶"
msgid "Small Trash Can"
msgstr "小垃圾桶"
msgid "Wardrobe"
msgstr "衣柜"
msgid "Clothes"
msgstr "衣服"
msgid "Storage"
msgstr "储藏间""
msgid "Window (quartered)"
msgstr "窗户(四分之一)"
msgid "Window (plain)"
msgstr "窗口(普通)"
msgid "Window Blinds (thick)"
msgstr "百叶窗(厚)"
msgid "Window Blinds (thin)"
msgstr "百叶窗(薄)"
msgid "Curtains"
msgstr "窗帘"
msgid "Curtains (open)"
msgstr "窗帘(打开)"
msgid "Curtain Rod (@1)"
msgstr "窗帘杆(@1"
msgid "Window flowerbox"
msgstr "窗花箱"
msgid "Stained Glass"
msgstr "彩色玻璃"
msgid "Mailbox"
msgstr "邮箱"
msgid "@1's Mailbox"
msgstr "@1的邮箱"
msgid "Item frame"
msgstr "项目框架"
msgid "Item frame (owned by @1)"
msgstr "物品框架(归@1所有"
msgid "Pedestal"
msgstr "底座"
msgid "Pedestal (owned by @1)"
msgstr "基座(归@1所有"
msgid "Lava Lamp"
msgstr "岩浆灯"
msgid "Lava Lamp (off)"
msgstr "岩浆灯(关闭)"
msgid "Coffee Table"
msgstr "咖啡桌"
msgid "No room to place the coffee table!"
msgstr "没有地方放咖啡桌!"
msgid "End Table"
msgstr "结束表"
msgid "Someone else owns the spot where other end goes!"
msgstr "另一端去的地方是别人的!"
msgid "Someone else owns the spot where the middle or far end goes!"
msgstr "中间或远端去的地方是别人的!"
msgid "Someone else owns the spot where the other end goes!"
msgstr "另一端去的地方是别人的!"
msgid "Long Sofa"
msgstr "长沙发"
msgid "No room to place the sofa!"
msgstr "没有地方放沙发!"
msgid "Sofa"
msgstr "沙发"
msgid "Plasma Screen TV Stand"
msgstr "液晶电视架"
msgid "Plasma TV"
msgstr "液晶电视"
msgid "Plasma TV (off)"
msgstr "液晶电视(关闭)"

View File

@ -1,4 +1,3 @@
name = homedecor_common
description = Homedecor mod: common
depends = default, creative
optional_depends = intllib

View File

@ -1,175 +0,0 @@
-- This file is a partial copy of functions.lua from minetest_game's beds mod
-- with changes needed for homedecor's beds.
local pi = math.pi
local is_sp = minetest.is_singleplayer()
local enable_respawn = minetest.settings:get_bool("enable_bed_respawn")
if enable_respawn == nil then
enable_respawn = true
end
-- Helper functions
local function get_look_yaw(pos)
local n = minetest.get_node(pos)
local fdir = n.param2 % 4
if fdir == 0 then
return pi / 2, fdir
elseif fdir == 1 then
return -pi / 2, fdir
elseif fdir == 3 then
return pi, fdir
else
return 0, fdir
end
end
local function is_night_skip_enabled()
local enable_night_skip = minetest.settings:get_bool("enable_bed_night_skip")
if enable_night_skip == nil then
enable_night_skip = true
end
return enable_night_skip
end
local function check_in_beds(players)
local in_bed = beds.player
if not players then
players = minetest.get_connected_players()
end
for n, player in ipairs(players) do
local name = player:get_player_name()
if not in_bed[name] then
return false
end
end
return #players > 0
end
local function get_player_in_bed()
local player_in_bed = 0
for k,v in pairs(beds.player) do
player_in_bed = player_in_bed + 1
end
return player_in_bed
end
local function lay_down(player, pos, bed_pos, state, skip)
local name = player:get_player_name()
local hud_flags = player:hud_get_flags()
if not player or not name then
return
end
-- stand up
if state ~= nil and not state then
local p = beds.pos[name] or nil
if beds.player[name] ~= nil then
beds.player[name] = nil
end
-- skip here to prevent sending player specific changes (used for leaving players)
if skip then
return
end
if p then
player:setpos(p)
end
-- physics, eye_offset, etc
player:set_eye_offset({x = 0, y = 0, z = 0}, {x = 0, y = 0, z = 0})
player:set_look_horizontal(math.random(1, 180) / 100)
default.player_attached[name] = false
player:set_physics_override(1, 1, 1)
hud_flags.wielditem = true
default.player_set_animation(player, "stand" , 30)
-- lay down
else
beds.player[name] = 1
beds.pos[name] = pos
-- physics, eye_offset, etc
player:set_eye_offset({x = 0, y = -13, z = 0}, {x = 0, y = 0, z = 0})
local yaw, fdir = get_look_yaw(bed_pos)
player:set_look_horizontal(yaw)
local offsets = {
[0] = {0.5, 0},
[1] = {-0.5, 0},
[2] = {0, -0.5},
[3] = {0, 0.5}
}
local p = {x = bed_pos.x + offsets[fdir][1], y = bed_pos.y, z = bed_pos.z + offsets[fdir][2]}
player:set_physics_override(0, 0, 0)
player:setpos(p)
default.player_attached[name] = true
hud_flags.wielditem = false
default.player_set_animation(player, "lay" , 0)
end
player:hud_set_flags(hud_flags)
end
local function update_formspecs(finished)
local ges = #minetest.get_connected_players()
local player_in_bed = get_player_in_bed()
local form_n
local is_majority = (ges / 2) < player_in_bed
if finished then
form_n = beds.formspec .. "label[2.7,11; Good morning.]"
else
form_n = beds.formspec .. "label[2.2,11;" .. tostring(player_in_bed) ..
" of " .. tostring(ges) .. " players are in bed]"
if is_majority and is_night_skip_enabled() then
form_n = form_n .. "button_exit[2,8;4,0.75;force;Force night skip]"
end
end
for name,_ in pairs(beds.player) do
minetest.show_formspec(name, "beds_form", form_n)
end
end
-- Public functions
function homedecor.beds_on_rightclick(pos, node, player)
local name = player:get_player_name()
local ppos = player:getpos()
local tod = minetest.get_timeofday()
if tod > 0.2 and tod < 0.805 then
if beds.player[name] then
lay_down(player, nil, nil, false)
end
minetest.chat_send_player(name, "You can only sleep at night.")
return
end
-- move to bed
if not beds.player[name] then
lay_down(player, ppos, pos)
beds.set_spawns() -- save respawn positions when entering bed
else
lay_down(player, nil, nil, false)
end
if not is_sp then
update_formspecs(false)
end
-- skip the night and let all players stand up
if check_in_beds() then
minetest.after(2, function()
if not is_sp then
update_formspecs(is_night_skip_enabled())
end
if is_night_skip_enabled() then
beds.skip_night()
beds.kick_players()
end
end)
end
end

View File

@ -45,8 +45,8 @@ function homedecor.register(name, original_def)
-- dissallow rotating only half the expanded node by default
-- unless we know better
def.on_rotate = def.on_rotate
or (def.mesh and expand.top and screwdriver.rotate_simple)
or screwdriver.disallow
or (minetest.get_modpath("screwdriver") and (def.mesh and expand.top and screwdriver.rotate_simple)
or screwdriver.disallow) or nil
def.on_place = def.on_place or function(itemstack, placer, pointed_thing)
if expand.top then

View File

@ -1,24 +0,0 @@
#! /bin/bash
# To create a new translation:
# msginit --locale=ll_CC -o locale/ll_CC.po -i locale/template.pot
cd "$(dirname "${BASH_SOURCE[0]}")/..";
# Extract translatable strings.
xgettext --from-code=UTF-8 \
--language=Lua \
--sort-by-file \
--keyword=S \
--keyword=NS:1,2 \
--keyword=N_ \
--add-comments='Translators:' \
--add-location=file \
-o locale/template.pot \
$(find .. -name '*.lua')
# Update translations.
find locale -name '*.po' | while read -r file; do
echo $file
msgmerge --update $file locale/template.pot;
done