Files
Paradise/code/modules/tgui/modules/module_base.dm
AffectedArc07 b34e8fa301 [READY] CI now bans files with the same name (#20195)
* CI now bans files with the same name

* Part 1

* Warriorstar python tweaks

* Part Deux

* Fix unticked

* fix
2023-02-04 16:33:41 -06:00

26 lines
595 B
Plaintext

/*
UI MODULES
This allows for datum-based UIs 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/ui_module
var/name
var/datum/host
/datum/ui_module/New(datum/_host)
host = _host
/datum/ui_module/Destroy()
host = null
return ..()
/datum/ui_module/ui_host()
return host ? host : src
/datum/ui_module/ui_close(mob/user)
if(host)
host.ui_close(user)