Compare commits

...

5 Commits

Author SHA1 Message Date
hunterdelyx1 902d915b8d black_glasses inventory texture 2015-02-02 23:29:04 +03:00
None 175743c714 Add autoregistration. 2015-02-02 23:03:43 +03:00
Sullome 9687d5b960 Add new textures of clothes. 2015-02-02 17:43:59 +03:00
None d747e2f5f1 Add textures table. 2015-02-02 13:15:35 +03:00
None 1f77ddff92 Change containers sizes. 2015-01-31 22:08:32 +03:00
21 changed files with 45 additions and 12 deletions

View File

@ -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",

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 179 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 405 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 382 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 405 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 400 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 505 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 322 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 418 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 478 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 490 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 376 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 734 B

View File

@ -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,