diff options
author | autocommitter <autocommitter@linux-forks.de> | 2024-11-03 00:00:02 +0100 |
---|---|---|
committer | autocommitter <autocommitter@linux-forks.de> | 2024-11-03 00:00:02 +0100 |
commit | 34fe0d5ffd14919fdb9495e45cfca294b248eefb (patch) | |
tree | b2bf1918d24e8b8adf4a5188d22bb5d12d9b297c /auto_yards/nodes/(-630,26,2454).lua | |
parent | 91cc36ecd4e2c68040642dbaf0b0dc46106df61c (diff) | |
download | luaatc_envs-34fe0d5ffd14919fdb9495e45cfca294b248eefb.tar.gz luaatc_envs-34fe0d5ffd14919fdb9495e45cfca294b248eefb.tar.bz2 luaatc_envs-34fe0d5ffd14919fdb9495e45cfca294b248eefb.zip |
State at 2024-11-03
Diffstat (limited to 'auto_yards/nodes/(-630,26,2454).lua')
-rw-r--r-- | auto_yards/nodes/(-630,26,2454).lua | 14 |
1 files changed, 10 insertions, 4 deletions
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" |