You've Got Mail! Adds Mail system (#22269)

* heres the mail it never fails

Adds envelopes and its functions.

* It makes me want to wag my tail

Adds new envelope sprites courtesy of McRamon, makes mail bags and envelopess able to be carried by cargo clothing.

* when it comes i want to whail

Makes Wizard and Nukie equip change to off station role. Adds mail crates and functionality/logging for randomly choosing recipients of mail.

* MAAAAAAAAAAAAAAIIIL!!!!

Adds functionality for the mail scanner alongside sounds. Begins the process of making mail arrive on the shuttle.

* MAIL

* THE MAILMAN IS HERE

* MAIL IS REAL

* Give me an M, give me an A, give me an I, give me an L. What does that spell? MAIL.

Finalises pre-review mail features, adding the mail scanner to cargo tech loadout/autolathe.

* Update code/game/gamemodes/nuclear/nuclear.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/modules/shuttle/supply.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/game/jobs/job/support.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/game/objects/items/weapons/storage/bags.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/game/objects/items/weapons/storage/bags.dm

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>

* Update code/game/objects/structures/crates_lockers/crates.dm

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>

* Update code/controllers/subsystem/SSeconomy.dm

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>

* check out what you got now

Removes unused sprite bloat.

* Update code/game/objects/mail.dm

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>

* Update code/game/objects/mail.dm

* Update code/game/objects/mail.dm

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>

* Update code/game/objects/mail.dm

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>

* Update code/game/objects/mail.dm

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>

* Update code/game/objects/mail.dm

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>

* First few Contra reviews

* Second batch

* Cl doesn't fail anymore

* Even more fucking reviews

* Doesn't quite work yet but we're almost there

* WHEN DOES IT EEEEEND

* I have no energy to make a blues clues reference

More commits to respond to reviews

* God I miss Steve

Adds hand sprites to mail scanners

* Woooo Mail works again

* Science envelopes

* Update code/game/objects/mail.dm

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>

* my god it worked

II hate it

* Bread and Circuses

splits up service envelopes into two categories, addresses other reviews.

* Lewc review - needs testing

* Almost there

Changing lists and more.

* Last fix

* IT IS ALL WORKING NOW

* Mail. Is. Done.
Final pass.

* Update code/controllers/subsystem/SSeconomy.dm

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>

* Update code/game/objects/mail.dm

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>

* The fix

* Just this one too

* Lewc review

* mail?

yeah

* Begone, ye powersink

* Sirryan review

* Update code/__DEFINES/economy_defines.dm

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>

* Update code/game/objects/mail.dm

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>

* Update code/game/objects/mail.dm

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>

* Update code/controllers/subsystem/SSeconomy.dm

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>

* Update code/game/objects/mail.dm

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>

* Update code/game/objects/mail.dm

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>

* Wjpp[s

* Removes useless comment

* We ball

---------

Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>
Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
This commit is contained in:
Marm
2023-09-20 00:30:03 +01:00
committed by GitHub
parent e09be2b54e
commit ecfaa26cc2
26 changed files with 380 additions and 20 deletions
+8
View File
@@ -92,6 +92,8 @@ SUBSYSTEM_DEF(economy)
var/next_paycheck_delay = 0
/// total paydays this round
var/payday_count = 0
/// Time until the next mail shipment
var/next_mail_delay = 0
var/global_paycheck_bonus = 0
var/global_paycheck_deduction = 0
@@ -132,6 +134,7 @@ SUBSYSTEM_DEF(economy)
centcom_message = "<center>---[station_time_timestamp()]---</center><br>Remember to stamp and send back the supply manifests.<hr>"
next_paycheck_delay = 30 MINUTES + world.time
next_mail_delay = 15 MINUTES + world.time
/datum/controller/subsystem/economy/fire()
if(next_paycheck_delay <= world.time)
@@ -141,6 +144,11 @@ SUBSYSTEM_DEF(economy)
next_data_check = 10 MINUTES + world.time
record_economy_data()
process_job_tasks()
if(next_mail_delay <= world.time)
if(!is_admin_level(SSshuttle.supply.z) || SSshuttle.supply.areaInstance.moving)
return
next_mail_delay = 15 MINUTES + world.time
SSshuttle.mail_delivery()
/datum/controller/subsystem/economy/proc/record_economy_data()
economy_data["totalcash"] += total_space_cash
+21
View File
@@ -24,6 +24,8 @@ SUBSYSTEM_DEF(shuttle)
//supply shuttle stuff
var/obj/docking_port/mobile/supply/supply
/// Supply shuttle turfs to make mail be put down faster
var/static/list/supply_shuttle_turfs = list()
var/list/hidden_shuttle_turfs = list() //all turfs hidden from navigation computers associated with a list containing the image hiding them and the type of the turf they are pretending to be
var/list/hidden_shuttle_turf_images = list() //only the images from the above list
@@ -284,4 +286,23 @@ SUBSYSTEM_DEF(shuttle)
QDEL_LIST_CONTENTS(remove_images)
/datum/controller/subsystem/shuttle/proc/mail_delivery()
for(var/obj/machinery/requests_console/console in GLOB.allRequestConsoles)
if(console.department != "Cargo Bay")
continue
console.createMessage("Messaging and Intergalactic Letters", "New Mail Crates ready to be ordered!", "A new mail crate is able to be shipped alongside your next orders!", RQ_NORMALPRIORITY)
if(!length(supply_shuttle_turfs))
for(var/turf/simulated/T in supply.areaInstance)
if(T.density)
continue
for(var/obj/structure/structure in T.contents)
if(structure.density)
continue
supply_shuttle_turfs += T
if(!length(supply_shuttle_turfs)) // In case some nutjob walled the supply shuttle 10 minutes into the round
return
var/turf/spawn_location = pick(supply_shuttle_turfs)
new /obj/structure/closet/crate/mail(spawn_location)
#undef CALL_SHUTTLE_REASON_LENGTH