Request: Event that fires when a player changes one of their displayed quickbar rows

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
KingIonTrueLove
Inserter
Inserter
Posts: 23
Joined: Sun Jun 04, 2017 1:38 am
Contact:

Request: Event that fires when a player changes one of their displayed quickbar rows

Post by KingIonTrueLove »

For the mod I'm working on, there is a feature I want to add that would require knowledge of what quickbars the player currently has displayed. If there was an event that fired each time the displayed quickbar rows changed, it would be quite useful.

So for instance, if the player has rows 7 and 3 displayed, and it changes to having rows 7 and 9 being displayed, the event would fire.
Also hopefully it could fire if the player changes from displaying 2 rows to 3 rows for instance.

I realize I could also do this just by looping through player.get_active_quick_bar_page(index) for every index, for every player, every tick or so, but I worry about performance issues with looping through all of that constantly, as even a single get_active_quick_bar_page() call seems to take a significant amount of time to run.

Of course, for all I know, having such an event existing could be a large performance hit to the game itself, so if this request is impossible, I understand.

Post Reply

Return to “Modding interface requests”