summaryrefslogtreecommitdiff
path: root/auto_yards/nodes/(-586,26,2504).lua
diff options
context:
space:
mode:
Diffstat (limited to 'auto_yards/nodes/(-586,26,2504).lua')
-rw-r--r--auto_yards/nodes/(-586,26,2504).lua42
1 files changed, 42 insertions, 0 deletions
diff --git a/auto_yards/nodes/(-586,26,2504).lua b/auto_yards/nodes/(-586,26,2504).lua
new file mode 100644
index 0000000..0823436
--- /dev/null
+++ b/auto_yards/nodes/(-586,26,2504).lua
@@ -0,0 +1,42 @@
+-- Cannery Dirt Loading Lane Modified
+local sand_indicator = POS(-572,26,2515) --sand indicator
+
+if F.has_rc("CAN_INTRA_SHUFFLE") then
+ if not atc_arrow then return end
+ if F.has_rc("CAN_CLASS_DIRT_UNLOAD") then -- remove wagons, step the fc, move wagons to sand loading
+ F.remove_rc("CAN_CLASS_DIRT_UNLOAD")
+ F.add_rc({
+ "CAN_HS_W",
+ "CAN_CLASS_SAND_LOAD",
+ "CAN_FROM_DIRT"
+ })
+ step_fc()
+ return
+ end
+ if F.has_rc("CAN_FROM_DIRT") then --leave wagons and return to locostore, shutting down the yard as we go
+ F.remove_rc({
+ "CAN_CLASS_SAND_LOAD",
+ "CAN_FROM_DIRT"
+ })
+ split_off_locomotive("A0B0")
+ F.add_rc({
+ "CAN_HS_W",
+ "CAN_send_to_locostore"
+ })
+ F.indicator(sand_indicator, false) --ensure the sand indicator is off to allow the wagons to load
+ F.indicator(ind,true) --re-enable the notification as we haven't actually left the yard yet
+ F.indicator(S.yards.CAN.active_indicator_pos, false) -- disable the active indicator
+ return
+ end
+ if F.has_rc("CAN_CLASS_SAND_LOAD") then -- remove wagons, step the fc, move wagons to departures
+ F.remove_rc("CAN_CLASS_SAND_LOAD")
+ F.add_rc({
+ "CAN_HS_W", --departures track has Cpl function built in
+ "CAN_CLASS_DEPARTURES"
+ })
+ step_fc()
+ return
+ end
+ return
+end
+F.lane_EOL("CAN",true) \ No newline at end of file