Page 1 of 1

LuaSurface::show_global_electric_network_gui or LuaFlowStatistics::show_gui?

Posted: Sat Sep 06, 2025 7:09 pm
by OhSnap
Hey Forum People,
Working on a Planet mod with a global electric network, but it seems there is no way to show the network stats?
LuaFlowStatistics API page mentions GUI a lot, but I can't find a way that actually shows them.

Re: LuaSurface::show_global_electric_network_gui or LuaFlowStatistics::show_gui?

Posted: Sat Sep 06, 2025 7:19 pm
by boskid
There is a partial api support for this:

Code: Select all

/c game.player.opened = defines.gui_type.global_electric_network
but it only works for opening global electric network of the surface the player is currently looking at. There may be no api to open global electric network of arbitrarily specified surface.

Re: LuaSurface::show_global_electric_network_gui or LuaFlowStatistics::show_gui?

Posted: Sun Sep 07, 2025 7:35 am
by OhSnap
Oh, that works perfectly for my case, thanks!
Didn't realize opened is writable, but makes sense.