holiday and quirk support
This commit is contained in:
@@ -12,6 +12,9 @@
|
||||
var/year_offset = 0
|
||||
var/obj/item/drone_hat //If this is defined, drones without a default hat will spawn with this one during the holiday; check drones_as_items.dm to see this used
|
||||
|
||||
// Special things to be given during this!
|
||||
var/list/mail_goodies
|
||||
|
||||
// This proc gets run before the game starts when the holiday is activated. Do festive shit here.
|
||||
/datum/holiday/proc/celebrate()
|
||||
return
|
||||
@@ -398,6 +401,11 @@
|
||||
end_day = 2
|
||||
end_month = NOVEMBER
|
||||
|
||||
mail_goodies = list(
|
||||
/obj/item/reagent_containers/food/snacks/lollipop = 10,
|
||||
/obj/item/reagent_containers/food/snacks/chocolatebar = 10
|
||||
)
|
||||
|
||||
/datum/holiday/halloween/greet()
|
||||
return "Have a spooky Halloween!"
|
||||
|
||||
|
||||
@@ -304,40 +304,16 @@ GLOBAL_LIST_INIT(cargo_shuttle_leave_behind_typecache, typecacheof(list(
|
||||
//Early return if there's no mail waiting to prevent taking up a slot.
|
||||
if(!SSeconomy.mail_waiting)
|
||||
return
|
||||
|
||||
//spawn crate
|
||||
var/list/empty_turfs = list()
|
||||
for(var/place as anything in shuttle_areas)
|
||||
var/area/shuttle/shuttle_area = place
|
||||
for(var/area/shuttle/shuttle_area as anything in shuttle_areas)
|
||||
for(var/turf/open/floor/shuttle_floor in shuttle_area)
|
||||
if(is_blocked_turf(shuttle_floor))
|
||||
continue
|
||||
empty_turfs += shuttle_floor
|
||||
var/obj/structure/closet/crate/mail/mailcrate = new(pick(empty_turfs))
|
||||
|
||||
//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
|
||||
|
||||
//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)
|
||||
var/obj/item/mail/new_mail
|
||||
if(prob(FULL_CRATE_LETTER_ODDS))
|
||||
new_mail = new /obj/item/mail(mailcrate)
|
||||
else
|
||||
new_mail = new /obj/item/mail/envelope(mailcrate)
|
||||
var/mob/living/carbon/human/mail_to
|
||||
if(mail_recipients.len)
|
||||
mail_to = pick(mail_recipients)
|
||||
new_mail.initialize_for_recipient(mail_to)
|
||||
mail_recipients -= mail_to
|
||||
else
|
||||
new_mail.junk_mail()
|
||||
if(new_mail)
|
||||
SSeconomy.mail_waiting += 1
|
||||
mailcrate.update_icon()
|
||||
return mailcrate
|
||||
new /obj/structure/closet/crate/mail/economy(pick(empty_turfs))
|
||||
|
||||
#undef GOODY_FREE_SHIPPING_MAX
|
||||
#undef CRATE_TAX
|
||||
|
||||
Reference in New Issue
Block a user