mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-17 19:14:15 +01:00
2e7be24aad
## 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.  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!  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>
44 lines
2.2 KiB
Plaintext
44 lines
2.2 KiB
Plaintext
/// Simple datum that holds the basic information associated with an ID card trim.
|
|
/datum/id_trim
|
|
/// Icon file for this trim.
|
|
var/trim_icon = 'icons/obj/card.dmi'
|
|
/// Icon state for this trim. Overlayed on advanced ID cards.
|
|
var/trim_state
|
|
/// Department color for this trim. Displayed in the box under the trim_state.
|
|
var/department_color = COLOR_ASSISTANT_GRAY
|
|
/// Department icon state, for differentiating between heads and normal crew and other use cases.
|
|
var/department_state = "department"
|
|
/// Subdepartment color for this trim. Displayed as a bar under the trim_state and department_color.
|
|
var/subdepartment_color = COLOR_ASSISTANT_OLIVE
|
|
/// Job/assignment associated with this trim. Can be transferred to ID cards holding this trim.
|
|
var/assignment
|
|
/// The name of the job for interns. If unset it will default to "[assignment] (Intern)".
|
|
var/intern_alt_name = null
|
|
/// The icon_state associated with this trim, as it will show on the security HUD.
|
|
var/sechud_icon_state = SECHUD_UNKNOWN
|
|
/// How threatened does a security bot feel when scanning this ID? A negative value may cause them to forgive things which would otherwise cause aggro.
|
|
var/threat_modifier = 0
|
|
|
|
/// Accesses that this trim unlocks on a card it is imprinted on. These accesses never take wildcard slots and can be added and removed at will.
|
|
var/list/access = list()
|
|
/// Accesses that this trim unlocks on a card that require wildcard slots to apply. If a card cannot accept all a trim's wildcard accesses, the card is incompatible with the trim.
|
|
var/list/wildcard_access = list()
|
|
|
|
///If true, IDs with this trim will grant wearers with bigger arrows when pointing
|
|
var/big_pointer = FALSE
|
|
///If set, IDs with this trim will give wearers arrows of different colors when pointing
|
|
var/pointer_color
|
|
/// What honorifics, if any, will we set our wearer's name to when worn?
|
|
var/list/honorifics
|
|
/// What positions can our honorific take? To prevent names like "Peter Dr."
|
|
var/honorific_positions = NONE
|
|
|
|
/datum/id_trim/proc/find_job()
|
|
return null
|
|
|
|
/// Returns the SecHUD job icon state for whatever this object's ID card is, if it has one.
|
|
/obj/item/proc/get_sechud_job_icon_state()
|
|
var/obj/item/card/id/id_card = GetID()
|
|
|
|
return id_card?.get_trim_sechud_icon_state() || SECHUD_NO_ID
|