More information on game.set_game_state

Place to report issues and suggest improvements to the API documentation.
Post Reply
User avatar
Stringweasel
Filter Inserter
Filter Inserter
Posts: 321
Joined: Thu Apr 27, 2017 8:22 pm
Contact:

More information on game.set_game_state

Post by Stringweasel »

https://lua-api.factorio.com/latest/cla ... game_state

There is very limited information about this command in the docs, and I thought it might be useful to add some after creating Better Victory Screen. I would propose something like:
game_finished: Triggers the "Game Finished" screen for all forces when set to true. When false no victory screen is shown. Note: "Game Finished" screen will only be shown the first time this is called, unless reset_game_state is called first.
can_continue: If true will enable the "Continue" button in the "Game Finished" screen. Only applicable when game_finished is true.
next_level: The name of the next scenario to load. Only applicable if this is a campaign(?).

victorious_force: Doesn't do anything?
player_won: Doesn't do anything?
Alt-F4 Author | Factorio Modder
Mods: Hall of Fame | Better Victory Screen | Fluidic Power | Biter Power | Space Spidertron | Spidertron Dock | Weasel's Demolition Derby

User avatar
Stringweasel
Filter Inserter
Filter Inserter
Posts: 321
Joined: Thu Apr 27, 2017 8:22 pm
Contact:

Re: More information on game.set_game_state

Post by Stringweasel »

Added note about this function only triggering the "Game Finished" screen the first time it's called, unless...
Alt-F4 Author | Factorio Modder
Mods: Hall of Fame | Better Victory Screen | Fluidic Power | Biter Power | Space Spidertron | Spidertron Dock | Weasel's Demolition Derby

Post Reply

Return to “Documentation Improvement Requests”