diff options
author | autocommitter <autocommitter@linux-forks.de> | 2024-12-09 00:00:01 +0100 |
---|---|---|
committer | autocommitter <autocommitter@linux-forks.de> | 2024-12-09 00:00:01 +0100 |
commit | c4849997e8d0c9a99ee7b24e0495a99d9ddb7e83 (patch) | |
tree | c9dfdca907d48922dac2a251fb0ff8b41155c242 /auto_yards/nodes | |
parent | df137f9521f19584393e65f7d987c29d3a2219a3 (diff) | |
download | luaatc_envs-c4849997e8d0c9a99ee7b24e0495a99d9ddb7e83.tar.gz luaatc_envs-c4849997e8d0c9a99ee7b24e0495a99d9ddb7e83.tar.bz2 luaatc_envs-c4849997e8d0c9a99ee7b24e0495a99d9ddb7e83.zip |
State at 2024-12-09
Diffstat (limited to 'auto_yards/nodes')
-rw-r--r-- | auto_yards/nodes/(-586,26,2504).lua | 3 | ||||
-rw-r--r-- | auto_yards/nodes/(-588,26,2504).lua | 18 | ||||
-rw-r--r-- | auto_yards/nodes/(-588,26,2534).lua | 3 | ||||
-rw-r--r-- | auto_yards/nodes/(-630,26,2454).lua | 15 |
4 files changed, 35 insertions, 4 deletions
diff --git a/auto_yards/nodes/(-586,26,2504).lua b/auto_yards/nodes/(-586,26,2504).lua index c8fd2cb..e5831fc 100644 --- a/auto_yards/nodes/(-586,26,2504).lua +++ b/auto_yards/nodes/(-586,26,2504).lua @@ -35,8 +35,7 @@ if F.has_rc("CAN_INTRA_SHUFFLE") then "CAN_HS_W", --departures track has Cpl function built in "CAN_CLASS_DEPARTURES" }) - step_fc() - F.indicator(sand_indicator, false) --ensure the sand indicator is off to allow the wagons to load + F.indicator(sand_indicator, false) -- Loaded wagons have been sent to departures track. Disable the request indicator return end return diff --git a/auto_yards/nodes/(-588,26,2504).lua b/auto_yards/nodes/(-588,26,2504).lua new file mode 100644 index 0000000..8b1f38e --- /dev/null +++ b/auto_yards/nodes/(-588,26,2504).lua @@ -0,0 +1,18 @@ +-- Cannery Dirt Loading Lane Modified +local ind = POS(-594,26,2488) --notification indicator +local clay_indicator = POS(-570,26,2515) --clay loaded indicator + +if F.has_rc("CAN_INTRA_SHUFFLE") then + if not atc_arrow then return end + if F.has_rc("CAN_CLASS_CLAY_LOAD") then -- remove wagons, step the fc, move wagons to departures + F.remove_rc("CAN_CLASS_CLAY_LOAD") + F.add_rc({ + "CAN_HS_W", --departures track has Cpl function built in + "CAN_CLASS_DEPARTURES" + }) + F.indicator(clay_indicator, false) -- Loaded wagons have been sent to departures track. Disable the request indicator + return + end + return +end +F.lane_EOL("CAN",true)
\ No newline at end of file diff --git a/auto_yards/nodes/(-588,26,2534).lua b/auto_yards/nodes/(-588,26,2534).lua new file mode 100644 index 0000000..d783815 --- /dev/null +++ b/auto_yards/nodes/(-588,26,2534).lua @@ -0,0 +1,3 @@ +if F.has_rc("CAN_INTRA_SHUFFLE") then atc_send("A0S0WRD5S3A1") return end +-- EOL +F.lane_EOL("CAN",false)
\ No newline at end of file diff --git a/auto_yards/nodes/(-630,26,2454).lua b/auto_yards/nodes/(-630,26,2454).lua index 4e69484..d968800 100644 --- a/auto_yards/nodes/(-630,26,2454).lua +++ b/auto_yards/nodes/(-630,26,2454).lua @@ -1,10 +1,12 @@ -- Cannery Loco Storage local notification_id = "CAN" local ind = POS(-594,26,2488) --notification indicator -local sand_indicator = POS(-572,26,2515) --sand indicator +local sand_indicator = POS(-572,26,2515) --sand loaded indicator +local clay_indicator = POS(-570,26,2515) --clay loaded indicator local print_notification = true local sections = { + clay_loading = "769966", sand_loading = "199126", dirt_unloading = "541313", departures = "484515" @@ -29,18 +31,27 @@ local function send_train() "CANNERY", "CAN_COLLECT_DEPARTURES" } - if section_occupancy(sections.sand_loading)[1] and F.indicator(sand_indicator) then -- move the loaded sand wagons to the departures track when requested + if section_occupancy(sections.clay_loading)[1] and F.indicator(clay_indicator) then -- move the loaded clay 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_CLAY_LOAD" + F.indicator(S.yards.CAN.active_indicator_pos, true) --activate the yard to prevent other trains entering while we're moving around + print("Collecting loaded clay wagons") + elseif 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 + print("Collecting loaded sand wagons") 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" base_rc[#base_rc+1] = "CAN_CLASS_DIRT_UNLOAD" F.indicator(S.yards.CAN.active_indicator_pos, true) --activate the yard to prevent other trains entering while we're moving around + print("Respotting unloaded dirt wagons to sand loading area") 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) |