diff options
author | orwell96 <orwell@bleipb.de> | 2020-10-07 17:20:47 +0200 |
---|---|---|
committer | orwell96 <orwell@bleipb.de> | 2020-10-07 17:20:47 +0200 |
commit | 3256c2778d626548541bcdfabf3026f781a2287c (patch) | |
tree | 8fac88986a2cd4f00ed6b1855dd1dafa08c09662 /advtrains_interlocking/database.lua | |
parent | a73236d7eb6ff79476d0187ff46e83872fc798be (diff) | |
download | advtrains-3256c2778d626548541bcdfabf3026f781a2287c.tar.gz advtrains-3256c2778d626548541bcdfabf3026f781a2287c.tar.bz2 advtrains-3256c2778d626548541bcdfabf3026f781a2287c.zip |
Forbid track modification when train, IP or TCB is on it, better handle removing of TCBs (H#149)
Diffstat (limited to 'advtrains_interlocking/database.lua')
-rw-r--r-- | advtrains_interlocking/database.lua | 8 |
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) |