aboutsummaryrefslogtreecommitdiff
path: root/advtrains_interlocking/database.lua
diff options
context:
space:
mode:
Diffstat (limited to 'advtrains_interlocking/database.lua')
-rw-r--r--advtrains_interlocking/database.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/advtrains_interlocking/database.lua b/advtrains_interlocking/database.lua
index 8df874f..e2c9edc 100644
--- a/advtrains_interlocking/database.lua
+++ b/advtrains_interlocking/database.lua
@@ -526,6 +526,14 @@ function ildb.set_sigd_for_signal(pos, sigd)
signal_assignments[pts] = sigd
end
+-- checks if there's any influence point set to this position
+function ildb.is_ip_at(pos)
+ local pts = advtrains.roundfloorpts(pos)
+ if influence_points[pts] then
+ return true
+ end
+ return false
+end
-- checks if a signal is influencing here
function ildb.get_ip_signal(pts, connid)