From 62be356cab50205780bbe20f003be47f51976585 Mon Sep 17 00:00:00 2001 From: dmonty2 Date: Sun, 16 Mar 2014 22:26:58 -0700 Subject: first commit --- u_skins/skinlist.lua | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 u_skins/skinlist.lua (limited to 'u_skins/skinlist.lua') 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 + -- cgit v1.2.3