Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SUGGESTION] Ability to detect non-cybersyn trains #149

Closed
RomanKornev opened this issue Jun 3, 2024 · 1 comment
Closed

[SUGGESTION] Ability to detect non-cybersyn trains #149

RomanKornev opened this issue Jun 3, 2024 · 1 comment

Comments

@RomanKornev
Copy link

RomanKornev commented Jun 3, 2024

I was copy-pasting some trains and somehow ended up with a train that just went back and forth on the same route, ignoring any conditions and filling up the cargo beyond the requested amount.

I was able to use the indev menu to figure out that that train was NOT actually part of the cybersyn network, even though it went through the depot multiple times (setting a filter for that particular item showed 0 results). Deleting that train fixed the issue but it would be nice to have some sort of a warning when a train is visiting a cybersyn station without it being connected to the network.

For anyone who wants to check their current network for zombie trains, use this:

/c
local trains = remote.call("cybersyn", "read_global", "trains")
game.print("Number of trains in cybersyn: " .. table_size(trains))

local game_trains = game.surfaces[1].get_trains()
game.print("Number of trains in game: " .. #game_trains)

The counts should be identical, ignoring any shuttle trains.

@RomanKornev
Copy link
Author

Turns out the problem had nothing to do with this. The depot had a couple of stations missing the combinator. #150

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant