Event for game.tick_paused value changes

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
kubiix
Burner Inserter
Burner Inserter
Posts: 9
Joined: Mon Jul 20, 2020 10:54 am
Contact:

Event for game.tick_paused value changes

Post by kubiix »

As title says, is it possible to add event, when game.tick_paused (https://lua-api.factorio.com/latest/Lua ... ick_paused) value is changed?

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5156
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: Event for game.tick_paused value changes

Post by Klonan »

What is the usecase?

kubiix
Burner Inserter
Burner Inserter
Posts: 9
Joined: Mon Jul 20, 2020 10:54 am
Contact:

Re: Event for game.tick_paused value changes

Post by kubiix »

Factory Planner can pause the game with toggle icon in titlebar and I am developong the same to Recipe Book.
So when both windows are opened and in FP pause is toggled, I can update the state of pause icon in RB.

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5156
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: Event for game.tick_paused value changes

Post by Klonan »

kubiix wrote:
Sat Feb 20, 2021 6:01 am
Factory Planner can pause the game with toggle icon in titlebar and I am developong the same to Recipe Book.
So when both windows are opened and in FP pause is toggled, I can update the state of pause icon in RB.
Sorry that doens't really sound like a meaningful usecase to me, and even so it is moreso you should request a custom event from the recipe book mod author

kubiix
Burner Inserter
Burner Inserter
Posts: 9
Joined: Mon Jul 20, 2020 10:54 am
Contact:

Re: Event for game.tick_paused value changes

Post by kubiix »

Actually I have a pending PR with this feature to Recipe Book repo on Github so I dont see reason why I cannot ask for it.
Is there better (Existing) way to know, that some other mod paused the game to reflect it on pause button state? With no changes needed to other mods? It should not be responsibility of mod that paused the game to inform about it other mods, If other mods want to reflect the change.
It is not only FP but also Hellmod and maybe other mods who can pause the game.

Post Reply

Return to “Modding interface requests”