mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-03-16 09:13:40 +00:00
* CI now bans files with the same name * Part 1 * Warriorstar python tweaks * Part Deux * Fix unticked * fix
26 lines
595 B
Plaintext
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)
|