Files
CHOMPStation2/code/modules/nano/interaction/base.dm
PsiOmegaDelta d77bcd7937 The silicon law manager now only requires the host to be conscious.
This should mean that the law manager is available even for carded AIs, even with the wireless interface disabled. Fixes #11139.
2015-09-28 21:23:10 +02:00

35 lines
1018 B
Plaintext

/atom/proc/nano_host()
return src
/atom/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 (restrained() || lying || stat || stunned || weakened) // TODO: Change to incapaciated() on merge
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(., ..())