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>
This commit is contained in:
PollardTheDragon
2025-06-11 17:03:17 +00:00
committed by GitHub
co-authored by Burzah
parent f967158c0a
commit e5a08230ee
9 changed files with 73 additions and 1 deletions
+23
View File
@@ -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 = "<span class='notice'>You look for a crewmember to inspect! <b>Left-click to gaze at a target!</b></span>"
selection_deactivated_message = "<span class='notice'>You relinquish your gaze... for now.</span>"
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, "<span class='warning'>You don't think [target] can commit SOP violations.</span>")
return FALSE
to_chat(target, "<span class='warning'>You feel someone staring at you...</span>")
to_chat(user, "<span class='notice'>You gaze at [target], intent to find SOP violations.</span>")
return TRUE
+1
View File
@@ -313,6 +313,7 @@ GLOBAL_VAR(scoreboard) // Variable to save the scoreboard string once it's been
if(E.client)
to_chat(E, "<b>The crew's final score is:</b>")
to_chat(E, "<b><font size='4'><a href='byond://?src=[E.UID()];scoreboard=1'>[crewscore]</a></font></b>")
to_chat(E, "<b><font size='4'><a href='byond://?src=[E.UID()];station_report=1'>View Station Report</a></font></b>")
if(!E.get_preference(PREFTOGGLE_DISABLE_SCOREBOARD))
E << browse(GLOB.scoreboard, "window=roundstats;size=500x600")
+4
View File
@@ -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))
+17 -1
View File
@@ -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
+1
View File
@@ -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",
@@ -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
+12
View File
@@ -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, "<span class='notice'>Nobody wrote a station report this shift!</span>")
else if(!report.toppaper)
to_chat(src, "<span class='notice'>Nobody wrote a station report this shift!</span>")
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
+13
View File
@@ -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
+1
View File
@@ -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"