forked from mtcontrib/factions
Uncomment: update_data
This commit is contained in:
parent
0a91ad8e6c
commit
a98d1893f8
@ -160,21 +160,21 @@ end
|
|||||||
minetest.register_on_mods_loaded(function()
|
minetest.register_on_mods_loaded(function()
|
||||||
minetest.log("Checking faction files.")
|
minetest.log("Checking faction files.")
|
||||||
for k, v in factions.factions.iterate() do
|
for k, v in factions.factions.iterate() do
|
||||||
--update_data(factions.factions, k, nil, factions.create_faction_table(), true)
|
update_data(factions.factions, k, nil, factions.create_faction_table(), true)
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.log("Checking parcel files.")
|
minetest.log("Checking parcel files.")
|
||||||
for k, v in factions.parcels.iterate() do
|
for k, v in factions.parcels.iterate() do
|
||||||
--update_data(factions.parcels, k, nil, factions.create_parcel_table(), true)
|
update_data(factions.parcels, k, nil, factions.create_parcel_table(), true)
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.log("Checking player files.")
|
minetest.log("Checking player files.")
|
||||||
for k, v in factions.players.iterate() do
|
for k, v in factions.players.iterate() do
|
||||||
--update_data(factions.players, k, nil, factions.create_player_table(), true)
|
update_data(factions.players, k, nil, factions.create_player_table(), true)
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.log("Checking ip files.")
|
minetest.log("Checking ip files.")
|
||||||
for k, v in factions.player_ips.iterate() do
|
for k, v in factions.player_ips.iterate() do
|
||||||
--update_data(factions.player_ips, k, nil, factions.create_ip_table(), true)
|
update_data(factions.player_ips, k, nil, factions.create_ip_table(), true)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
@ -19,9 +19,9 @@ function storagedb.Storagedb(dir)
|
|||||||
local list = minetest.deserialize(storage:get_string(directory))
|
local list = minetest.deserialize(storage:get_string(directory))
|
||||||
if not list then
|
if not list then
|
||||||
list = {}
|
list = {}
|
||||||
list[dir .. "/" .. key] = key
|
list[key] = key
|
||||||
else
|
else
|
||||||
list[dir .. "/" .. key] = key
|
list[key] = key
|
||||||
end
|
end
|
||||||
storage:set_string(directory, minetest.serialize(list))
|
storage:set_string(directory, minetest.serialize(list))
|
||||||
end
|
end
|
||||||
@ -30,7 +30,7 @@ function storagedb.Storagedb(dir)
|
|||||||
if not list then
|
if not list then
|
||||||
list = {}
|
list = {}
|
||||||
else
|
else
|
||||||
list[dir .. "/" .. key] = nil
|
list[key] = nil
|
||||||
end
|
end
|
||||||
storage:set_string(directory, minetest.serialize(list))
|
storage:set_string(directory, minetest.serialize(list))
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user