summaryrefslogtreecommitdiff
path: root/u_skins/skinlist.lua
diff options
context:
space:
mode:
authordmonty2 <dmonty@sd73.bc.ca>2014-03-16 22:26:58 -0700
committerdmonty2 <dmonty@sd73.bc.ca>2014-03-16 22:26:58 -0700
commit62be356cab50205780bbe20f003be47f51976585 (patch)
treeafa1d183b776c49f5f5c475a9f66911d2690bedd /u_skins/skinlist.lua
parent5e5810800664a1e5698b6f6dd0de7b033c09014e (diff)
first commit
Diffstat (limited to 'u_skins/skinlist.lua')
-rw-r--r--u_skins/skinlist.lua25
1 files changed, 25 insertions, 0 deletions
diff --git a/u_skins/skinlist.lua b/u_skins/skinlist.lua
new file mode 100644
index 0000000..5947531
--- /dev/null
+++ b/u_skins/skinlist.lua
@@ -0,0 +1,25 @@
+u_skins.list = {}
+u_skins.add = function(skin)
+ table.insert(u_skins.list,skin)
+end
+
+local id
+
+id = 1
+while true do
+ local f = io.open(minetest.get_modpath("u_skins").."/textures/player_"..id..".png")
+ if (not f) then break end
+ f:close()
+ u_skins.add("player_"..id)
+ id = id +1
+end
+
+id = 1
+while true do
+ local f = io.open(minetest.get_modpath("u_skins").."/textures/character_"..id..".png")
+ if (not f) then break end
+ f:close()
+ u_skins.add("character_"..id)
+ id = id +1
+end
+