diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 049fec7805a..b65cd8dfb2b 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -985,6 +985,10 @@ var/list/ai_verbs_default = list( usr << "You are dead!" return 1 + if(lacks_power()) + usr << "Power systems failure!" + return 1 + if((flags & AI_CHECK_WIRELESS) && src.control_disabled) usr << "Wireless control is disabled!" return 1 diff --git a/code/modules/pda/ai.dm b/code/modules/pda/ai.dm index 135ff0d6431..b1388512623 100644 --- a/code/modules/pda/ai.dm +++ b/code/modules/pda/ai.dm @@ -18,8 +18,7 @@ set name = "Send PDA Message" set src in usr - if(usr.stat == DEAD) - usr << "You can't send PDA messages because you are dead!" + if(!can_use()) return var/datum/data/pda/app/messenger/M = find_program(/datum/data/pda/app/messenger) if(!M) @@ -37,8 +36,7 @@ set name = "Show Message Log" set src in usr - if(usr.stat == DEAD) - usr << "You can't do that because you are dead!" + if(!can_use()) return var/datum/data/pda/app/messenger/M = find_program(/datum/data/pda/app/messenger) if(!M) @@ -57,8 +55,7 @@ set name = "Toggle Sender/Receiver" set src in usr - if(usr.stat == DEAD) - usr << "You can't do that because you are dead!" + if(!can_use()) return var/datum/data/pda/app/messenger/M = find_program(/datum/data/pda/app/messenger) M.toff = !M.toff @@ -70,16 +67,17 @@ set name = "Toggle Ringer" set src in usr - if(usr.stat == DEAD) - usr << "You can't do that because you are dead!" + if(!can_use()) return var/datum/data/pda/app/messenger/M = find_program(/datum/data/pda/app/messenger) M.notify_silent = !M.notify_silent usr << "PDA ringer toggled [(M.notify_silent ? "Off" : "On")]!" /obj/item/device/pda/ai/can_use() - return 1 - + var/mob/living/silicon/ai/AI = usr + if(!istype(AI)) + return 0 + return ..() && !AI.check_unable(AI_CHECK_WIRELESS) /obj/item/device/pda/ai/attack_self(mob/user as mob) if ((honkamt > 0) && (prob(60)))//For clown virus.