diff --git a/luaentity.lua b/luaentity.lua index af66aa1..d4a993c 100644 --- a/luaentity.lua +++ b/luaentity.lua @@ -68,7 +68,7 @@ local function get_blockpos(pos) z = math.floor(pos.z / 16)} end -local active_blocks = {} -- These only contain active blocks near players (i.e., not forceloaded ones) +pipeworks.active_blocks = {} -- These only contain active blocks near players (i.e., not forceloaded ones) local move_entities_globalstep_part1 = function(dtime) local active_block_range = tonumber(minetest.settings:get("active_block_range")) or 2 @@ -87,12 +87,12 @@ local move_entities_globalstep_part1 = function(dtime) end end end - active_blocks = new_active_blocks + pipeworks.active_blocks = new_active_blocks -- todo: callbacks on block load/unload end function pipeworks.is_active(pos) - return active_blocks[minetest.hash_node_position(get_blockpos(pos))] ~= nil + return pipeworks.active_blocks[minetest.hash_node_position(get_blockpos(pos))] ~= nil end local entitydef_default = {