Files
Paradise/code/modules/tgui/modules/_base.dm
AffectedArc07 19df15ad21 TGUI Mirrors + CMA (#14648)
* TGUI Mirrors + CMA

* Forgot this

* Farie tweaks

* Optimisations
2020-10-19 14:16:20 -04:00

22 lines
559 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(datum/_host)
host = _host
/datum/tgui_module/tgui_host()
return host ? host : src
/datum/tgui_module/tgui_close(mob/user)
if(host)
host.tgui_close(user)