This commit is contained in:
silicons
2021-04-28 22:24:49 -07:00
parent fefb33454f
commit 80a8467e9e
3 changed files with 20 additions and 1 deletions
+15
View File
@@ -0,0 +1,15 @@
/*!
* Copyright (c) 2021 Arm A. Hammer
* SPDX-License-Identifier: MIT
*/
/**
* tgui state: never_state
*
* Always closes the UI, no matter what. See the ui_state in religious_tool.dm to see an example
*/
GLOBAL_DATUM_INIT(never_state, /datum/ui_state/never_state, new)
/datum/ui_state/never_state/can_use_topic(src_object, mob/user)
return UI_CLOSE
+3 -1
View File
@@ -94,6 +94,8 @@
window.send_message("ping")
var/flush_queue = window.send_asset(get_asset_datum(
/datum/asset/simple/namespaced/fontawesome))
flush_queue |= window.send_asset(get_asset_datum(
/datum/asset/simple/namespaced/tgfont))
for(var/datum/asset/asset in src_object.ui_assets(user))
flush_queue |= window.send_asset(asset)
if (flush_queue)
@@ -241,7 +243,7 @@
* Run an update cycle for this UI. Called internally by SStgui
* every second or so.
*/
/datum/tgui/process(force = FALSE)
/datum/tgui/process(delta_time, force = FALSE)
if(closing)
return
var/datum/host = src_object.ui_host(user)
+2
View File
@@ -47,7 +47,9 @@
get_asset_datum(/datum/asset/simple/tgui_panel),
))
window.send_asset(get_asset_datum(/datum/asset/simple/namespaced/fontawesome))
window.send_asset(get_asset_datum(/datum/asset/simple/namespaced/tgfont))
window.send_asset(get_asset_datum(/datum/asset/spritesheet/chat))
// Other setup
request_telemetry()
addtimer(CALLBACK(src, .proc/on_initialize_timed_out), 5 SECONDS)