[1.1.104] LuaGameScript::is_multiplayer() is false on_init

We are aware of them, but they have low priority. We have more important things to do. They go here in order not to take space in the main bug thread list.
Post Reply
User avatar
Gerkiz
Long Handed Inserter
Long Handed Inserter
Posts: 63
Joined: Fri Nov 30, 2018 3:36 pm
Contact:

[1.1.104] LuaGameScript::is_multiplayer() is false on_init

Post by Gerkiz »

Hello,

When starting a new multiplayer save and having the following code below:

Code: Select all

script.on_init(
    function()
        log(game.is_multiplayer())
    end
)
It seems that game.is_multiplayer() when run is always false on event on_init.

I expect for it to return true if the game is multiplayer. Is this correct?

Kind regards,
Gerkiz

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

Re: [1.1.104] LuaGameScript::is_multiplayer() is false on_init

Post by Rseding91 »

Thanks for the report. Because of how that value works and because it can switch between single player and multiplayer it takes 1 or more updates after a save is loaded before the live value is populated.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Minor issues”