mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Mail Scanner (#8753)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/datum/alt_title/mailman
|
||||
title = "Mailman"
|
||||
title_blurb = "A Mailman is tasked with delivering packages or mail to whoever it might adress."
|
||||
title = "Mail Carrier"
|
||||
title_blurb = "A Mail Carrier is tasked with delivering packages or mail to whoever it might adress."
|
||||
title_outfit = /decl/hierarchy/outfit/job/cargo/cargo_tech/mailman
|
||||
|
||||
@@ -42,7 +42,10 @@
|
||||
var/stamp_offset_x = 0
|
||||
// Physical offset of stamps on the object. Y direction.
|
||||
var/stamp_offset_y = 2
|
||||
// If the mail is actively being opened right now
|
||||
var/opening = FALSE
|
||||
// If the mail has been scanned with a mail scanner
|
||||
var/scanned
|
||||
|
||||
/obj/item/mail/container_resist(mob/living/M)
|
||||
if(istype(M, /mob/living/voice)) return
|
||||
@@ -337,6 +340,68 @@
|
||||
/obj/item/contraband
|
||||
)
|
||||
|
||||
// Mail Scanner
|
||||
/obj/item/mail_scanner
|
||||
name = "mail scanner"
|
||||
desc = "Sponsored by the Intergalactic Mail Service, this device logs mail deliveries in exchance for financial compensation."
|
||||
force = 0
|
||||
throwforce = 0
|
||||
icon = 'modular_chomp/icons/obj/bureaucracy.dmi'
|
||||
icon_state = "mail_scanner"
|
||||
slot_flags = SLOT_BELT
|
||||
w_class = ITEMSIZE_SMALL
|
||||
var/cargo_points = 5
|
||||
var/obj/item/mail/saved
|
||||
|
||||
/obj/item/mail_scanner/examine(mob/user)
|
||||
. = ..()
|
||||
. += SPAN_NOTICE("Scan a letter to log it into the active database, then scan the person you wish to hand the letter to. Correctly scanning the recipient of the letter logged into the active database will add points to the supply budget.")
|
||||
|
||||
/obj/item/mail_scanner/attack()
|
||||
return
|
||||
|
||||
/obj/item/mail_scanner/afterattack(atom/A, mob/user)
|
||||
if(istype(A, /obj/item/mail))
|
||||
var/obj/item/mail/saved_mail = A
|
||||
if(saved_mail.scanned)
|
||||
user.balloon_alert(user, "This letter has already been scanned!")
|
||||
playsound(loc, 'modular_chomp/sound/items/mail/maildenied.ogg', 50, TRUE)
|
||||
return
|
||||
user.balloon_alert(user, "Mail added to database")
|
||||
playsound(loc, 'modular_chomp/sound/items/mail/mailscanned.ogg', 50, TRUE)
|
||||
saved = A
|
||||
return
|
||||
if(isliving(A))
|
||||
var/mob/living/M = A
|
||||
|
||||
if(!saved)
|
||||
user.balloon_alert(user, "No logged mail!")
|
||||
playsound(loc, 'modular_chomp/sound/items/mail/maildenied.ogg', 50, TRUE)
|
||||
return
|
||||
|
||||
var/mob/living/recipient = saved.recipient
|
||||
|
||||
if(M.stat == DEAD)
|
||||
to_chat(user, SPAN_WARNING("Consent Verification failed: You can't deliver mail to a corpse!"))
|
||||
playsound(loc, 'modular_chomp/sound/items/mail/maildenied.ogg', 50, TRUE)
|
||||
return
|
||||
if(M.real_name != recipient.real_name)
|
||||
to_chat(user, SPAN_WARNING("Identity Verification failed: Target is not authorized recipient of this envelope!"))
|
||||
playsound(loc, 'modular_chomp/sound/items/mail/maildenied.ogg', 50, TRUE)
|
||||
return
|
||||
if(!M.client)
|
||||
to_chat(user, SPAN_WARNING("Consent Verification failed: The scanner does not accept orders from SSD crewmemmbers!"))
|
||||
playsound(loc, 'modular_chomp/sound/items/mail/maildenied.ogg', 50, TRUE)
|
||||
return
|
||||
|
||||
saved.scanned = TRUE
|
||||
saved = null
|
||||
|
||||
cargo_points = rand(5, 10)
|
||||
to_chat(user, SPAN_NOTICE("Succesful delivery acknowledged! [cargo_points] points added to Supply."))
|
||||
playsound(loc, 'modular_chomp/sound/items/mail/mailapproved.ogg', 50, TRUE)
|
||||
SSsupply.points += cargo_points
|
||||
|
||||
// JUNK MAIL STUFF
|
||||
|
||||
/obj/item/mail/junkmail/Initialize()
|
||||
|
||||
@@ -18806,6 +18806,9 @@
|
||||
name = "mailman's locker";
|
||||
starts_with = list(/obj/item/clothing/under/rank/mailman,/obj/item/clothing/head/mailman,/obj/item/clothing/shoes/black,/obj/item/device/radio/headset/headset_cargo,/obj/item/device/radio/headset/headset_cargo/alt,/obj/item/weapon/storage/bag/mail,/obj/item/device/destTagger)
|
||||
},
|
||||
/obj/item/mail_scanner,
|
||||
/obj/item/mail_scanner,
|
||||
/obj/item/mail_scanner,
|
||||
/turf/simulated/floor/tiled,
|
||||
/area/quartermaster/delivery)
|
||||
"hIE" = (
|
||||
@@ -32255,6 +32258,10 @@
|
||||
pixel_y = -5
|
||||
},
|
||||
/obj/item/mail/blank,
|
||||
/obj/item/mail_scanner{
|
||||
pixel_x = -5;
|
||||
pixel_y = 5
|
||||
},
|
||||
/turf/simulated/floor/tiled,
|
||||
/area/quartermaster/delivery)
|
||||
"vbP" = (
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
name = OUTFIT_JOB_NAME("Mailman")
|
||||
uniform = /obj/item/clothing/under/rank/mailman2
|
||||
head = /obj/item/clothing/head/mailman2
|
||||
belt = /obj/item/weapon/storage/bag/mail
|
||||
pda_slot = slot_l_store
|
||||
backpack_contents = list(/obj/item/weapon/storage/bag/mail = 1, /obj/item/mail_scanner = 1)
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 3.3 KiB |
BIN
modular_chomp/sound/items/mail/mailapproved.ogg
Normal file
BIN
modular_chomp/sound/items/mail/mailapproved.ogg
Normal file
Binary file not shown.
BIN
modular_chomp/sound/items/mail/maildenied.ogg
Normal file
BIN
modular_chomp/sound/items/mail/maildenied.ogg
Normal file
Binary file not shown.
BIN
modular_chomp/sound/items/mail/mailscanned.ogg
Normal file
BIN
modular_chomp/sound/items/mail/mailscanned.ogg
Normal file
Binary file not shown.
Reference in New Issue
Block a user