[MIRROR] Fixes incorrect unwrapping message, and now mail doesn't get sent to... BAD recipients. (#5232)

* mail fixes 😎 (#58716)

now mail doesn't get sent to... BAD recipients. (Antags arm, just say antags)
fixes incorrect unwrapping message (bad usage of a visible message)
mail recipients wasn't shuffling either. I'm fairly certain this was leading to some people always getting mail and some never getting it.

* Fixes incorrect unwrapping message, and now mail doesn't get sent to... BAD recipients.

Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com>
This commit is contained in:
SkyratBot
2021-04-27 00:01:18 +01:00
committed by GitHub
co-authored by tralezab
parent eaf3dd34fa
commit 6eb42f889d
2 changed files with 7 additions and 4 deletions
+6 -3
View File
@@ -258,9 +258,12 @@ GLOBAL_LIST_INIT(blacklisted_cargo_types, typecacheof(list(
//collect recipients
var/list/mail_recipients = list()
for(var/mob/living/carbon/human/player_human in GLOB.player_list)
if(player_human.stat != DEAD)
mail_recipients += player_human
for(var/mob/living/carbon/human/player_human in shuffle(GLOB.player_list))
if(player_human.stat == DEAD)
continue
if(!SSjob.GetJob(player_human.mind.assigned_role) || (player_human.mind.assigned_role in GLOB.nonhuman_positions))
continue //this check stops wizards and nuke ops from getting mail, which is hilarious but should definitely not happen
mail_recipients += player_human
//Creates mail for all the mail waiting to arrive, if there's nobody to recieve it it's just junkmail.
for(var/mail_iterator in 1 to SSeconomy.mail_waiting)