1
0
mirror of https://github.com/mt-mods/homedecor_modpack.git synced 2024-12-22 16:10:18 +01:00

MT5 translation for homedecor_wardrobe

- Add screwdriver to optional_depends
- Fix luacheck warnings
This commit is contained in:
Louis Royer 2020-08-05 00:51:58 +02:00
parent f7412c6191
commit 204beaaaac
14 changed files with 95 additions and 33 deletions

View File

@ -24,6 +24,8 @@ read_globals = {
"creative",
"homedecor_i18n",
"homedecor",
"player_api",
"skins",
}
globals = {

View File

@ -1,7 +0,0 @@
homedecor_common
default
player_api
homedecor_kitchen?
homedecor_misc?
3d_armor?
skinsdb?

View File

@ -1,8 +1,6 @@
local S = minetest.get_translator("homedecor_wardrobe")
modpath = minetest.get_modpath("homedecor_wardrobe")
screwdriver = screwdriver or {}
local placeholder_node = "air"
local wd_cbox = {type = "fixed", fixed = {-0.5, -0.5, -0.5, 0.5, 1.5, 0.5}}
-- cache set_textures function (fallback to old version)
@ -28,7 +26,7 @@ if skinsdb_mod_path then
skin_obj:set_preview("homedecor_clothes_"..skin_name.."_preview.png")
skin_obj:set_texture("homedecor_clothes_"..skin_name..".png")
skin_obj:set_meta("name", "Wardrobe "..skin_name)
skin_obj:set_meta("name", S("Wardrobe").." "..skin_name)
skin_obj:set_meta("author", 'Calinou and Jordach')
skin_obj:set_meta("license", 'CC-by-SA-4.0')
@ -44,16 +42,6 @@ if skinsdb_mod_path then
end
end
local function get_player_skin(player)
local skin = player:get_attribute("homedecor:player_skin")
if not skin or skin == "" then
return default_skin, true
end
return skin, false
end
local function set_player_skin(player, skin, save)
@ -72,7 +60,6 @@ local function set_player_skin(player, skin, save)
if save and not skinsdb_mod_path then
if skin == default_skin then
skin = "default"
player:set_attribute("homedecor:player_skin", "")
else
player:set_attribute("homedecor:player_skin", skin)
@ -80,13 +67,9 @@ local function set_player_skin(player, skin, save)
end
end
local function unset_player_skin(player)
set_player_skin(player, nil, true)
end
local def = {
description = "Wardrobe",
description = S("Wardrobe"),
drawtype = "mesh",
mesh = "homedecor_bedroom_wardrobe.obj",
tiles = {
@ -104,7 +87,7 @@ local def = {
collision_box = wd_cbox,
sounds = default.node_sound_wood_defaults(),
on_rotate = screwdriver.rotate_simple,
on_rotate = minetest.get_modpath("screwdriver") and screwdriver.rotate_simple or nil,
on_place = function(itemstack, placer, pointed_thing)
@ -123,7 +106,7 @@ local def = {
local meta = minetest.get_meta(pos)
meta:set_string("infotext", "Wardrobe")
meta:set_string("infotext", S("Wardrobe"))
meta:get_inventory():set_size("main", 10)
@ -143,10 +126,10 @@ local def = {
meta:set_string("formspec", "size[5.5,8.5]" ..
default.gui_bg .. default.gui_bg_img .. default.gui_slots ..
"vertlabel[0,0.5;" .. minetest.formspec_escape("Clothes") .. "]" ..
"vertlabel[0,0.5;" .. minetest.formspec_escape(S("Clothes")) .. "]" ..
"button_exit[0,3.29;0.6,0.6;default;x]" ..
clothes_strings ..
"vertlabel[0,5.2;" .. minetest.formspec_escape("Storage") .. "]" ..
"vertlabel[0,5.2;" .. minetest.formspec_escape(S("Storage")) .. "]" ..
"list[current_name;main;0.5,4.5;5,2;]" ..
"list[current_player;main;0.5,6.8;5,2;]" ..
"listring[]"
@ -195,8 +178,8 @@ if not skinsdb_mod_path then -- If not managed by skinsdb
if skin and skin ~= "" then
-- setting player skin on connect has no effect, so delay skin change
minetest.after(1, function(player, skin)
set_player_skin(player, skin)
minetest.after(1, function(player1, skin1)
set_player_skin(player1, skin1)
end, player, skin)
end
end)

View File

@ -0,0 +1,8 @@
# textdomain: homedecor_wardrobe
### init.lua ###
Clothes=Kleidung
Storage=Lagerraum
Wardrobe=Kleiderschrank

View File

@ -0,0 +1,8 @@
# textdomain: homedecor_wardrobe
### init.lua ###
Clothes=Ropa
Storage=Almacenamiento
Wardrobe=Guardarropa

View File

@ -0,0 +1,8 @@
# textdomain: homedecor_wardrobe
### init.lua ###
Clothes=Vêtements
Storage=Rangement
Wardrobe=Garde-robe

View File

@ -0,0 +1,8 @@
# textdomain: homedecor_wardrobe
### init.lua ###
Clothes=
Storage=
Wardrobe=

View File

@ -0,0 +1,8 @@
# textdomain: homedecor_wardrobe
### init.lua ###
Clothes=Pakaian
Storage=Simpanan
Wardrobe=Almari Pakaian

View File

@ -0,0 +1,8 @@
# textdomain: homedecor_wardrobe
### init.lua ###
Clothes=Roupas
Storage=Armazenamento
Wardrobe=Guarda Roupa

View File

@ -0,0 +1,8 @@
# textdomain: homedecor_wardrobe
### init.lua ###
Clothes=Roupas
Storage=Armazenamento
Wardrobe=Guarda Roupa

View File

@ -0,0 +1,8 @@
# textdomain: homedecor_wardrobe
### init.lua ###
Clothes=Одежда
Storage=Хранилище
Wardrobe=Гардероб

View File

@ -0,0 +1,8 @@
# textdomain: homedecor_wardrobe
### init.lua ###
Clothes=衣服
Storage=储藏间"
Wardrobe=衣柜

View File

@ -0,0 +1,8 @@
# textdomain: homedecor_wardrobe
### init.lua ###
Clothes=
Storage=
Wardrobe=

View File

@ -0,0 +1,4 @@
name = homedecor_wardrobe
description = Homedecor mod: wardrobe
depends = homedecor_common, default, player_api
optional_depends = homedecor_kitchen, homedecor_misc, 3d_armor, skinsdb, screwdriver