LuaControl.is_technology_gui_open and LuaControl.close_technology_gui

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
User avatar
protocol_1903
Filter Inserter
Filter Inserter
Posts: 326
Joined: Fri Sep 09, 2022 4:33 pm
Contact:

LuaControl.is_technology_gui_open and LuaControl.close_technology_gui

Post by protocol_1903 »

As in title. Checks for if the technology gui is open, and a way to close it if so.
If you need to reach me, message me on discord.

I make qol mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903
If you have a mod idea, I can look into it.
User avatar
Osmo
Fast Inserter
Fast Inserter
Posts: 152
Joined: Wed Oct 23, 2024 12:08 pm
Contact:

Re: LuaControl.is_technology_gui_open and LuaControl.close_technology_gui

Post by Osmo »

I think this won't be very useful (aside from tech gui not being part of game state to check if its open) because by default opening technology screen pauses the game and scripts won't be able to run and do anything about it.
User avatar
protocol_1903
Filter Inserter
Filter Inserter
Posts: 326
Joined: Fri Sep 09, 2022 4:33 pm
Contact:

Re: LuaControl.is_technology_gui_open and LuaControl.close_technology_gui

Post by protocol_1903 »

In pYSEx we have a custom starmap (sorry not sorry we do funky things) and part of this is having a way to 'override' the usual map. We do this by moving the player around when they click the starmap button, and we check for that by checking the player's cursor position on the screen when the button is clicked. It's jank as all hell but it works. The problem is that this check succeeds even when the tech GUI is open, and since it's not part of the game state (iirc) we can't work around it.
If you need to reach me, message me on discord.

I make qol mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903
If you have a mod idea, I can look into it.
Bilka
Factorio Staff
Factorio Staff
Posts: 3644
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: LuaControl.is_technology_gui_open and LuaControl.close_technology_gui

Post by Bilka »

Wouldn't it be better for you then if you could stop the player from opening the star map? Or get a reliable event when the player opens it?
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
User avatar
protocol_1903
Filter Inserter
Filter Inserter
Posts: 326
Joined: Fri Sep 09, 2022 4:33 pm
Contact:

Re: LuaControl.is_technology_gui_open and LuaControl.close_technology_gui

Post by protocol_1903 »

That too, I hadn't considered that. I figured it was even less connected to the game state
If you need to reach me, message me on discord.

I make qol mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903
If you have a mod idea, I can look into it.
Post Reply

Return to “Modding interface requests”