Gives detectives an ID that looks like an assistant ID when flipped. Also makes their camera silent. (#85912)

## About The Pull Request
This PR adds an ID subtype which the detective outfit uses. It that can
be flipped to go plainclothes as an assistant. Access retained. Spare
clothes not included.

I've also made the detective camera silent (a sound cue is still played
to the user, others won't hear it) and with the flash disabled.

## Why It's Good For The Game
I want to make it a little easier for detectives to go plainclothes.
Between clothings and inventory management, it's already quite tricky as
a gimmick and without doubt a double-edged sword that can lead to
goofy-ass situations where officers actually confuse you for an
assistant. As for the camera, it's just a stealth buff.

## Changelog

🆑
add: Gave the detective an ID that can flipped to look like an assistant
ID.
balance: The detective camera is now silent and doesn't flash.
/🆑
This commit is contained in:
Ghom
2024-09-15 11:48:09 -07:00
committed by GitHub
parent 815f858640
commit 8a6dbb1a45
5 changed files with 60 additions and 17 deletions
+43 -5
View File
@@ -987,6 +987,11 @@
return ..()
/obj/item/card/id/advanced/proc/after_input_check(mob/user)
if(QDELETED(user) || QDELETED(src) || !user.client || !user.can_perform_action(src, NEED_DEXTERITY|FORBID_TELEKINESIS_REACH))
return FALSE
return TRUE
/obj/item/card/id/advanced/item_interaction(mob/living/user, obj/item/tool, list/modifiers)
. = ..()
if(.)
@@ -1442,6 +1447,44 @@
trim = /datum/id_trim/highlander
wildcard_slots = WILDCARD_LIMIT_ADMIN
/// An ID that you can flip with attack_self_secondary, overriding the appearance of the ID (useful for plainclothes detectives for example).
/obj/item/card/id/advanced/plainclothes
name = "Plainclothes ID"
///The trim that we use as plainclothes identity
var/alt_trim = /datum/id_trim/job/assistant
/obj/item/card/id/advanced/plainclothes/add_context(atom/source, list/context, obj/item/held_item, mob/user)
. = ..()
context[SCREENTIP_CONTEXT_LMB] = "Show/Flip ID"
/obj/item/card/id/advanced/plainclothes/examine(mob/user)
. = ..()
if(trim_assignment_override)
. += span_smallnotice("it's currently under plainclothes identity.")
else
. += span_smallnotice("flip it to switch to the plainclothes identity.")
/obj/item/card/id/advanced/plainclothes/attack_self(mob/user)
var/popup_input = tgui_input_list(user, "Choose Action", "Two-Sided ID", list("Show", "Flip"))
if(!popup_input || !after_input_check(user))
return TRUE
if(popup_input == "Show")
return ..()
balloon_alert(user, "flipped")
if(trim_assignment_override)
SSid_access.remove_trim_from_chameleon_card(src)
else
SSid_access.apply_trim_to_chameleon_card(src, alt_trim)
update_label()
update_appearance()
/obj/item/card/id/advanced/plainclothes/update_label()
if(!trim_assignment_override)
return ..()
var/name_string = registered_name ? "[registered_name]'s ID Card" : initial(name)
var/datum/id_trim/fake = SSid_access.trim_singletons_by_path[alt_trim]
name = "[name_string] ([fake.assignment])"
/obj/item/card/id/advanced/chameleon
name = "agent card"
desc = "A highly advanced chameleon ID card. Touch this card on another ID card or player to choose which accesses to copy. \
@@ -1724,11 +1767,6 @@
registered_account = account
to_chat(user, span_notice("Your account number has been automatically assigned."))
/obj/item/card/id/advanced/chameleon/proc/after_input_check(mob/user)
if(QDELETED(user) || QDELETED(src) || !user.client || !user.can_perform_action(src, NEED_DEXTERITY|FORBID_TELEKINESIS_REACH))
return FALSE
return TRUE
/obj/item/card/id/advanced/chameleon/add_item_context(obj/item/source, list/context, atom/target, mob/living/user,)
. = ..()