LuaControl.is_technology_gui_open and LuaControl.close_technology_gui
- protocol_1903
- Filter Inserter
- Posts: 326
- Joined: Fri Sep 09, 2022 4:33 pm
- Contact:
LuaControl.is_technology_gui_open and LuaControl.close_technology_gui
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.
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.
Re: LuaControl.is_technology_gui_open and LuaControl.close_technology_gui
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.
- protocol_1903
- Filter Inserter
- Posts: 326
- Joined: Fri Sep 09, 2022 4:33 pm
- Contact:
Re: LuaControl.is_technology_gui_open and LuaControl.close_technology_gui
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.
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.
Re: LuaControl.is_technology_gui_open and LuaControl.close_technology_gui
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.
- protocol_1903
- Filter Inserter
- Posts: 326
- Joined: Fri Sep 09, 2022 4:33 pm
- Contact:
Re: LuaControl.is_technology_gui_open and LuaControl.close_technology_gui
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.
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.