[0.17] Event inconsistencies

Bugs that are actually features.
User avatar
_Attila_
Long Handed Inserter
Long Handed Inserter
Posts: 75
Joined: Sun Jan 06, 2019 2:46 pm
Contact:

[0.17] Event inconsistencies

Post by _Attila_ »

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.
Attila's QuickBar Mod - Auto-links hand crafted item to first free quickbar slot if not already linked.
Attila's Signals Mod - Alternate signals to use in same circuit as standard signals.
Attila's Zoom Mod - Modifies zoom functionality.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14678
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.17] Event inconsistencies

Post by Rseding91 »

Thanks for the report however none of those are inconsistencies. You can't print to a player that doesn't yet exist so when you do "game.print()" before the player has even joined the game it doesn't do anything. You can see the API documentation for game.print() says it prints to all of the players in the game. https://lua-api.factorio.com/latest/Lua ... ript.print
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Not a bug”