1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2025-01-23 16:30:19 +01:00

Sethome modifications

- (I hope) sethome works
This commit is contained in:
LeMagnesium 2014-11-01 16:23:22 +01:00
parent e2ddca88c4
commit 53588bf528

View File

@ -99,13 +99,17 @@ minetest.register_chatcommand("sethome", {
local output = 0 local output = 0
if is_in_nether then if is_in_nether then
output = io.open(nether_homes_file, "w") output = io.open(nether_homes_file, "w")
if output == 0 then return end -- Had not open the file
for i, v in pairs(homepos.nether) do
output:write(v.x.." "..v.y.." "..v.z.." "..i.."\n")
end
else else
output = io.open(real_homes_file, "w") output = io.open(real_homes_file, "w")
for i, v in pairs(homepos.real) do
output:write(v.x.." "..v.y.." "..v.z.." "..i.."\n")
end
end end
if output == 0 then return end -- Had not open the file
for i, v in pairs(homepos) do
output:write(v.x.." "..v.y.." "..v.z.." "..i.."\n")
end
io.close(output) io.close(output)
changed = false changed = false
end end