mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 02:34:00 +00:00
[MIRROR] Fixes Mail Scanner (#10618)
Co-authored-by: Guti <32563288+TheCaramelion@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
88fcd252a9
commit
35888914a3
@@ -386,29 +386,27 @@
|
|||||||
saved = A
|
saved = A
|
||||||
return
|
return
|
||||||
if(isliving(A))
|
if(isliving(A))
|
||||||
var/mob/living/M = A
|
|
||||||
|
|
||||||
if(!saved)
|
if(!saved)
|
||||||
to_chat(user, span_danger("No logged mail!"))
|
to_chat(user, span_danger("No logged mail!"))
|
||||||
playsound(loc, 'sound/items/mail/maildenied.ogg', 50, TRUE)
|
playsound(loc, 'sound/items/mail/maildenied.ogg', 50, TRUE)
|
||||||
return
|
return
|
||||||
|
|
||||||
var/mob/living/recipient
|
var/datum/mind/recipient
|
||||||
if(saved.recipient_ref)
|
if(saved.recipient_ref)
|
||||||
recipient = saved.recipient_ref.resolve()
|
recipient = saved.recipient_ref.resolve()
|
||||||
|
|
||||||
if(isnull(recipient))
|
if(isnull(recipient) || isnull(recipient.current))
|
||||||
return
|
return
|
||||||
|
|
||||||
if(M.stat == DEAD)
|
if(recipient.current.stat == DEAD)
|
||||||
to_chat(user, span_warning("Consent Verification failed: You can't deliver mail to a corpse!"))
|
to_chat(user, span_warning("Consent Verification failed: You can't deliver mail to a corpse!"))
|
||||||
playsound(loc, 'sound/items/mail/maildenied.ogg', 50, TRUE)
|
playsound(loc, 'sound/items/mail/maildenied.ogg', 50, TRUE)
|
||||||
return
|
return
|
||||||
if(M.real_name != recipient.real_name)
|
if(recipient.current.dna.unique_enzymes != recipient.current.dna.unique_enzymes)
|
||||||
to_chat(user, span_warning("Identity Verification failed: Target is not authorized recipient of this envelope!"))
|
to_chat(user, span_warning("Identity Verification failed: Target is not authorized recipient of this envelope!"))
|
||||||
playsound(loc, 'sound/items/mail/maildenied.ogg', 50, TRUE)
|
playsound(loc, 'sound/items/mail/maildenied.ogg', 50, TRUE)
|
||||||
return
|
return
|
||||||
if(!M.client)
|
if(!recipient.current.client)
|
||||||
to_chat(user, span_warning("Consent Verification failed: The scanner does not accept orders from SSD crewmemmbers!"))
|
to_chat(user, span_warning("Consent Verification failed: The scanner does not accept orders from SSD crewmemmbers!"))
|
||||||
playsound(loc, 'sound/items/mail/maildenied.ogg', 50, TRUE)
|
playsound(loc, 'sound/items/mail/maildenied.ogg', 50, TRUE)
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user