summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
authorAlexander Weber <web.alexander@web.de>2017-06-18 23:15:58 +0200
committerAlexander Weber <web.alexander@web.de>2017-06-18 23:15:58 +0200
commit57b815f91ffd9bdd165c741350c6099f6b08685b (patch)
tree7070f5ff9fa564e68911defa017f328366f3d351 /init.lua
parent920061c0f190d6e79bf6720c983bf1b24aba4bc7 (diff)
changes needed for character_creator support
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/init.lua b/init.lua
index b9abc7a..105a68a 100644
--- a/init.lua
+++ b/init.lua
@@ -26,10 +26,15 @@ end
if minetest.global_exists("armor") then
armor.get_player_skin = function(self, name)
local skin = skins.get_player_skin(minetest.get_player_by_name(name))
- return skin:get_meta("_key") --3d_armor adds a ".png" but it should be compatible in most cases
+ return skin:get_texture()
end
armor.get_preview = function(self, name)
local skin = skins.get_player_skin(minetest.get_player_by_name(name))
return skin:get_preview()
end
end
+
+-- Update skin on join
+minetest.register_on_joinplayer(function(player)
+ skins.update_player_skin(player)
+end)