summaryrefslogtreecommitdiff
path: root/players.lua
diff options
context:
space:
mode:
authorAlexander Weber <web.alexander@web.de>2017-02-09 23:06:25 +0100
committerAlexander Weber <web.alexander@web.de>2017-02-09 23:06:25 +0100
commitd5df0d5e86633c21cafe0282cb81399acf4b186c (patch)
tree3b7c9ce8376ddfc9b289124c15d2eca9f5e19edc /players.lua
parent3294c653616c07dc2fe979aac75debfc4b1d1a05 (diff)
renamed back to "skins" for beter compatibility
make unified_inventory opitonal, move the UI code to an own file
Diffstat (limited to 'players.lua')
-rw-r--r--players.lua24
1 files changed, 12 insertions, 12 deletions
diff --git a/players.lua b/players.lua
index 3053530..e4f8842 100644
--- a/players.lua
+++ b/players.lua
@@ -1,14 +1,14 @@
-u_skins.load_players = function()
- local file = io.open(u_skins.file, "r")
+skins.load_players = function()
+ local file = io.open(skins.file, "r")
if file then
for line in file:lines() do
local data = string.split(line, " ", 2)
- u_skins.u_skins[data[1]] = data[2]
+ skins.skins[data[1]] = data[2]
end
io.close(file)
end
end
-u_skins.load_players()
+skins.load_players()
local ttime = 0
minetest.register_globalstep(function(t)
@@ -17,20 +17,20 @@ minetest.register_globalstep(function(t)
return
end
ttime = 0
- u_skins.save()
+ skins.save()
end)
-minetest.register_on_shutdown(function() u_skins.save() end)
+minetest.register_on_shutdown(function() skins.save() end)
-u_skins.save = function()
- if not u_skins.file_save then
+skins.save = function()
+ if not skins.file_save then
return
end
- u_skins.file_save = false
- local output = io.open(u_skins.file, "w")
- for name, skin in pairs(u_skins.u_skins) do
+ skins.file_save = false
+ local output = io.open(skins.file, "w")
+ for name, skin in pairs(skins.skins) do
if name and skin then
- if skin ~= u_skins.default then
+ if skin ~= skins.default then
output:write(name.." "..skin.."\n")
end
end