Refresh TGUI blank window fix (#24392)

* Refresh TGUI blank window fix

* Whoopsie

* Separate things
This commit is contained in:
Aylong
2024-03-06 14:37:50 +00:00
committed by GitHub
parent 6805e816a4
commit 2e61b6c51f
@@ -39,6 +39,19 @@
set name = "Refresh TGUI"
set category = "Special Verbs"
var/choice = alert(usr,
"Use it ONLY if you have trouble with TGUI window.\
That's UI's with EYE on top-left corner.\
Otherwise, you can get a white window that will only close when you restart the game!", "Refresh TGUI", "Refresh", "Cancel")
if(choice != "Refresh")
return
var/refreshed_count = 0
for(var/window_id in tgui_windows)
var/datum/tgui_window/window = tgui_windows[window_id]
if(!window.locked)
window.acquire_lock()
continue
window.reinitialize()
refreshed_count++
to_chat(usr, "<span class='notice'>TGUI windows refreshed - [refreshed_count].<br>If you have blank window - restart the game, or open previous TGUI window.</span>")