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.
This commit is contained in:
tralezab
2021-04-26 15:50:35 -07:00
committed by GitHub
parent a781d12295
commit bdd4e70673
2 changed files with 7 additions and 4 deletions
+6 -3
View File
@@ -257,9 +257,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)