MT5 translation for homedecor_seating

- Add screwdriver to optional_depends
- Fix luacheck warnings
This commit is contained in:
Louis Royer 2020-08-05 00:35:08 +02:00
parent ea6e75fa6a
commit a9809998bf
17 changed files with 269 additions and 35 deletions

View File

@ -1,5 +1,4 @@
local S = homedecor.gettext
local S = minetest.get_translator("homedecor_seating")
local armchair_cbox = {
type = "fixed",
fixed = {
@ -169,5 +168,5 @@ minetest.register_lbm({
})
if minetest.settings:get("log_mods") then
minetest.log("action", "[lrfurn/armchairs] "..S("Loaded!"))
minetest.log("action", "[lrfurn/armchairs] Loaded!")
end

View File

@ -1,5 +0,0 @@
default
wool
homedecor_common
unifieddyes
basic_materials

View File

@ -1,11 +1,10 @@
-- Home decor seating
-- forked from the previous lrfurn mod
local S = homedecor.gettext
local S = minetest.get_translator("homedecor_seating")
local modpath = minetest.get_modpath("homedecor_seating")
lrfurn = {}
screwdriver = screwdriver or {}
lrfurn.fdir_to_right = {
{ 1, 0 },
@ -35,17 +34,24 @@ lrfurn.colors = {
function lrfurn.check_right(pos, fdir, long, placer)
if not fdir or fdir > 3 then fdir = 0 end
local pos2 = { x = pos.x + lrfurn.fdir_to_right[fdir+1][1], y=pos.y, z = pos.z + lrfurn.fdir_to_right[fdir+1][2] }
local pos3 = { x = pos.x + lrfurn.fdir_to_right[fdir+1][1] * 2, y=pos.y, z = pos.z + lrfurn.fdir_to_right[fdir+1][2] * 2 }
local pos2 = {
x = pos.x + lrfurn.fdir_to_right[fdir+1][1],
y = pos.y, z = pos.z + lrfurn.fdir_to_right[fdir+1][2]
}
local pos3 = {
x = pos.x + lrfurn.fdir_to_right[fdir+1][1] * 2,
y = pos.y, z = pos.z + lrfurn.fdir_to_right[fdir+1][2] * 2
}
local node2 = minetest.get_node(pos2)
if node2 and node2.name ~= "air" then
return false
elseif minetest.is_protected(pos2, placer:get_player_name()) then
if not long then
minetest.chat_send_player(placer:get_player_name(), S("Someone else owns the spot where other end goes!"))
minetest.chat_send_player(placer:get_player_name(), S("Someone else owns the spot where the other end goes!"))
else
minetest.chat_send_player(placer:get_player_name(), S("Someone else owns the spot where the middle or far end goes!"))
minetest.chat_send_player(placer:get_player_name(),
S("Someone else owns the spot where the middle or far end goes!"))
end
return false
end

View File

@ -0,0 +1,24 @@
# textdomain: homedecor_seating
### armchairs.lua ###
Armchair=Sessel
### init.lua ###
Someone else owns the spot where the middle or far end goes!=Jemanden gehört schon die Stelle, wo das mittlere oder ferne Stück hingehen würde.
Someone else owns the spot where the other end goes!=Jemanden gehört schon die Stelle, wo das andere Ende hingehen würde.
### longsofas.lua ###
Long Sofa=Langes Sofa
### longsofas.lua ###
### sofas.lua ###
No room to place the sofa!=Kein Platz, um das Sofa zu platzieren!
### sofas.lua ###
Sofa=Sofa

View File

@ -0,0 +1,24 @@
# textdomain: homedecor_seating
### armchairs.lua ###
Armchair=Sillón
### init.lua ###
Someone else owns the spot where the middle or far end goes!=Alguien ya es dueño del lugar donde va la cabecera.
Someone else owns the spot where the other end goes!=Alguien ya es dueño del lugar donde va la cabecera.
### longsofas.lua ###
Long Sofa=Sofá largo
### longsofas.lua ###
### sofas.lua ###
No room to place the sofa!=¡No hay lugar para colocar el sofá!
### sofas.lua ###
Sofa=Sofá

View File

@ -0,0 +1,24 @@
# textdomain: homedecor_seating
### armchairs.lua ###
Armchair=Fauteuil
### init.lua ###
Someone else owns the spot where the middle or far end goes!=Quelqu'un d'autre est propriétaire de l'endroit où va le milieu ou l'autre bout !
Someone else owns the spot where the other end goes!=Quelqu'un d'autre est propriétaire de l'endroit où va l'autre bout !
### longsofas.lua ###
Long Sofa=Canapé long
### longsofas.lua ###
### sofas.lua ###
No room to place the sofa!=Pas assez de place pour poser le canapé !
### sofas.lua ###
Sofa=Canapé

View File

@ -0,0 +1,24 @@
# textdomain: homedecor_seating
### armchairs.lua ###
Armchair=Poltrona
### init.lua ###
Someone else owns the spot where the middle or far end goes!=
Someone else owns the spot where the other end goes!=
### longsofas.lua ###
Long Sofa=
### longsofas.lua ###
### sofas.lua ###
No room to place the sofa!=
### sofas.lua ###
Sofa=

View File

@ -0,0 +1,24 @@
# textdomain: homedecor_seating
### armchairs.lua ###
Armchair=Kerusi Berlengan
### init.lua ###
Someone else owns the spot where the middle or far end goes!=Tempat untuk letak pertengahan atau hujung objek itu kawasan kepunyaan orang lain!
Someone else owns the spot where the other end goes!=Tempat untuk letak hujung objek itu kawasan kepunyaan orang lain!
### longsofas.lua ###
Long Sofa=Sofa Panjang
### longsofas.lua ###
### sofas.lua ###
No room to place the sofa!=Tiada ruang untuk letak sofa!
### sofas.lua ###
Sofa=Sofa

View File

@ -0,0 +1,24 @@
# textdomain: homedecor_seating
### armchairs.lua ###
Armchair=Poltrona
### init.lua ###
Someone else owns the spot where the middle or far end goes!=Alguém já é proprietário do local onde a cabeceira vai.
Someone else owns the spot where the other end goes!=Alguém já é proprietário do local onde a cabeceira vai.
### longsofas.lua ###
Long Sofa=Sofá Grande
### longsofas.lua ###
### sofas.lua ###
No room to place the sofa!=Sem espaço para colocar o sofá!
### sofas.lua ###
Sofa=Sofá

View File

@ -0,0 +1,24 @@
# textdomain: homedecor_seating
### armchairs.lua ###
Armchair=Poltrona
### init.lua ###
Someone else owns the spot where the middle or far end goes!=Alguém já é proprietário do local onde a cabeceira vai.
Someone else owns the spot where the other end goes!=Alguém já é proprietário do local onde a cabeceira vai.
### longsofas.lua ###
Long Sofa=Sofá Grande
### longsofas.lua ###
### sofas.lua ###
No room to place the sofa!=Sem espaço para colocar o sofá!
### sofas.lua ###
Sofa=Sofá

View File

@ -0,0 +1,24 @@
# textdomain: homedecor_seating
### armchairs.lua ###
Armchair=Кресло
### init.lua ###
Someone else owns the spot where the middle or far end goes!=Кому-то другому принадлежит точка, куда выходит средний или дальний конец!
Someone else owns the spot where the other end goes!=Кому-то другому принадлежит точка, где выходит другой конец!
### longsofas.lua ###
Long Sofa=Длинный диван
### longsofas.lua ###
### sofas.lua ###
No room to place the sofa!=Нет места для дивана!
### sofas.lua ###
Sofa=Диван

View File

@ -0,0 +1,24 @@
# textdomain: homedecor_seating
### armchairs.lua ###
Armchair=扶手椅
### init.lua ###
Someone else owns the spot where the middle or far end goes!=中间或远端去的地方是别人的!
Someone else owns the spot where the other end goes!=另一端去的地方是别人的!
### longsofas.lua ###
Long Sofa=长沙发
### longsofas.lua ###
### sofas.lua ###
No room to place the sofa!=没有地方放沙发!
### sofas.lua ###
Sofa=沙发

View File

@ -0,0 +1,24 @@
# textdomain: homedecor_seating
### armchairs.lua ###
Armchair=
### init.lua ###
Someone else owns the spot where the middle or far end goes!=
Someone else owns the spot where the other end goes!=
### longsofas.lua ###
Long Sofa=
### longsofas.lua ###
### sofas.lua ###
No room to place the sofa!=
### sofas.lua ###
Sofa=

View File

@ -1,5 +1,4 @@
local S = homedecor.gettext
local S = minetest.get_translator("homedecor_seating")
local longsofa_cbox = {
type = "wallmounted",
@ -23,7 +22,7 @@ minetest.register_node(":lrfurn:longsofa", {
sounds = default.node_sound_wood_defaults(),
selection_box = longsofa_cbox,
node_box = longsofa_cbox,
on_rotate = screwdriver.disallow,
on_rotate = minetest.get_modpath("screwdriver") and screwdriver.disallow or nil,
after_place_node = function(pos, placer, itemstack, pointed_thing)
lrfurn.fix_sofa_rotation_nsew(pos, placer, itemstack, pointed_thing)
local playername = placer:get_player_name()
@ -133,5 +132,5 @@ minetest.register_lbm({
})
if minetest.settings:get("log_mods") then
minetest.log("action", "[lrfurn/longsofas] "..S("Loaded!"))
minetest.log("action", "[lrfurn/longsofas] Loaded!")
end

View File

@ -15,7 +15,7 @@ homedecor.register("deckchair", {
sounds = default.node_sound_wood_defaults(),
selection_box = dc_cbox,
collision_box = dc_cbox,
on_rotate = screwdriver.disallow
on_rotate = minetest.get_modpath("screwdriver") and screwdriver.disallow or nil,
})
minetest.register_alias("homedecor:deckchair_foot", "homedecor:deckchair")
@ -30,7 +30,7 @@ homedecor.register("deckchair_striped_blue", {
sounds = default.node_sound_wood_defaults(),
selection_box = dc_cbox,
collision_box = dc_cbox,
on_rotate = screwdriver.disallow
on_rotate = minetest.get_modpath("screwdriver") and screwdriver.disallow or nil,
})
homedecor.register("simple_bench", {
@ -74,7 +74,7 @@ homedecor.register("bench_large_1", {
sounds = default.node_sound_wood_defaults(),
selection_box = bl1_sbox,
node_box = bl1_cbox,
on_rotate = screwdriver.disallow
on_rotate = minetest.get_modpath("screwdriver") and screwdriver.disallow or nil,
})
minetest.register_alias("homedecor:bench_large_1_left", "homedecor:bench_large_1")
@ -103,7 +103,7 @@ homedecor.register("bench_large_2", {
node_box = bl2_cbox,
expand = { right="placeholder" },
sounds = default.node_sound_wood_defaults(),
on_rotate = screwdriver.disallow
on_rotate = minetest.get_modpath("screwdriver") and screwdriver.disallow or nil,
})
minetest.register_alias("homedecor:bench_large_2_left", "homedecor:bench_large_2")
@ -162,14 +162,6 @@ homedecor.register("kitchen_chair_padded", {
end
})
local ac_cbox = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0, 0.5 },
{-0.5, -0.5, 0.4, 0.5, 0.5, 0.5 }
}
}
local ofchairs_sbox = {
type = "fixed",
fixed = { -8/16, -8/16, -8/16, 8/16, 29/32, 8/16 }
@ -201,7 +193,7 @@ for _, c in pairs(chairs) do
selection_box = ofchairs_sbox,
collision_box = ofchairs_cbox,
expand = { top = "placeholder" },
on_rotate = screwdriver.rotate_simple
on_rotate = minetest.get_modpath("screwdriver") and screwdriver.rotate_simple or nil,
})
end

View File

@ -0,0 +1,4 @@
name = homedecor_seating
description = Homedecor mod: seating
depends = default, wool, homedecor_common, unifieddyes, basic_materials
optional_depends = screwdriver

View File

@ -1,5 +1,4 @@
local S = homedecor.gettext
local S = minetest.get_translator("homedecor_seating")
local sofa_cbox = {
type = "wallmounted",
@ -23,7 +22,7 @@ minetest.register_node(":lrfurn:sofa", {
sounds = default.node_sound_wood_defaults(),
selection_box = sofa_cbox,
node_box = sofa_cbox,
on_rotate = screwdriver.disallow,
on_rotate = minetest.get_modpath("screwdriver") and screwdriver.disallow or nil,
after_place_node = function(pos, placer, itemstack, pointed_thing)
lrfurn.fix_sofa_rotation_nsew(pos, placer, itemstack, pointed_thing)
local playername = placer:get_player_name()
@ -133,5 +132,5 @@ minetest.register_lbm({
})
if minetest.settings:get("log_mods") then
minetest.log("action", "[lrfurn/sofas] "..S("Loaded!"))
minetest.log("action", "[lrfurn/sofas] Loaded!")
end