aboutsummaryrefslogtreecommitdiff
path: root/advtrains
diff options
context:
space:
mode:
Diffstat (limited to 'advtrains')
-rw-r--r--advtrains/signals.lua9
-rw-r--r--advtrains/tracks.lua2
2 files changed, 10 insertions, 1 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
diff --git a/advtrains/tracks.lua b/advtrains/tracks.lua
index e034e85..33a7999 100644
--- a/advtrains/tracks.lua
+++ b/advtrains/tracks.lua
@@ -622,7 +622,7 @@ function advtrains.can_dig_or_modify_track(pos)
return false, attrans("There's a Track Circuit Break here.")
end
-- signal ip?
- if advtrains.interlocking.db.is_ip_at(pos) then
+ if advtrains.interlocking.db.is_ip_at(pos, true) then -- is_ip_at with purge parameter
return false, attrans("There's a Signal Influence Point here.")
end
end