1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-12-24 17:50:37 +01:00

Fix strange crash with tsm_pyramids

- Solves #207
This commit is contained in:
LeMagnesium 2015-08-11 11:42:23 +02:00
parent e447b010ce
commit 21d9cc4203

View File

@ -66,8 +66,13 @@ minetest.register_globalstep(function(dtime)
pyramids.timer = pyramids.timer + dtime
if pyramids.timer < pyramids.max_time then return end
pyramids.timer = 0
for _,k in ipairs(pyramids.saved_chests) do
pyramids.fill_chest(k)
-- It might happen that chests are not loaded
if pyramids.saved_chests then
for _,k in ipairs(pyramids.saved_chests) do
pyramids.fill_chest(k)
end
else
pyramids.saved_chests = loadchests() or {}
end
minetest.log("action","[tsm_pyramids] Chests reloaded")
end)