mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-16 01:23:41 +01:00
Improves Fax Logging (#26506)
* Adds logging for faxes * Reverts a testing change
This commit is contained in:
@@ -339,6 +339,30 @@ GLOBAL_LIST_EMPTY(fax_blacklist)
|
||||
|
||||
use_power(active_power_consumption)
|
||||
|
||||
/obj/machinery/photocopier/faxmachine/proc/log_fax(mob/sender, destination)
|
||||
// Logging for sending photos
|
||||
if(istype(copyitem, /obj/item/photo))
|
||||
log_admin("[key_name(sender)] has sent a photo by fax to [destination]")
|
||||
return
|
||||
|
||||
// Logging for single paper message
|
||||
if(istype(copyitem, /obj/item/paper))
|
||||
var/obj/item/paper/fax_message = copyitem
|
||||
log_admin("[key_name(sender)] has sent a message by fax to [destination] reading [fax_message.info]")
|
||||
return
|
||||
|
||||
// Logging for paper bundle messages
|
||||
if(istype(copyitem, /obj/item/paper_bundle))
|
||||
var/obj/item/paper_bundle/paper_bundle = copyitem
|
||||
// Incremented by one for each paper in the bundle
|
||||
var/page_count = 1
|
||||
|
||||
// Loop through the contents of the paper bundle and grab the message from each page
|
||||
for(var/obj/item/paper/page in paper_bundle.contents)
|
||||
log_admin("[key_name(sender)] has sent a bundled message by fax to [destination] - Page [page_count]: [page.info]")
|
||||
page_count ++
|
||||
return
|
||||
|
||||
/obj/machinery/photocopier/faxmachine/proc/send_admin_fax(mob/sender, destination)
|
||||
use_power(active_power_consumption)
|
||||
|
||||
@@ -365,6 +389,7 @@ GLOBAL_LIST_EMPTY(fax_blacklist)
|
||||
if(F.department == destination)
|
||||
F.receivefax(copyitem)
|
||||
visible_message("[src] beeps, \"Message transmitted successfully.\"")
|
||||
log_fax(sender, destination)
|
||||
|
||||
/obj/machinery/photocopier/faxmachine/proc/cooldown_seconds()
|
||||
if(sendcooldown < world.time)
|
||||
|
||||
Reference in New Issue
Block a user