summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--depends.txt1
-rw-r--r--players.lua10
2 files changed, 11 insertions, 0 deletions
diff --git a/depends.txt b/depends.txt
index ae2f803..34f0ef9 100644
--- a/depends.txt
+++ b/depends.txt
@@ -1,3 +1,4 @@
default
intllib?
unified_inventory?
+3d_armor?
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