From d7d659bd4dddb8c7adea647311c4b62358e10260 Mon Sep 17 00:00:00 2001 From: Tastyfish Date: Thu, 24 Mar 2016 18:04:14 -0400 Subject: [PATCH] Fixes doing the chat box things while sleepy --- code/modules/pda/PDA.dm | 2 +- code/modules/pda/chatroom.dm | 4 +++- code/modules/pda/messenger.dm | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/code/modules/pda/PDA.dm b/code/modules/pda/PDA.dm index dd900fca122..d54c4f47bc7 100755 --- a/code/modules/pda/PDA.dm +++ b/code/modules/pda/PDA.dm @@ -78,7 +78,7 @@ var/global/list/obj/item/device/pda/PDAs = list() return 0 var/mob/M = loc - if(M.stat || M.restrained() || M.paralysis || M.stunned || M.weakened) + if(M.incapacitated()) return 0 if((src in M.contents) || ( istype(loc, /turf) && in_range(src, M) )) return 1 diff --git a/code/modules/pda/chatroom.dm b/code/modules/pda/chatroom.dm index 714f294d235..4bac42a8b3d 100644 --- a/code/modules/pda/chatroom.dm +++ b/code/modules/pda/chatroom.dm @@ -131,6 +131,8 @@ var/list/chatrooms = list(new /datum/chatroom("General Discussion")) usr << "ERROR: Messaging server is not responding." /datum/data/pda/app/chatroom/Topic(href, list/href_list) + if(!pda.can_use()) + return unnotify() switch(href_list["choice"]) @@ -172,7 +174,7 @@ var/list/chatrooms = list(new /datum/chatroom("General Discussion")) return t = sanitize(copytext(t, 1, MAX_MESSAGE_LEN)) t = readd_quotes(t) - if (!t || (!in_range(pda, usr) && pda.loc != usr)) + if (!t || !pda.can_use()) return target.post(src, t) diff --git a/code/modules/pda/messenger.dm b/code/modules/pda/messenger.dm index 6e87f13dc26..7b9be0e31df 100644 --- a/code/modules/pda/messenger.dm +++ b/code/modules/pda/messenger.dm @@ -64,6 +64,8 @@ data["charges"] = pda.cartridge.charges ? pda.cartridge.charges : 0 /datum/data/pda/app/messenger/Topic(href, list/href_list) + if(!pda.can_use()) + return unnotify() switch(href_list["choice"])