[0.17] Event inconsistencies
Posted: Fri Apr 12, 2019 2:40 pm
Not sure what is intended, but...
In on_init event, during game creation, game.print does nothing. When on_init is delivered on mod being added to a saved game, game.print works.
There is no way to get info on what is going on in on_load, as there is no game, so no way to log anything.
on_player_joined delivery is different depending on how many players have been added to an mp game:
ex:
Create mp (Host new game) game, save it, load it in mp, get on_player_joined.
Create mp game, save it, load it in single player, NO on_player_joined.
Create mp game, have 2nd player join (LAN), save game, load it in single player, get on_player_joined.
Just send on_player_joined under all circumstances, single player also. Would solve a lot of code being written trying to determine when a player has started a session.
In on_init event, during game creation, game.print does nothing. When on_init is delivered on mod being added to a saved game, game.print works.
There is no way to get info on what is going on in on_load, as there is no game, so no way to log anything.
on_player_joined delivery is different depending on how many players have been added to an mp game:
ex:
Create mp (Host new game) game, save it, load it in mp, get on_player_joined.
Create mp game, save it, load it in single player, NO on_player_joined.
Create mp game, have 2nd player join (LAN), save game, load it in single player, get on_player_joined.
Just send on_player_joined under all circumstances, single player also. Would solve a lot of code being written trying to determine when a player has started a session.