Fixes doing the chat box things while sleepy

This commit is contained in:
Tastyfish
2016-03-24 18:04:14 -04:00
parent 3a9588b1e6
commit d7d659bd4d
3 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -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
+3 -1
View File
@@ -131,6 +131,8 @@ var/list/chatrooms = list(new /datum/chatroom("General Discussion"))
usr << "<span class='notice'>ERROR: Messaging server is not responding.</span>"
/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)
+2
View File
@@ -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"])