added 3d_armor compatibility

This commit is contained in:
Alexander Weber 2017-06-15 16:37:43 +02:00
parent 0def2bbae1
commit 39e78a3664
2 changed files with 11 additions and 0 deletions

View File

@ -1,3 +1,4 @@
default default
intllib? intllib?
unified_inventory? unified_inventory?
3d_armor?

View File

@ -28,3 +28,13 @@ end
minetest.register_on_joinplayer(function(player) minetest.register_on_joinplayer(function(player)
skins.update_player_skin(player) skins.update_player_skin(player)
end) end)
-- 3d_armor compatibility
if minetest.global_exists("armor") then
armor.get_player_skin = function(self, name)
return skins.get_player_skin(minetest.get_player_by_name(name))
end
armor.get_preview = function(self, name)
return skins.preview[skins.get_player_skin(minetest.get_player_by_name(name))]
end
end