mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-18 03:26:31 +01:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user