Files
Bubberstation/code/datums/id_trim/centcom.dm
Rhials 2e7be24aad Honor-riffic: Adds toggleable honorific titles to certain job ID trims (#88309)
## About The Pull Request

This implements a new, minor, but flavorful system to IDs -- Honorifics.
Does going by your full name not suit you? Do you demand respect for the
position on Space Station 13 that you've earned and want to be addressed
by your title? Do you take yourself WAY too seriously? This is for you.

Toggled by ctrl-clicking your ID, honorifics append a title to your name
depending on your position. Certain titles (Captain, Officer, Doctor,
etc.) will only append to the start (replacing or including the
first/last name), while others (PhD., Esq.) can only be appended at the
end.


![image](https://github.com/user-attachments/assets/3ae22744-5f6e-4d12-9ea8-ecd60456b5a9)

Each job TRIM has a set honorific and positions it can be assigned to. A
doctor can be "Doctor Peterson" or "Doctor Peterson Bungle" or "Doctor
Bungle". A Lawyer can only choose to be "Peterson Bungle, Esq.".

This will only occur when the speaker's voice is the same identity as
the one written on the ID's registered name. This should not interfere
with Unknown voice obfuscation, stolen ID shenanigans, or anything
gameplay-oriented. Hopefully.

This feature is also mononym friendly!


![image](https://github.com/user-attachments/assets/21555023-5dd0-49e0-acd5-2dd0a06ae621)

This also makes `first_name()` and `last_name()` global procs, and adds
one to check if a passed string has spaces/dashes/whitespace/whatever.

All of this is compatible with ID name changes, but the voice name must
align with the card name to display the honorific. If you are "Peter
Stinkypants" with your honorific set to display "Doctor Stinkypants",
and your ID's registered name is changed to "Peter Stinker", you show up
as "Peter Stinkypants (as Peter Stinker)" with no honorific provided. If
you become "Peter Stinker" and have a "Peter Stinker" ID, you will show
up as "Doctor Stinker" once again.

That all make sense? Great.

<details>
<summary>So about the ID name stuff...</summary>
<br>
So, when you activate an honorific on your ID, it DOES change the actual
object's name. Not the registered name, but the ID's name will go from
"Peter Dawson's ID card" to "Captain Dawson's ID card" when an honorific
is applied. This, as far as I've tested, does not mess with anything
important, but I can totally see it doing so in a way that makes
ctrl-Fing through logs harder than it needs to be. This could probably
be changed without too much effort so if the issue does arise I can fix
it. If not I am totally fine with reverting this PR until I can make it
work (if I can at all).
<br>


Admittedly this doesn't have much testing with holopads/radios, but I'm
confident the message composure is handled well enough to only display
the right names under the right circumstances. If this fucks up logging
or naming in any way tell me ASAP because I have a sinking feeling it
will in a way more catastrophic than I could ever predict. This PR has
been tested thoroughly but I have my limits.
</details>
2025-01-20 20:18:49 +00:00

249 lines
8.8 KiB
Plaintext

/// Trim for basic Centcom cards.
/datum/id_trim/centcom
access = list(ACCESS_CENT_GENERAL)
assignment = JOB_CENTCOM
trim_state = "trim_centcom"
sechud_icon_state = SECHUD_CENTCOM
department_color = COLOR_CENTCOM_BLUE
subdepartment_color = COLOR_CENTCOM_BLUE
threat_modifier = -10 // Centcom are legally allowed to do whatever they want
big_pointer = TRUE
pointer_color = COLOR_CENTCOM_BLUE
/// Trim for Centcom VIPs
/datum/id_trim/centcom/vip
access = list(ACCESS_CENT_GENERAL)
assignment = JOB_CENTCOM_VIP
/// Trim for Centcom Custodians.
/datum/id_trim/centcom/custodian
access = list(ACCESS_CENT_GENERAL, ACCESS_CENT_LIVING, ACCESS_CENT_STORAGE)
assignment = JOB_CENTCOM_CUSTODIAN
trim_state = "trim_janitor"
department_color = COLOR_CENTCOM_BLUE
subdepartment_color = COLOR_SERVICE_LIME
big_pointer = FALSE
honorifics = list("Custodian")
honorific_positions = HONORIFIC_POSITION_LAST | HONORIFIC_POSITION_NONE
/// Trim for Centcom Thunderdome Overseers.
/datum/id_trim/centcom/thunderdome_overseer
access = list(ACCESS_CENT_GENERAL, ACCESS_CENT_THUNDER)
assignment = JOB_CENTCOM_THUNDERDOME_OVERSEER
/// Trim for Centcom Officials.
/datum/id_trim/centcom/official
access = list(ACCESS_CENT_GENERAL, ACCESS_CENT_LIVING, ACCESS_WEAPONS)
assignment = JOB_CENTCOM_OFFICIAL
/// Trim for Centcom Interns.
/datum/id_trim/centcom/intern
access = list(ACCESS_CENT_GENERAL, ACCESS_CENT_LIVING, ACCESS_WEAPONS)
assignment = "CentCom Intern"
big_pointer = FALSE
honorifics = list("Intern")
honorific_positions = HONORIFIC_POSITION_LAST | HONORIFIC_POSITION_NONE
/// Trim for Centcom Head Interns. Different assignment, common station access added on.
/datum/id_trim/centcom/intern/head
assignment = "CentCom Head Intern"
big_pointer = TRUE
honorifics = list("Head Intern")
honorific_positions = HONORIFIC_POSITION_LAST | HONORIFIC_POSITION_NONE
/datum/id_trim/centcom/intern/head/New()
. = ..()
access |= SSid_access.get_flag_access_list(ACCESS_FLAG_COMMON)
/// Trim for Bounty Hunters hired by centcom.
/datum/id_trim/centcom/bounty_hunter
access = list(ACCESS_CENT_GENERAL)
assignment = "Bounty Hunter"
big_pointer = FALSE
/// Trim for Centcom Bartenders.
/datum/id_trim/centcom/bartender
access = list(ACCESS_CENT_GENERAL, ACCESS_CENT_LIVING, ACCESS_CENT_BAR)
assignment = JOB_CENTCOM_BARTENDER
big_pointer = FALSE
/// Trim for Centcom Medical Officers.
/datum/id_trim/centcom/medical_officer
access = list(ACCESS_CENT_GENERAL, ACCESS_CENT_LIVING, ACCESS_CENT_MEDICAL)
assignment = JOB_CENTCOM_MEDICAL_DOCTOR
honorifics = list("Doctor", "Dr.")
honorific_positions = HONORIFIC_POSITION_LAST | HONORIFIC_POSITION_NONE
/// Trim for Centcom Research Officers.
/datum/id_trim/centcom/research_officer
access = list(ACCESS_CENT_GENERAL, ACCESS_CENT_SPECOPS, ACCESS_CENT_MEDICAL, ACCESS_CENT_TELEPORTER, ACCESS_CENT_STORAGE)
assignment = JOB_CENTCOM_RESEARCH_OFFICER
/// Trim for Centcom Specops Officers. All Centcom and Station Access.
/datum/id_trim/centcom/specops_officer
assignment = JOB_CENTCOM_SPECIAL_OFFICER
big_pointer = FALSE
/datum/id_trim/centcom/specops_officer/New()
. = ..()
access = SSid_access.get_region_access_list(list(REGION_CENTCOM, REGION_ALL_STATION))
/// Trim for Centcom (Soviet) Admirals. All Centcom and Station Access.
/datum/id_trim/centcom/admiral
assignment = JOB_CENTCOM_ADMIRAL
/datum/id_trim/centcom/admiral/New()
. = ..()
access = SSid_access.get_region_access_list(list(REGION_CENTCOM, REGION_ALL_STATION))
/// Trim for Centcom Commanders. All Centcom and Station Access.
/datum/id_trim/centcom/commander
assignment = JOB_CENTCOM_COMMANDER
honorifics = list("Commander", "CMDR.")
honorific_positions = HONORIFIC_POSITION_LAST | HONORIFIC_POSITION_NONE
/datum/id_trim/centcom/commander/New()
. = ..()
access = SSid_access.get_region_access_list(list(REGION_CENTCOM, REGION_ALL_STATION))
/// Trim for Deathsquad officers. All Centcom and Station Access.
/datum/id_trim/centcom/deathsquad
assignment = JOB_ERT_DEATHSQUAD
trim_state = "trim_deathcommando"
sechud_icon_state = SECHUD_DEATH_COMMANDO
honorifics = list("Commando")
honorific_positions = HONORIFIC_POSITION_LAST | HONORIFIC_POSITION_NONE
/datum/id_trim/centcom/deathsquad/New()
. = ..()
access = SSid_access.get_region_access_list(list(REGION_CENTCOM, REGION_ALL_STATION))
/// Trim for generic ERT interns. No universal ID card changing access.
/datum/id_trim/centcom/ert
assignment = "Emergency Response Team Intern"
honorifics = list("Intern")
honorific_positions = HONORIFIC_POSITION_LAST | HONORIFIC_POSITION_NONE
/datum/id_trim/centcom/ert/New()
. = ..()
access = list(ACCESS_CENT_GENERAL) | (SSid_access.get_region_access_list(list(REGION_ALL_STATION)) - ACCESS_CHANGE_IDS)
/// Trim for ERT Commanders. All station and centcom access.
/datum/id_trim/centcom/ert/commander
assignment = JOB_ERT_COMMANDER
trim_state = "trim_ert_commander"
sechud_icon_state = SECHUD_EMERGENCY_RESPONSE_TEAM_COMMANDER
/datum/id_trim/centcom/ert/commander/New()
. = ..()
access = SSid_access.get_region_access_list(list(REGION_CENTCOM, REGION_ALL_STATION))
/// Trim for generic ERT seccies. No universal ID card changing access.
/datum/id_trim/centcom/ert/security
assignment = JOB_ERT_OFFICER
trim_state = "trim_securityofficer"
subdepartment_color = COLOR_SECURITY_RED
sechud_icon_state = SECHUD_SECURITY_RESPONSE_OFFICER
big_pointer = FALSE
honorifics = list("Officer")
honorific_positions = HONORIFIC_POSITION_LAST | HONORIFIC_POSITION_NONE
/datum/id_trim/centcom/ert/security/New()
. = ..()
access = list(ACCESS_CENT_GENERAL, ACCESS_CENT_SPECOPS, ACCESS_CENT_LIVING) | (SSid_access.get_region_access_list(list(REGION_ALL_STATION)) - ACCESS_CHANGE_IDS)
/// Trim for generic ERT engineers. No universal ID card changing access.
/datum/id_trim/centcom/ert/engineer
assignment = JOB_ERT_ENGINEER
trim_state = "trim_stationengineer"
subdepartment_color = COLOR_ENGINEERING_ORANGE
sechud_icon_state = SECHUD_ENGINEERING_RESPONSE_OFFICER
big_pointer = FALSE
/datum/id_trim/centcom/ert/engineer/New()
. = ..()
access = list(ACCESS_CENT_GENERAL, ACCESS_CENT_SPECOPS, ACCESS_CENT_LIVING, ACCESS_CENT_STORAGE) | (SSid_access.get_region_access_list(list(REGION_ALL_STATION)) - ACCESS_CHANGE_IDS)
/// Trim for generic ERT medics. No universal ID card changing access.
/datum/id_trim/centcom/ert/medical
assignment = JOB_ERT_MEDICAL_DOCTOR
trim_state = "trim_medicaldoctor"
subdepartment_color = COLOR_MEDICAL_BLUE
sechud_icon_state = SECHUD_MEDICAL_RESPONSE_OFFICER
big_pointer = FALSE
honorifics = list("Doctor", "Dr.")
honorific_positions = HONORIFIC_POSITION_LAST | HONORIFIC_POSITION_NONE
/datum/id_trim/centcom/ert/medical/New()
. = ..()
access = list(ACCESS_CENT_GENERAL, ACCESS_CENT_SPECOPS, ACCESS_CENT_MEDICAL, ACCESS_CENT_LIVING) | (SSid_access.get_region_access_list(list(REGION_ALL_STATION)) - ACCESS_CHANGE_IDS)
/// Trim for generic ERT chaplains. No universal ID card changing access.
/datum/id_trim/centcom/ert/chaplain
assignment = JOB_ERT_CHAPLAIN
trim_state = "trim_chaplain"
subdepartment_color = COLOR_SERVICE_LIME
sechud_icon_state = SECHUD_RELIGIOUS_RESPONSE_OFFICER
big_pointer = FALSE
honorifics = list("Chaplain")
honorific_positions = HONORIFIC_POSITION_LAST | HONORIFIC_POSITION_NONE
/datum/id_trim/centcom/ert/chaplain/New()
. = ..()
access = list(ACCESS_CENT_GENERAL, ACCESS_CENT_SPECOPS, ACCESS_CENT_LIVING) | (SSid_access.get_region_access_list(list(REGION_ALL_STATION)) - ACCESS_CHANGE_IDS)
/// Trim for generic ERT janitors. No universal ID card changing access.
/datum/id_trim/centcom/ert/janitor
assignment = JOB_ERT_JANITOR
trim_state = "trim_ert_janitor"
subdepartment_color = COLOR_SERVICE_LIME
sechud_icon_state = SECHUD_JANITORIAL_RESPONSE_OFFICER
big_pointer = FALSE
honorifics = list("Custodian")
honorific_positions = HONORIFIC_POSITION_LAST | HONORIFIC_POSITION_NONE
/datum/id_trim/centcom/ert/janitor/New()
. = ..()
access = list(ACCESS_CENT_GENERAL, ACCESS_CENT_LIVING) | (SSid_access.get_region_access_list(list(REGION_ALL_STATION)) - ACCESS_CHANGE_IDS)
/// Trim for generic ERT clowns. No universal ID card changing access.
/datum/id_trim/centcom/ert/clown
assignment = JOB_ERT_CLOWN
trim_state = "trim_clown"
subdepartment_color = COLOR_MAGENTA
sechud_icon_state = SECHUD_ENTERTAINMENT_RESPONSE_OFFICER
big_pointer = FALSE
/datum/id_trim/centcom/ert/clown/New()
. = ..()
access = list(ACCESS_CENT_GENERAL, ACCESS_CENT_LIVING) | (SSid_access.get_region_access_list(list(REGION_ALL_STATION)) - ACCESS_CHANGE_IDS)
/datum/id_trim/centcom/ert/militia
assignment = "Frontier Militia"
big_pointer = FALSE
honorifics = list("Minuteman")
honorific_positions = HONORIFIC_POSITION_LAST | HONORIFIC_POSITION_NONE
/datum/id_trim/centcom/ert/militia/general
assignment = "Frontier Militia General"
big_pointer = TRUE
honorifics = list("Minuteman General", "General")
honorific_positions = HONORIFIC_POSITION_LAST | HONORIFIC_POSITION_NONE