mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-23 08:31:57 +00:00
This UI is going to be more integrated with BYOND host objects. It's update principal is very different from nanoui's. It is based around state that is being synchronized with server and client (browser). Such synchronization has it's problems, like it can't handle rapid changes, what could cause client and server to become out of sync and client state to be discard.
38 lines
1021 B
Plaintext
38 lines
1021 B
Plaintext
/datum/proc/ui_host()
|
|
return src
|
|
|
|
/datum/proc/nano_container()
|
|
return src
|
|
|
|
/datum/proc/CanUseTopic(var/mob/user, var/datum/topic_state/state = default_state)
|
|
var/datum/src_object = ui_host()
|
|
return state.can_use_topic(src_object, user)
|
|
|
|
/datum/topic_state/proc/href_list(var/mob/user)
|
|
return list()
|
|
|
|
/datum/topic_state/proc/can_use_topic(var/src_object, var/mob/user)
|
|
return STATUS_CLOSE
|
|
|
|
/mob/proc/shared_nano_interaction()
|
|
if (src.stat || !client)
|
|
return STATUS_CLOSE // no updates, close the interface
|
|
else if (incapacitated())
|
|
return STATUS_UPDATE // update only (orange visibility)
|
|
return STATUS_INTERACTIVE
|
|
|
|
/mob/living/silicon/ai/shared_nano_interaction()
|
|
if(!has_power())
|
|
return STATUS_CLOSE
|
|
if (check_unable(1, 0))
|
|
return STATUS_CLOSE
|
|
return ..()
|
|
|
|
/mob/living/silicon/robot/shared_nano_interaction()
|
|
. = STATUS_INTERACTIVE
|
|
if(!cell || (cell && cell.charge <= 0))
|
|
return STATUS_CLOSE
|
|
if(lockcharge)
|
|
. = STATUS_DISABLED
|
|
return min(., ..())
|