LTN Tracker

by eduran

A GUI for LTN. Displays information about LTN stops, available items and trains controlled by LTN.

Content
4 years ago
0.16 - 0.17
94
Trains

i Show when LTN combinators are disabled in LTN Tracker UI

4 years ago
(updated 4 years ago)

When the LTN combinator is disabled, highlight the respective row or combinator w/ a color indicating it is disabled. This will help identify one class of problem at a glance.

For me, I use the enable/disable feature in blueprints, copy-and-pasting LTN combinators, or mucking with wire connections. Too many times I've had the wrong products or trains arrive before I'm ready when I'm modifying the station, and that toggle has saved my bacon... until I leave it turned off and don't notice for a good long while.

4 years ago

Hi,

i do have the same problem - sometimes i have a disabled combinator and i wondering why things go wrong.

The problem is, that LTN Tracker does not know if a LTN Combi is en- or disabled, it doesn't even know that there is a combinator until the user clicks on the icon.

Due to technical limitations, finding a combinator can be quite expensive (in terms of time). I have to traverse through the circuit network and check every entity until i find that bugger. If there 30,40 or more stations the user might feel that impact.

I usually detect a disabled combi, when there are only default LTN signal for a station in LTN Tracker. When there is network id, min- or max-length missing i know its disabled.

cheers

4 years ago
(updated 4 years ago)

Ah, I'm guessing then that when the button is clicked, you walk the wire connections until you find an LTN combinator? That would explain why when I accidentally connected two due to a blueprint mishap, the wrong one kept showing up.

The performance cost might[1] be mitigated by only tracing wires for disabled combinators every nth_tick (frequency TBD). When a station is encountered, that combinator+station is cached and used use to show the disabled state in LTN tracker, and is removed from the cache when enabled. Otherwise, for enabled combinators, you never trace wires until they click the button in LTN station to locate its combinator.

At any given time, there's going to be--what?--one or two disabled combinators that are being traced? I do think, though, the caching will need to be a little more sophisticated since after it's cached, the network may change. Maybe it always has to be traced, but again, limited to only the disabled combinators.

[1] I say "might" because I've never programmatically used the circuit network.

4 years ago
(updated 4 years ago)

Ah, I'm guessing then that when the button is clicked, you walk the wire connections until you find an LTN combinator? That would explain why when I accidentally connected two due to a blueprint mishap, the wrong one kept showing up.

The performance cost might[1] be mitigated by only tracing wires for disabled combinators every nth_tick (frequency TBD). When a station is encountered, that combinator+station is cached and used use to show the disabled state in LTN tracker, and is removed from the cache when enabled. Otherwise, for enabled combinators, you never trace wires until they click the button in LTN station to locate its combinator.

Yes, there is no "on_circuit_wire_connected" event - so i cannot map combinators to stations when connections are being made.

I currently don't need nth_tick event and i don't want to start using it. What i can offer is a command that spits out every Station with a disabled or no combi. Eduran can implement a button which updates stations if the user wants to.

cheers

New response