[0.15.4] on_player_driving_changed_state does not trigger

Bugs that are actually features.
Post Reply
folk
Long Handed Inserter
Long Handed Inserter
Posts: 96
Joined: Fri Mar 03, 2017 5:00 pm
Contact:

[0.15.4] on_player_driving_changed_state does not trigger

Post by folk »

Hi,
I am unsure if this is a bug introduced in 0.15.4 or not, but I think it is;
When the player picks up the vehicle they were in (mines it), on_player_driving_changed_state does not trigger at all.

If he exits the vehicle using the keybinding, it does.

EDIT: Only tested in a singleplayer local game.

folk
Long Handed Inserter
Long Handed Inserter
Posts: 96
Joined: Fri Mar 03, 2017 5:00 pm
Contact:

Re: [0.15.4] on_player_driving_changed_state does not trigger

Post by folk »

It seems to be "broken" in 0.15.3 as well. I can test 0.14 tomorrow.

Perhaps it's not broken at all, and it never did trigger when you picked up your current vehicle.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.15.4] on_player_driving_changed_state does not trigger

Post by Rseding91 »

The driving changed event is not fired in some specific cases like this because the game *must* eject the player from the vehicle and the callbacks could put the player into the vehicle he was just ejected from.
Additionally the event isn't fired when a player logs off either even though he's technically ejected from the vehicle when offline.

It's a limitation of how it has to work to ensure mods don't break normal game behavior.
If you want to get ahold of me I'm almost always on Discord.

folk
Long Handed Inserter
Long Handed Inserter
Posts: 96
Joined: Fri Mar 03, 2017 5:00 pm
Contact:

Re: [0.15.4] on_player_driving_changed_state does not trigger

Post by folk »

Alright, thank you! It might be worth mentioning this in the API docs, but it could also just be that it's self-evident to everyone but me, since this "issue" hasn't been raised on the forums before as far as my search could find.

Post Reply

Return to “Not a bug”