aboutsummaryrefslogtreecommitdiff
path: root/advtrains/helpers.lua
diff options
context:
space:
mode:
Diffstat (limited to 'advtrains/helpers.lua')
-rw-r--r--advtrains/helpers.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/advtrains/helpers.lua b/advtrains/helpers.lua
index bfbcd0c..a265a04 100644
--- a/advtrains/helpers.lua
+++ b/advtrains/helpers.lua
@@ -458,6 +458,7 @@ function advtrains.position_in_range(pos, range)
return false
end
+--[[
local active_node_range = tonumber(minetest.settings:get("active_block_range"))*16 + 16
-- Function to check whether node at position(pos) is "loaded"/"active"
-- That is, whether it is within the active_block_range to a player
@@ -470,6 +471,10 @@ else
end
end
end
+]]
+function advtrains.is_node_loaded(pos)
+ return minetest.compare_block_status(pos, "loaded") -- loaded, or active?
+end
local variants = {
{"0", 0},