Files
Aurora.3/code/modules/tgui_panel/external.dm
Fluffy 5e1332d60f OpenDream linting (#16468)
* I wanna set the universe on fire

* dfsaaf

* setup

* dir issue?

* dsf

* Perhaps the script

* saf

* cry

* pain

* sdfas

* Try reintroduction of tag-matcher

* Failed

* Tries to suppress dotnet compile warnings

* Like this maybe?

* woopsie

* Damn pathings

* Hate

* Pragmas

* unlint?

* Maybe?

* GDI

* Redundant ifdef removed and changelog

* Did I forgot the tag matcher, or it was still broken?

* Yea no that script is still broken

* Removed tag-matcher as requested

* *sigh*

* test

* bro what?

* hope

* just fixing the input

* Let's see if we catch it...
2023-06-26 17:05:38 +02:00

38 lines
1.2 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, "output", "on-show=&is-disabled=0&is-visible=1")
winset(src, "browseroutput", "is-disabled=1;is-visible=0")
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, "output", "on-show=&is-disabled=0&is-visible=1")
winset(src, "browseroutput", "is-disabled=1;is-visible=0")
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, "output", "is-disabled=1&is-visible=0")
winset(src, "browseroutput", "is-disabled=0;is-visible=1")