[0.12.22] [Hanziq] Unexpected train_changed_state event

This subforum contains all the issues which we already resolved.
Post Reply
Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

[0.12.22] [Hanziq] Unexpected train_changed_state event

Post by Choumiko »

When a train is stopped at a red signal it triggers a state change every 300 ticks (repathing maybe?)

Image

Command used:

Code: Select all

/c script.on_event(defines.events.on_train_changed_state, function(event) game.players[1].print(game.tick.. " "..event.train.state) end)
Reproduce: Build the above setup, train on the right is in automode, trying to go to the station. It's state changes between "on_the_path" (0) and "wait_signal" (5)

Expected behaviour: No event triggered at all.

I used Testmode and Color coding as mods, doubt it makes any difference.

User avatar
HanziQ
Former Staff
Former Staff
Posts: 630
Joined: Fri Mar 27, 2015 7:07 am
Contact:

Re: [0.12.22] [Martin] Unexpected train_changed_state event

Post by HanziQ »

This is a problem with the path recalculation code, since I'm planning to do changes in that area, and the fix isn't that simple, I'm postponing this for 0.13

User avatar
HanziQ
Former Staff
Former Staff
Posts: 630
Joined: Fri Mar 27, 2015 7:07 am
Contact:

Re: [0.12.22] [Hanziq] Unexpected train_changed_state event

Post by HanziQ »

Seems to have been fixed with some other changes.

Post Reply

Return to “Resolved Problems and Bugs”