mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-01-03 14:03:25 +00:00
This state has two checks: A preliminary check of the remote target, ensuring it's powered, etc. If the remote target is fully disabled, it closes the window and conducts no further checks. It then makes a full check, ensuring that the mob is capable, within range of the source remoting to the remote target, etc. Unlike most other static interaction states, whoever initializes the remote state is responsible for deleting it properly. Conflicts: polaris.dme
38 lines
985 B
Plaintext
38 lines
985 B
Plaintext
/datum/proc/nano_host()
|
|
return src
|
|
|
|
/datum/proc/nano_container()
|
|
return src
|
|
|
|
/datum/proc/CanUseTopic(var/mob/user, var/datum/topic_state/state)
|
|
var/src_object = nano_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(lacks_power())
|
|
return STATUS_CLOSE
|
|
if (check_unable(1, 0))
|
|
return STATUS_CLOSE
|
|
return ..()
|
|
|
|
/mob/living/silicon/robot/shared_nano_interaction()
|
|
. = STATUS_INTERACTIVE
|
|
if(cell.charge <= 0)
|
|
return STATUS_CLOSE
|
|
if(lockcharge)
|
|
. = STATUS_DISABLED
|
|
return min(., ..())
|