Now that we have game.tick_paused=true/false we can use it to pause a game while chat is still active, and that is GREAT.
In my case, I would also like to know how long a pause is/has last, so we can get the statistic of lobby time during a game.
maybe something like game.virtual_ticks_while_paused could be equal to "nil" unless game.tick_paused==true.
we also could use this to limit the pause duration, but since ticks are "paused" it seems impossible, unless we have a button_to_click "pause duration" that will show the number of virtual ticks since pause is active, and will unpause the game if duration exceed a limit (need human/referee action regularly , but better than nothing)
context: Biter battles championships where we had very long pauses that killed the show for streamers/viewers.
thanks !
Mesure PAUSE duration
Re: Mesure PAUSE duration
now i think of it, is there a possibility to add an event: "on_game_paused" that would be triggered every "virtual tick" or "every real-time second" or something ?
Re: Mesure PAUSE duration
There is game.create_profiler(), which displays a duration in milliseconds. But you can't read the value.
Re: Mesure PAUSE duration
https://lua-api.factorio.com/latest/Lua ... cks_playedever_Lord wrote: Thu Jun 02, 2022 10:01 am Now that we have game.tick_paused=true/false we can use it to pause a game while chat is still active, and that is GREAT.
In my case, I would also like to know how long a pause is/has last, so we can get the statistic of lobby time during a game.
viewtopic.php?f=28&t=85623ever_Lord wrote: Thu Jun 02, 2022 10:04 am now i think of it, is there a possibility to add an event: "on_game_paused" that would be triggered every "virtual tick" or "every real-time second" or something ?