You can no longer respond to PDA messages if you are incapacitated or too far away from your device (#16257)

* Update ntpda_msg.dm

* Update ntpda_msg.dm
This commit is contained in:
Byemoh
2022-10-28 06:08:01 -05:00
committed by GitHub
parent d253096f2a
commit 2a9f4dcb71

View File

@@ -61,6 +61,10 @@ GLOBAL_LIST_EMPTY(NTPDAMessages)
qdel(src)
/datum/computer_file/program/pdamessager/proc/send_message(message, datum/computer_file/program/pdamessager/recipient, mob/user)
if(user.shared_ui_interaction(computer) < UI_INTERACTIVE) //no replying if you're incapacitated
return
if(user.physical_can_use_topic(computer) < UI_INTERACTIVE) //no replying if you're too far away
return
// FOR SOME REASON [computer] ISN'T SET ON INIT AND IS SET WHEN YOU START IT UP THE FIRST TIME
var/obj/item/modular_computer/comp
if(computer) // I HAVE TO DO THIS OR THEY WON'T RECEIVE MESSAGES UNTIL THEY OPEN THE PDA ONCE (BAD)
@@ -218,6 +222,10 @@ GLOBAL_LIST_EMPTY(NTPDAMessages)
/datum/computer_file/program/pdamessager/Topic(href, list/href_list)
. = ..()
if(usr.shared_ui_interaction(computer) < UI_INTERACTIVE) //no replying if you're incapacitated
return
if(usr.physical_can_use_topic(computer) < UI_INTERACTIVE) //no replying if you're too far away
return
var/msg = input("Send a message?") as null|text
msg = sanitizeinput(msg, computer)
if(msg)