aboutsummaryrefslogtreecommitdiff
path: root/advtrains/signals.lua
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2021-03-12 17:56:07 +0100
committerorwell96 <orwell@bleipb.de>2021-03-12 17:56:07 +0100
commitb2d7bbb2c577a2b28cdaf421daf9b143f4376c8a (patch)
tree49d7ec4e1a3c4b6cf64180978fdc6bd5a8486606 /advtrains/signals.lua
parent2dcf60dec6304abc910dea82c6f9a5904bbf365b (diff)
downloadadvtrains-b2d7bbb2c577a2b28cdaf421daf9b143f4376c8a.tar.gz
advtrains-b2d7bbb2c577a2b28cdaf421daf9b143f4376c8a.tar.bz2
advtrains-b2d7bbb2c577a2b28cdaf421daf9b143f4376c8a.zip
Signal influence points: Make sure to clear on removal of signal, clear orphaned when digging rail
Diffstat (limited to 'advtrains/signals.lua')
-rw-r--r--advtrains/signals.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/advtrains/signals.lua b/advtrains/signals.lua
index 9df2f99..59612cd 100644
--- a/advtrains/signals.lua
+++ b/advtrains/signals.lua
@@ -9,6 +9,12 @@ local function can_dig_func(pos)
end
return true
end
+local function after_dig_func(pos)
+ if advtrains.interlocking then
+ return advtrains.interlocking.signal_after_dig(pos)
+ end
+ return true
+end
local function aspect(b)
return {
@@ -97,6 +103,7 @@ for r,f in pairs({on={as="off", ls="green", als="red"}, off={as="on", ls="red",
supported_aspects = suppasp,
},
can_dig = can_dig_func,
+ after_dig_node = after_dig_func,
})
advtrains.trackplacer.add_worked("advtrains:retrosignal", r, rotation, nil)
@@ -163,6 +170,7 @@ for r,f in pairs({on={as="off", ls="green", als="red"}, off={as="on", ls="red",
end,
},
can_dig = can_dig_func,
+ after_dig_node = after_dig_func,
})
advtrains.trackplacer.add_worked("advtrains:signal", r, rotation, nil)
end
@@ -232,6 +240,7 @@ for r,f in pairs({on={as="off", ls="green", als="red"}, off={as="on", ls="red",
end,
},
can_dig = can_dig_func,
+ after_dig_node = after_dig_func,
})
end
end