update homedecor_wardrobe

This commit is contained in:
Alexander Weber 2021-12-23 17:36:41 +01:00
parent 2e82696829
commit 22a16bef4a
38 changed files with 121 additions and 16 deletions

View File

@ -0,0 +1,24 @@
unused_args = false
allow_defined_top = true
max_comment_line_length = 999
read_globals = {
"DIR_DELIM",
"minetest", "core",
"unpack",
"dump",
table = { fields = { "copy", "getn" } },
"vector", "nodeupdate",
"VoxelManip", "VoxelArea",
"PseudoRandom", "ItemStack",
"default",
"homedecor",
"player_api",
"screwdriver",
"skins",
}
globals = {
"armor",
}

View File

@ -1,5 +0,0 @@
homedecor_common
default
homedecor_kitchen?
homedecor_misc?
player_api

View File

@ -1,15 +1,16 @@
local modpath = minetest.get_modpath("homedecor_wardrobe") 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}} local wd_cbox = {type = "fixed", fixed = {-0.5, -0.5, -0.5, 0.5, 1.5, 0.5}}
local skinslist = {"male1", "male2", "male3", "male4", "male5"} local skinslist = {"male1", "male2", "male3", "male4", "male5"}
local default_skin = "character.png" local default_skin = "character.png"
for _, shrt in ipairs(skinslist) do for _, shrt in ipairs(skinslist) do
for _, prefix in ipairs({"", "fe"}) do for _, prefix in ipairs({"", "fe"}) do
local skin_name = prefix..shrt local skin_name = prefix..shrt
local skin = { local skin = {
texture = "homedecor_clothes_"..skin_name..".png", texture = "homedecor_clothes_"..skin_name..".png",
@ -24,13 +25,14 @@ for _, shrt in ipairs(skinslist) do
end end
end end
local function set_player_skin(player, skin, save) local function set_player_skin(player, skin, save)
player_api.set_skin(player, skin, not save) player_api.set_skin(player, skin, not save)
end end
local def = { local def = {
description = "Wardrobe", description = S("Wardrobe"),
drawtype = "mesh", drawtype = "mesh",
mesh = "homedecor_bedroom_wardrobe.obj", mesh = "homedecor_bedroom_wardrobe.obj",
tiles = { tiles = {
@ -48,7 +50,7 @@ local def = {
collision_box = wd_cbox, collision_box = wd_cbox,
sounds = default.node_sound_wood_defaults(), 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) on_place = function(itemstack, placer, pointed_thing)
@ -67,7 +69,7 @@ local def = {
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
meta:set_string("infotext", "Wardrobe") meta:set_string("infotext", S("Wardrobe"))
meta:get_inventory():set_size("main", 10) meta:get_inventory():set_size("main", 10)
@ -87,10 +89,10 @@ local def = {
meta:set_string("formspec", "size[5.5,8.5]" .. meta:set_string("formspec", "size[5.5,8.5]" ..
default.gui_bg .. default.gui_bg_img .. default.gui_slots .. 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]" .. "button_exit[0,3.29;0.6,0.6;default;x]" ..
clothes_strings .. 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_name;main;0.5,4.5;5,2;]" ..
"list[current_player;main;0.5,6.8;5,2;]" .. "list[current_player;main;0.5,6.8;5,2;]" ..
"listring[]" "listring[]"
@ -134,7 +136,7 @@ minetest.register_craft( {
output = "homedecor:wardrobe", output = "homedecor:wardrobe",
recipe = { recipe = {
{ "homedecor:drawer_small", "homedecor:kitchen_cabinet" }, { "homedecor:drawer_small", "homedecor:kitchen_cabinet" },
{ "homedecor:drawer_small", "default:wood" }, { "homedecor:drawer_small", "group:wood" },
{ "homedecor:drawer_small", "default:wood" } { "homedecor:drawer_small", "group:wood" }
}, },
}) })

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 740 B

After

Width:  |  Height:  |  Size: 734 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 369 B

After

Width:  |  Height:  |  Size: 365 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 677 B

After

Width:  |  Height:  |  Size: 670 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 935 B

After

Width:  |  Height:  |  Size: 919 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 447 B

After

Width:  |  Height:  |  Size: 444 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 612 B

After

Width:  |  Height:  |  Size: 587 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 326 B

After

Width:  |  Height:  |  Size: 320 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 564 B

After

Width:  |  Height:  |  Size: 516 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 489 B

After

Width:  |  Height:  |  Size: 469 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 523 B

After

Width:  |  Height:  |  Size: 493 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 701 B

After

Width:  |  Height:  |  Size: 698 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 623 B

After

Width:  |  Height:  |  Size: 618 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 916 B

After

Width:  |  Height:  |  Size: 900 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 409 B

After

Width:  |  Height:  |  Size: 383 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 293 B

After

Width:  |  Height:  |  Size: 287 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 668 B

After

Width:  |  Height:  |  Size: 659 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 683 B

After

Width:  |  Height:  |  Size: 671 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB