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

@ -219,7 +219,7 @@ function mesecon.table2file(filename, table)
f:close()
end
-- Forceloading: Force server to load area if node is nil
-- Block position "hashing" (convert to integer) functions for voxelmanip cache
local BLOCKSIZE = 16
-- convert node position --> block hash
@ -363,14 +363,6 @@ function mesecon.swap_node_force(pos, name)
end
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(wpath..DIR_DELIM.."mesecon_forceloaded")
-- Autoconnect Hooks
-- Nodes like conductors may change their appearance and their connection rules
-- right after being placed or after being dug, e.g. the default wires use this