mirror of
https://github.com/quotefox/Hyper-Station-13.git
synced 2026-06-03 21:30:45 +01:00
66962a8816
trying to update from TGUI Next to TGUI 3, so we can later upgrade from TGUI 3 to TGUI 4.
22 lines
553 B
Plaintext
22 lines
553 B
Plaintext
/*
|
|
TGUI MODULES
|
|
|
|
This allows for datum-based TGUIs that can be hooked into objects.
|
|
This is useful for things such as the power monitor, which needs to exist on a physical console in the world, but also as a virtual device the AI can use
|
|
|
|
Code is pretty much ripped verbatim from nano modules, but with un-needed stuff removed
|
|
*/
|
|
/datum/tgui_module
|
|
var/name
|
|
var/datum/host
|
|
|
|
/datum/tgui_module/New(var/host)
|
|
src.host = host
|
|
|
|
/datum/tgui_module/ui_host()
|
|
return host ? host : src
|
|
|
|
/datum/tgui_module/ui_close(mob/user)
|
|
if(host)
|
|
host.ui_close(user)
|