Compare commits
5 Commits
333f2a276d
...
902d915b8d
Author | SHA1 | Date |
---|---|---|
hunterdelyx1 | 902d915b8d | |
None | 175743c714 | |
Sullome | 9687d5b960 | |
None | d747e2f5f1 | |
None | 1f77ddff92 |
|
@ -5,7 +5,7 @@ clothing.update_skin = function(player)
|
|||
-- Function gets the player's "wear" inventory list.
|
||||
-- It's created by mod "inventory"
|
||||
local weared = player:get_inventory():get_list("wear")
|
||||
local skin = default.player_get_animation(player).textures[1]
|
||||
local skin = player:get_player_name() .. ".png"
|
||||
for _,itemstack in ipairs(weared) do
|
||||
if not itemstack:is_empty() then
|
||||
skin = skin .. "^" .. itemstack:get_definition().wear_image
|
||||
|
@ -29,24 +29,57 @@ minetest.register_on_joinplayer(function(player)
|
|||
clothing.update_skin(player)
|
||||
end)
|
||||
|
||||
--{{{ Cloth -- Required values is:
|
||||
-- "wear_image" (this image is adding on player skin)
|
||||
--{{{ Cloth
|
||||
|
||||
-- Names of items (and textures) for autoregistration
|
||||
clothing.registered = {
|
||||
"black_coat",
|
||||
"black_glasses",
|
||||
"blue_longskirt",
|
||||
"blue_waistcoat",
|
||||
"brown_hat",
|
||||
"brown_hat_wth_badge",
|
||||
"hazel_scarf",
|
||||
"jabot",
|
||||
"leather_boots",
|
||||
"leather_dirty_coat",
|
||||
"leather_high_boot",
|
||||
"leather_long_gloves",
|
||||
"linen_shirt",
|
||||
"salmon_long_dress",
|
||||
"white_apron",
|
||||
"white_blouse",
|
||||
"white_bonnet",
|
||||
"white_greek_dress",
|
||||
}
|
||||
|
||||
for _,name in pairs(clothing.registered) do
|
||||
minetest.register_craftitem("clothing:" .. name, {
|
||||
description = name:gsub("_", " "):gsub("^.", string.upper),
|
||||
inventory_image = "clothing_" ..name.. "_inv.png",
|
||||
wield_image = "clothing_" ..name.. "_inv.png",
|
||||
wear_image = "clothing_" ..name.. ".png",
|
||||
stack_max = 1,
|
||||
})
|
||||
end
|
||||
|
||||
-- Special case
|
||||
minetest.register_craftitem("clothing:test1", {
|
||||
decription = "Test cloth 1",
|
||||
description = "Test cloth 1",
|
||||
inventory_image = "clothing_test.png",
|
||||
wield_image = "clothing_test.png",
|
||||
wear_image = "clothing_test.png",
|
||||
stack_max = 1,
|
||||
})
|
||||
minetest.register_craftitem("clothing:test2", {
|
||||
decription = "Test cloth 2",
|
||||
description = "Test cloth 2",
|
||||
inventory_image = "clothing_test2.png",
|
||||
wield_image = "clothing_test2.png",
|
||||
wear_image = "clothing_test2.png",
|
||||
stack_max = 1,
|
||||
})
|
||||
minetest.register_craftitem("clothing:test3", {
|
||||
decription = "Test cloth 3",
|
||||
description = "Test cloth 3",
|
||||
inventory_image = "clothing_test3.png",
|
||||
wield_image = "clothing_test3.png",
|
||||
wear_image = "clothing_test3.png",
|
||||
|
|
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 179 B |
After Width: | Height: | Size: 230 B |
After Width: | Height: | Size: 405 B |
After Width: | Height: | Size: 382 B |
After Width: | Height: | Size: 405 B |
After Width: | Height: | Size: 400 B |
After Width: | Height: | Size: 505 B |
After Width: | Height: | Size: 206 B |
After Width: | Height: | Size: 322 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 262 B |
After Width: | Height: | Size: 248 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 418 B |
After Width: | Height: | Size: 478 B |
After Width: | Height: | Size: 490 B |
After Width: | Height: | Size: 376 B |
After Width: | Height: | Size: 734 B |
|
@ -1,10 +1,10 @@
|
|||
containers = {
|
||||
["containers:chest"] = { w = 8, h = 4 },
|
||||
["containers:chest_locked"] = { w = 8, h = 4 },
|
||||
["containers:wood_bin"] = { w = 6, h = 3 },
|
||||
["containers:wood_bin_locked"] = { w = 6, h = 3 },
|
||||
["containers:wood_jbox"] = { w = 4, h = 2 },
|
||||
["containers:wood_jbox_locked"] = { w = 4, h = 2 },
|
||||
["containers:chest"] = { w = 9, h = 3 },
|
||||
["containers:chest_locked"] = { w = 9, h = 3 },
|
||||
["containers:wood_bin"] = { w = 5, h = 3 },
|
||||
["containers:wood_bin_locked"] = { w = 5, h = 3 },
|
||||
["containers:wood_jbox"] = { w = 3, h = 2 },
|
||||
["containers:wood_jbox_locked"] = { w = 3, h = 2 },
|
||||
y_offset = 0.2,
|
||||
inventory_margin = 0.72,
|
||||
hotbar_margin = 0.23,
|
||||
|
|