Mail fixes, loot table updates and less junk mail (#7059)

This commit is contained in:
Guti
2023-10-12 20:55:43 +01:00
committed by GitHub
parent c262e908b9
commit 2044dd9fda
3 changed files with 36 additions and 35 deletions

View File

@@ -23,11 +23,13 @@ SUBSYSTEM_DEF(mail)
// Collect recipients
var/list/mail_recipients = list()
for(var/mob/living/carbon/human/player_human in player_list)
if(player_human.stat != DEAD && player_human.client && player_human.client.inactivity <= 10 MINUTES)
if(player_human.stat != DEAD && player_human.client && player_human.client.inactivity <= 10 MINUTES && player_human.job != JOB_OUTSIDER) // Only alive, active and NT employeers should be getting mail.
mail_recipients += player_human
// Creates mail for all the mail waiting to arrive, if there's nobody to receive it, it will be junkmail.
// Creates mail for all the mail waiting to arrive, if there's nobody to receive it, it will be a chance of junk mail.
for(var/mail_iterator in 1 to mail_waiting)
if(!mail_recipients.len && prob(40)) // Oh, no mail for our Employees? Well don't just sent them all the junk.
continue
var/obj/item/mail/new_mail
if(prob(70))
new_mail = new /obj/item/mail(mailcrate)
@@ -41,5 +43,4 @@ SUBSYSTEM_DEF(mail)
else
new_mail.junk_mail()
mail_waiting = 0
mailcrate.update_icon()
return mailcrate