Small cleanups in internal.lua, move forceloading reversal to legacy

This commit is contained in:
Jeija
2016-08-30 19:32:11 +02:00
parent e561be7fa3
commit 6dacdaee1f
3 changed files with 12 additions and 14 deletions

View File

@ -28,3 +28,10 @@ function mesecon.receptor_off(self, pos, rules)
mesecon.queue:add_action(pos, "receptor_off", {rules}, nil, rules)
end
-- Un-forceload any forceloaded mapblocks from older versions of Mesecons which
-- used forceloading instead of VoxelManipulators.
local old_forceloaded_blocks = mesecon.file2table("mesecon_forceloaded")
for hash, _ in pairs(old_forceloaded_blocks) do
minetest.forceload_free_block(unhash_blockpos(hash))
end
os.remove(minetest.get_worldpath()..DIR_DELIM.."mesecon_forceloaded")