on_pre_player_driving_changed_state

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
IronCartographer
Filter Inserter
Filter Inserter
Posts: 464
Joined: Tue Jun 28, 2016 2:07 pm
Contact:

on_pre_player_driving_changed_state

Post by IronCartographer »

Title says it all!

Sometimes a player really shouldn't be leaving a vehicle accidentally, like in a temporary space a vehicle might pass through where no player should be walking... :)
Rseding91
Factorio Staff
Factorio Staff
Posts: 15578
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: on_pre_player_driving_changed_state

Post by Rseding91 »

What utility would such an event provide? You can't say "don't do the actual event" in any of the "pre" events so your original reason is out.
If you want to get ahold of me I'm almost always on Discord.
IronCartographer
Filter Inserter
Filter Inserter
Posts: 464
Joined: Tue Jun 28, 2016 2:07 pm
Contact:

Re: on_pre_player_driving_changed_state

Post by IronCartographer »

Okay, after taking a closer look, it's possible to trigger the enter-vehicle action but not unambiguously using player.driving ... Interesting.

That might be enough, but it would be nice to be able to save/restore the particular vehicle involved. Perhaps on_player_driving_state_changed could include the vehicle in question, whether entering or exiting--and player.vehicle could be made RW on top of the current player.driving?
Post Reply

Return to “Modding interface requests”