From 34fe0d5ffd14919fdb9495e45cfca294b248eefb Mon Sep 17 00:00:00 2001 From: autocommitter Date: Sun, 3 Nov 2024 00:00:02 +0100 Subject: State at 2024-11-03 --- auto_yards/nodes/(-630,26,2454).lua | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'auto_yards/nodes/(-630,26,2454).lua') diff --git a/auto_yards/nodes/(-630,26,2454).lua b/auto_yards/nodes/(-630,26,2454).lua index 8dd1ff7..4e69484 100644 --- a/auto_yards/nodes/(-630,26,2454).lua +++ b/auto_yards/nodes/(-630,26,2454).lua @@ -5,7 +5,8 @@ local sand_indicator = POS(-572,26,2515) --sand indicator local print_notification = true local sections = { - clay_factory = "327479", + sand_loading = "199126", + dirt_unloading = "541313", departures = "484515" } @@ -28,9 +29,13 @@ local function send_train() "CANNERY", "CAN_COLLECT_DEPARTURES" } - if section_occupancy(sections.clay_factory)[1] and F.indicator(sand_indicator) then - -- step the dirt wagons forward into sand wagons - print("Reshuffling sand export before departure") + if section_occupancy(sections.sand_loading)[1] and F.indicator(sand_indicator) then -- move the loaded sand wagons to the departures track when requested + base_rc[#base_rc+1] = "CAN_INTRA_SHUFFLE" + base_rc[#base_rc+1] = "CAN_HS_W" + base_rc[#base_rc+1] = "CAN_HS_W_AC" + base_rc[#base_rc+1] = "CAN_CLASS_SAND_LOAD" + F.indicator(S.yards.CAN.active_indicator_pos, true) --activate the yard to prevent other trains entering while we're moving around + elseif section_occupancy(sections.dirt_unloading)[1] and not section_occupancy(sections.sand_loading)[1] then -- move the unloaded dirt wagons to the sand track if there's room base_rc[#base_rc+1] = "CAN_INTRA_SHUFFLE" base_rc[#base_rc+1] = "CAN_HS_W" base_rc[#base_rc+1] = "CAN_HS_W_AC" @@ -38,6 +43,7 @@ local function send_train() F.indicator(S.yards.CAN.active_indicator_pos, true) --activate the yard to prevent other trains entering while we're moving around elseif section_occupancy(sections.departures)[1] then --collect departures wagons before departing proper base_rc[#base_rc+1] = "CAN_REENTER_YARD" + F.indicator(ind, false) print("Collecting Departures") else base_rc[#base_rc+1] = "CAN_LIGHT_EXIT" -- cgit v1.2.3