Fix dependencies. Enable clothing inventory, but for now work only in minetest.

master
None 2015-01-28 19:18:43 +03:00
parent 10f9b4e3f3
commit 7f416c1886
5 changed files with 25 additions and 6 deletions

View File

@ -1 +1,2 @@
default
inventory

View File

@ -18,19 +18,38 @@ clothing.update_skin = function(player)
)
end
-- Save and restore data
minetest.register_on_player_receive_fields(function(player, formname, fields)
if (formname == "" or formname:sub(0,9) == "inventory") then
clothing.update_skin(player)
end
print("For debug (from clothing mod) inv. fields:",dump(fields))
end)
minetest.register_on_joinplayer(function(player)
clothing.update_skin(player)
end)
--{{{ Cloth
-- Required values is:
--{{{ Cloth -- Required values is:
-- "wear_image" (this image is adding on player skin)
minetest.register_craftitem("clothing:test", {
decription = "Test cloth",
minetest.register_craftitem("clothing:test1", {
decription = "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",
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",
inventory_image = "clothing_test3.png",
wield_image = "clothing_test3.png",
wear_image = "clothing_test3.png",
stack_max = 1,
})
--}}}

Binary file not shown.

After

Width:  |  Height:  |  Size: 200 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 B

View File

@ -1,2 +1 @@
default
clothing