From e5a08230eea90232e68781d4aca40169ec5203d5 Mon Sep 17 00:00:00 2001
From: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>
Date: Wed, 11 Jun 2025 13:03:17 -0400
Subject: [PATCH] Inspector - IAA Stare, Alt-Title, and a Station Report
(#29487)
* Inspector alt title and gaze
* Clipboard
* Apply suggestions from code review
Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>
* Reduces duplicate code
---------
Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>
Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
---
code/datums/spells/inspectors_gaze.dm | 23 +++++++++++++++++++
code/game/gamemodes/scoreboard.dm | 1 +
code/game/jobs/job/job.dm | 4 ++++
code/game/jobs/job/supervisor.dm | 18 ++++++++++++++-
code/game/machinery/tcomms/nttc.dm | 1 +
.../closets/secure/security_lockers.dm | 1 +
code/modules/mob/mob.dm | 12 ++++++++++
code/modules/paperwork/clipboard.dm | 13 +++++++++++
paradise.dme | 1 +
9 files changed, 73 insertions(+), 1 deletion(-)
create mode 100644 code/datums/spells/inspectors_gaze.dm
diff --git a/code/datums/spells/inspectors_gaze.dm b/code/datums/spells/inspectors_gaze.dm
new file mode 100644
index 00000000000..6e52ea3936b
--- /dev/null
+++ b/code/datums/spells/inspectors_gaze.dm
@@ -0,0 +1,23 @@
+/datum/spell/inspectors_gaze
+ name = "Inspector's Gaze"
+ desc = "Let the crew know that they're being watched and inspected."
+ base_cooldown = 6 SECONDS
+ clothes_req = FALSE
+ selection_activated_message = "You look for a crewmember to inspect! Left-click to gaze at a target!"
+ selection_deactivated_message = "You relinquish your gaze... for now."
+ action_icon_state = "genetic_view"
+
+/datum/spell/inspectors_gaze/create_new_targeting()
+ var/datum/spell_targeting/clicked_atom/external/C = new()
+ C.range = 10
+ return C
+
+/datum/spell/inspectors_gaze/cast(list/targets, mob/living/user = usr)
+ var/mob/target = targets[1] // There is only ever one target for your gaze
+ if(!istype(target))
+ to_chat(user, "You don't think [target] can commit SOP violations.")
+ return FALSE
+ to_chat(target, "You feel someone staring at you...")
+ to_chat(user, "You gaze at [target], intent to find SOP violations.")
+
+ return TRUE
diff --git a/code/game/gamemodes/scoreboard.dm b/code/game/gamemodes/scoreboard.dm
index a38ba8eeffc..426c1551c89 100644
--- a/code/game/gamemodes/scoreboard.dm
+++ b/code/game/gamemodes/scoreboard.dm
@@ -313,6 +313,7 @@ GLOBAL_VAR(scoreboard) // Variable to save the scoreboard string once it's been
if(E.client)
to_chat(E, "The crew's final score is:")
to_chat(E, "[crewscore]")
+ to_chat(E, "View Station Report")
if(!E.get_preference(PREFTOGGLE_DISABLE_SCOREBOARD))
E << browse(GLOB.scoreboard, "window=roundstats;size=500x600")
diff --git a/code/game/jobs/job/job.dm b/code/game/jobs/job/job.dm
index 0d51a7513bc..68f6a822cf9 100644
--- a/code/game/jobs/job/job.dm
+++ b/code/game/jobs/job/job.dm
@@ -300,3 +300,7 @@
if(!H.mind.initial_account)
return
id.associated_account_number = H.mind.initial_account.account_number
+
+/// Used to give the gaze ability to NTReps and IAAs
+/datum/outfit/job/proc/give_gaze(mob/living/carbon/human/user)
+ user.AddSpell(new /datum/spell/inspectors_gaze(null))
diff --git a/code/game/jobs/job/supervisor.dm b/code/game/jobs/job/supervisor.dm
index 2ff840cb60f..5810625a5fe 100644
--- a/code/game/jobs/job/supervisor.dm
+++ b/code/game/jobs/job/supervisor.dm
@@ -198,6 +198,14 @@
)
bio_chips = list(/obj/item/bio_chip/mindshield)
+/datum/outfit/job/nanotrasenrep/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE)
+ . = ..()
+
+ if(visualsOnly)
+ return
+
+ INVOKE_ASYNC(src, PROC_REF(give_gaze), H)
+
/datum/job/blueshield
title = "Blueshield"
flag = JOB_BLUESHIELD
@@ -327,7 +335,7 @@
ACCESS_RESEARCH,
ACCESS_SEC_DOORS
)
- alt_titles = list("Human Resources Agent")
+ alt_titles = list("Human Resources Agent", "Inspector")
minimal_player_age = 30
exp_map = list(EXP_TYPE_CREW = 600)
blacklisted_disabilities = list(DISABILITY_FLAG_DEAF, DISABILITY_FLAG_MUTE, DISABILITY_FLAG_NERVOUS, DISABILITY_FLAG_LISP)
@@ -354,6 +362,14 @@
satchel = /obj/item/storage/backpack/satchel_sec
dufflebag = /obj/item/storage/backpack/duffel/security
+/datum/outfit/job/iaa/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE)
+ . = ..()
+
+ if(visualsOnly)
+ return
+
+ INVOKE_ASYNC(src, PROC_REF(give_gaze), H)
+
/datum/job/nanotrasentrainer
title = "Nanotrasen Career Trainer"
flag = JOB_INSTRUCTOR
diff --git a/code/game/machinery/tcomms/nttc.dm b/code/game/machinery/tcomms/nttc.dm
index 88bffe38194..30423ec42b2 100644
--- a/code/game/machinery/tcomms/nttc.dm
+++ b/code/game/machinery/tcomms/nttc.dm
@@ -103,6 +103,7 @@
"Forensic Technician" = "secradio",
"Head of Security" = "secradio",
"Human Resources Agent" = "secradio",
+ "Inspector" = "secradio",
"Internal Affairs Agent" = "secradio",
"Magistrate" = "secradio",
"Security Officer" = "secradio",
diff --git a/code/game/objects/structures/crates_lockers/closets/secure/security_lockers.dm b/code/game/objects/structures/crates_lockers/closets/secure/security_lockers.dm
index bae196daa8d..9ce976f4c2c 100644
--- a/code/game/objects/structures/crates_lockers/closets/secure/security_lockers.dm
+++ b/code/game/objects/structures/crates_lockers/closets/secure/security_lockers.dm
@@ -153,6 +153,7 @@
new /obj/item/storage/box/tapes(src)
new /obj/item/taperecorder(src)
new /obj/item/storage/bag/garment/nanotrasen_representative(src)
+ new /obj/item/clipboard/station_report(src)
/obj/structure/closet/secure_closet/security/cargo
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index b8bff42ec45..e37d3851545 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -908,6 +908,18 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
onclose(usr, "[name]")
if(href_list["flavor_change"])
update_flavor_text()
+ if(href_list["station_report"])
+ var/obj/item/clipboard/station_report/report = GLOB.station_report
+ if(!istype(report))
+ to_chat(src, "Nobody wrote a station report this shift!")
+ else if(!report.toppaper)
+ to_chat(src, "Nobody wrote a station report this shift!")
+ else if(istype(report.toppaper, /obj/item/paper_bundle))
+ var/obj/item/paper_bundle/report_page = report.toppaper
+ report_page.show_content(src)
+ else if(istype(report.toppaper, /obj/item/paper))
+ var/obj/item/paper/report_page = report.toppaper
+ report_page.show_content(src)
if(usr != src)
return TRUE
diff --git a/code/modules/paperwork/clipboard.dm b/code/modules/paperwork/clipboard.dm
index d0ee8d0d797..f93ccb980e7 100644
--- a/code/modules/paperwork/clipboard.dm
+++ b/code/modules/paperwork/clipboard.dm
@@ -1,3 +1,5 @@
+GLOBAL_VAR(station_report) // Variable to save the station report
+
#define PAPERWORK 1
#define PHOTO 2
@@ -157,5 +159,16 @@
update_icon()
showClipboard(usr)
+/obj/item/clipboard/station_report
+ name = "station report clipboard"
+ desc = "An important clipboard used to make reports on the station status, deliverable to Nanotrasen at the end of the shift. The top paper is the one formally inspected."
+
+/obj/item/clipboard/station_report/Initialize(mapload)
+ . = ..()
+ GLOB.station_report = src
+ var/start_paper = new /obj/item/paper(src)
+ toppaper = start_paper
+ update_icon()
+
#undef PAPERWORK
#undef PHOTO
diff --git a/paradise.dme b/paradise.dme
index 77b0ce556e5..10b8bd55dab 100644
--- a/paradise.dme
+++ b/paradise.dme
@@ -694,6 +694,7 @@
#include "code\datums\spells\genetic.dm"
#include "code\datums\spells\horsemask.dm"
#include "code\datums\spells\infinite_guns.dm"
+#include "code\datums\spells\inspectors_gaze.dm"
#include "code\datums\spells\knock.dm"
#include "code\datums\spells\lichdom.dm"
#include "code\datums\spells\lightning.dm"