mirror of
https://github.com/minetest-mods/mesecons.git
synced 2025-07-06 17:40:24 +02:00
Small cleanups in internal.lua
, move forceloading reversal to legacy
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user