diff options
author | Alexander Weber <web.alexander@web.de> | 2017-06-15 16:37:43 +0200 |
---|---|---|
committer | Alexander Weber <web.alexander@web.de> | 2017-06-15 16:37:43 +0200 |
commit | 39e78a366433ca8417dfa252e93354e2e44adcb5 (patch) | |
tree | f78765b1612299855cf9ccd8a193c32ce5ffc11d /players.lua | |
parent | 0def2bbae193b7ac4a0d7e5efad44e3bbe08deed (diff) |
added 3d_armor compatibility
Diffstat (limited to 'players.lua')
-rw-r--r-- | players.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/players.lua b/players.lua index b7ff38a..5b161bd 100644 --- a/players.lua +++ b/players.lua @@ -28,3 +28,13 @@ end minetest.register_on_joinplayer(function(player) skins.update_player_skin(player) 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 |