Files
ff006aa4a5 verb macro system (pr 1/3) (#96720)
## About The Pull Request

just macro-izes all the usages of verbs in the codebase as a
pre-requisite to my follow up pr that serializes all the verbs arguments
so we can tgui-ify the command bar, so we can then put it on the
onscreen map.

this also basically does the same as #94487 so can easily be integrated
into the verb queueing stuff... but does not actually do any verb
queueing by itself. basically im just trying to be
https://github.com/tgstation/tgstation/labels/Atomic
## Why It's Good For The Game
it doesn't really do anything by itself but it does let us do more stuff

## Changelog
🆑
code: the backend to all verbs in the game has been played with, please
report any issues to github
/🆑

---------

Co-authored-by: harryob <55142896+harryob@users.noreply.github.com>
2026-07-04 02:45:07 -04:00

39 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
*/
GAME_VERB(/client, fix_tgui_panel, "Fix chat", "OOC")
var/action
log_tgui(src, "Started fixing.", context = "verb/fix_tgui_panel")
nuke_chat()
// Failed to fix, using tg_alert as fallback
action = tg_alert(src, "Did that work?", "", "Yes", "No, switch to old ui")
if (action == "No, switch to old ui")
winset(src, OUTPUT_SELECTOR_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, OUTPUT_SELECTOR_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, OUTPUT_SELECTOR_LEGACY_OUTPUT_SELECTOR, "left=output_browser")
GAME_VERB(/client, refresh_tgui, "Refresh TGUI", "OOC")
for(var/window_id in tgui_windows)
var/datum/tgui_window/window = tgui_windows[window_id]
window.reinitialize()