summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--api.lua (renamed from players.lua)2
-rw-r--r--depends.txt1
-rw-r--r--init.lua20
3 files changed, 2 insertions, 21 deletions
diff --git a/players.lua b/api.lua
index 5b161bd..6037d75 100644
--- a/players.lua
+++ b/api.lua
@@ -1,7 +1,7 @@
-- get current skin
skins.get_player_skin = function(player)
local skin = player:get_attribute("skin")
- if not skins.is_skin(skin) then
+ if not skins.textures[skin] then
skin = skins.default
end
return skin
diff --git a/depends.txt b/depends.txt
index 45a6c66..6fac624 100644
--- a/depends.txt
+++ b/depends.txt
@@ -1,4 +1,3 @@
-default
intllib?
unified_inventory?
3d_armor?
diff --git a/init.lua b/init.lua
index d49335d..953e1b6 100644
--- a/init.lua
+++ b/init.lua
@@ -9,26 +9,8 @@ skins = {}
skins.modpath = minetest.get_modpath(minetest.get_current_modname())
skins.default = "character_1"
-skins.type = { SPRITE=0, MODEL=1, ERROR=99 }
-skins.get_type = function(texture)
- if not skins.is_skin(texture) then
- return skins.type.ERROR
- end
- return skins.type.MODEL
-end
-
-skins.is_skin = function(texture)
- if not texture then
- return false
- end
- if not skins.meta[texture] then
- return false
- end
- return true
-end
-
+dofile(skins.modpath.."/api.lua")
dofile(skins.modpath.."/skinlist.lua")
-dofile(skins.modpath.."/players.lua")
-- Unified inventory page/integration
if minetest.get_modpath("unified_inventory") then