Files
Aurora.3/code/modules/tgui_panel/external.dm
harry bd418cfd8d 516: fixes tgui-say, chat flickering and chat crashing on export (#20667)
title

chat crashing on export fixed by
https://github.com/VOREStation/VOREStation/pull/16713, chat flickering
is fixed by https://github.com/VOREStation/VOREStation/pull/16734, tgui
say is https://github.com/Monkestation/Monkestation2.0/pull/2116

also cleaned up some more html uis without skeletons 👻

---------

Co-authored-by: harryob <55142896+harryob@users.noreply.github.com>
2025-03-27 11:17:00 +00:00

35 lines
1.1 KiB
Plaintext

/*!
* Copyright (c) 2020 Aleksej Komarov
* SPDX-License-Identifier: MIT
*/
/client/var/datum/tgui_panel/tgui_panel
/**
* tgui panel / chat troubleshooting verb
*/
/client/verb/fix_tgui_panel()
set name = "Fix chat"
set category = "OOC"
var/action
log_tgui(src, "Started fixing.", context = "verb/fix_tgui_panel")
nuke_chat()
// Failed to fix, using tgalert as fallback
action = input(src, "Did that work?", "", "Yes") in list("Yes", "No, switch to old ui")
if (action == "No, switch to old ui")
winset(src, "legacy_output_selector", "left=output_legacy")
log_tgui(src, "Failed to fix.", context = "verb/fix_tgui_panel")
/client/proc/nuke_chat()
// Catch all solution (kick the whole thing in the pants)
winset(src, "legacy_output_selector", "left=output_legacy")
if(!tgui_panel || !istype(tgui_panel))
log_tgui(src, "tgui_panel datum is missing",
context = "verb/fix_tgui_panel")
tgui_panel = new(src)
tgui_panel.initialize(force = TRUE)
// Force show the panel to see if there are any errors
winset(src, "legacy_output_selector", "left=output_browser")