From 52c6814e428e59eb48e553ed03a3e7babd4ce50a Mon Sep 17 00:00:00 2001
From: ParaGitV <109384402+ParaGitV@users.noreply.github.com>
Date: Sat, 23 Jul 2022 07:26:49 -0700
Subject: [PATCH] Expand Admin Investigate Logs for Cargo (#18491)
* Adds more investigate logging to cargo
Investigate verb for cargo lacks any logging for people who deny requests.
* Further expands cargo investigate logging
Adds logging for initial orders and cleans up the log format
---
code/modules/shuttle/supply.dm | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/code/modules/shuttle/supply.dm b/code/modules/shuttle/supply.dm
index e3f74488933..a1ee93144c1 100644
--- a/code/modules/shuttle/supply.dm
+++ b/code/modules/shuttle/supply.dm
@@ -505,7 +505,7 @@
to_chat(usr, "For safety reasons the automated supply shuttle cannot transport live organisms, classified nuclear weaponry or homing beacons.")
else if(SSshuttle.supply.getDockedId() == "supply_home")
SSshuttle.toggleShuttle("supply", "supply_home", "supply_away", 1)
- investigate_log("[key_name(usr)] has sent the supply shuttle away. Remaining points: [SSshuttle.points]. Shuttle contents: [SSshuttle.sold_atoms]", "cargo")
+ investigate_log("| [key_name(usr)] has sent the supply shuttle away. Remaining points: [SSshuttle.points]. Shuttle contents: [SSshuttle.sold_atoms]", "cargo")
else if(!SSshuttle.supply.request(SSshuttle.getDock("supply_home")))
post_signal("supply")
if(LAZYLEN(SSshuttle.shoppinglist) && prob(10))
@@ -556,6 +556,7 @@
return
if(i == 1)
O.generateRequisition(loc)
+ investigate_log("| [key_name(usr)] has placed an order for [amount] [O.object.name] with reason: '[reason]'", "cargo")
if("approve")
// Public consoles cant approve stuff
@@ -576,7 +577,7 @@
SSshuttle.requestlist.Cut(i,i+1)
SSshuttle.points -= P.cost
SSshuttle.shoppinglist += O
- investigate_log("[key_name(usr)] has authorized an order for [P.name]. Remaining points: [SSshuttle.points].", "cargo")
+ investigate_log("| [key_name(usr)] has authorized an order for [P.name]. Remaining points: [SSshuttle.points].", "cargo")
SSblackbox.record_feedback("tally", "cargo_shuttle_order", 1, P.name)
else
to_chat(usr, "There are insufficient supply points for this request.")
@@ -596,6 +597,7 @@
// If we arent public, were cargo access. CANCELLATIONS FOR EVERYONE
else
SSshuttle.requestlist.Cut(i,i+1)
+ investigate_log("| [key_name(usr)] has denied an order for [SO.object.name]. Remaining points: [SSshuttle.points].", "cargo")
break
// Popup to show CC message logs. Its easier this way to avoid box-spam in TGUI