Closed searcher-123 closed 3 months ago
Good catch, fixed for next version.
I assume this is due to the fact that the temporary station does not have a backer_name field.
It's more fundamental than that - there is no "station" (i.e. event.train.station is nil) when the stop is temporary.
Made some additional changes and improvements to this option.
Describe the issue If the Color trains parameter is enabled, and specify the points between stations for the train. When the train reaches this point, an error occurs.
Factorio version, IR version Factorio 1.1.107 IR3 3.1.26
Other mods installed Some small mod - JetPack, many QoL. Full list or just clean start game archive Ir3_.zip
I assume this is due to the fact that the temporary station does not have a backer_name field.
function CONTROL.train_changed_state(event) local enabled = (settings.global["ir-colour-trains"].value ~= "no") if enabled and event.train and event.train.valid and event.train.state == defines.train_state.wait_station then local stop = event.train.station local c = match_hue(stop.backer_name)