[0.13.13] on_player_left_game and no character

Bugs that are actually features.
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1525
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

[0.13.13] on_player_left_game and no character

Post by binbinhfr »

Hi,

it seems that in event on_player_left_game, the player.character already does not exist, which is not very handy if we want to modify a few things before lefting game.

For example, I cannot use player.character_running_speed_modifier = 0 in my ProgressiveRunning mod, in order to left the player in a good speed in case of uninstallation of my mod. So that when he will reconnect, he will have the good character_running_speed_modifier and now a slow one.
My mods on the Factorio Mod Portal :geek:
Oxyd
Former Staff
Former Staff
Posts: 1428
Joined: Thu May 07, 2015 8:42 am
Contact:

Re: [0.13.13] on_player_left_game and no character

Post by Oxyd »

As documented, the event is raised after the player has left the game, which means the player is no longer connected, which means you can't access its character. I.e. everything's behaving precisely as it should.

Not a bug.
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1525
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: [0.13.13] on_player_left_game and no character

Post by binbinhfr »

Oh yes, sorry, I did not read carefully.
So I am damned to do what I wanted ! ;-)
My mods on the Factorio Mod Portal :geek:
Post Reply

Return to “Not a bug”