LuaSurface::show_global_electric_network_gui or LuaFlowStatistics::show_gui?

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
OhSnap
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sat Sep 06, 2025 6:47 pm
Contact:

LuaSurface::show_global_electric_network_gui or LuaFlowStatistics::show_gui?

Post 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.
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 4195
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

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

Post 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.
OhSnap
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sat Sep 06, 2025 6:47 pm
Contact:

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

Post by OhSnap »

Oh, that works perfectly for my case, thanks!
Didn't realize opened is writable, but makes sense.
Post Reply

Return to “Modding interface requests”