mirror of
https://github.com/minetest-mods/skinsdb.git
synced 2024-12-23 07:50:18 +01:00
added 3d_armor compatibility
This commit is contained in:
parent
0def2bbae1
commit
39e78a3664
@ -1,3 +1,4 @@
|
|||||||
default
|
default
|
||||||
intllib?
|
intllib?
|
||||||
unified_inventory?
|
unified_inventory?
|
||||||
|
3d_armor?
|
||||||
|
10
players.lua
10
players.lua
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user