Page 1 of 1
LuaControl.is_technology_gui_open and LuaControl.close_technology_gui
Posted: Wed Sep 03, 2025 6:39 am
by protocol_1903
As in title. Checks for if the technology gui is open, and a way to close it if so.
Re: LuaControl.is_technology_gui_open and LuaControl.close_technology_gui
Posted: Wed Sep 03, 2025 6:59 pm
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.
Re: LuaControl.is_technology_gui_open and LuaControl.close_technology_gui
Posted: Thu Sep 04, 2025 2:18 am
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.
Re: LuaControl.is_technology_gui_open and LuaControl.close_technology_gui
Posted: Thu Sep 04, 2025 2:53 am
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?
Re: LuaControl.is_technology_gui_open and LuaControl.close_technology_gui
Posted: Thu Sep 04, 2025 4:39 am
by protocol_1903
That too, I hadn't considered that. I figured it was even less connected to the game state