Files
CHOMPStation2/code/modules/nano/interaction/base.dm
PsiOmegaDelta cad9b59c25 AI restrictions and rejuvenation.
Ensures the AI cannot use Topics() while unpowered.
Ensures the AI is properly rejuvenated by the AI verb, as a functional AI will now never be lying down.
2015-06-08 09:10:33 +02:00

35 lines
975 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)
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(., ..())