How Far Has it Been?


Ever wondered how far your trains have travelled? Now you can see in real time!

Tweaks
4 years ago
0.16 - 1.1
3.97K

b [fixed] Error with Multiple Unit Train Control

5 years ago

Activating MUTC (replaces all locomotives) while this mod is active results in the following crash:

Error while running event howfardiditgo::on_nth_tick(30)
LuaTrain API call when LuaTrain was invalid.
stack traceback:
    __howfardiditgo__/control.lua:68: in function <__howfardiditgo__/control.lua:65>
stack traceback:
    [C]: in function '__index'
    __howfardiditgo__/control.lua:68: in function <__howfardiditgo__/control.lua:65>
5 years ago

Thanks, at the moment non-vanilla types of carriage aren't supported, so I'll look into incompatibilities like this as and when they come up and update when it's fixed.

Thanks
Jack

5 years ago

This is (finally) fixed in 0.17.5.

Unfortunately when the trains get swapped to the new locomotives, the distances get wiped. So far I've not thought of a way around it, but maybe in another 5 months I'll come up with something ;)

5 years ago

All you have to do is store distances in a train id indexed table.
Then migrate ids in https://lua-api.factorio.com/latest/events.html#on_train_created

5 years ago

This is already what this mod does. Without MUT it works fine. My guess is the data is being cleared prematurely when MUT updates the locomotives, but I need to look into it more

New response