Skip to content

Commit

Permalink
Merge pull request #3245 from cebutris/distinct
Browse files Browse the repository at this point in the history
Distinct trait
  • Loading branch information
Tk420634 authored Oct 2, 2023
2 parents 9b71364 + 35a418d commit 17f4338
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 6 deletions.
1 change: 1 addition & 0 deletions code/__DEFINES/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@
#define TRAIT_SUPER_ZOOMIES "super zoomies"
#define TRAIT_ENDLESS_RUNNER "endless_runner"
#define TRAIT_PANICKED_ATTACKER "panicked_attacker"
#define TRAIT_NOHIDEFACE "no hide face"

// mobility flag traits
// IN THE FUTURE, IT WOULD BE NICE TO DO SOMETHING SIMILAR TO https://github.com/tgstation/tgstation/pull/48923/files (ofcourse not nearly the same because I have my.. thoughts on it)
Expand Down
4 changes: 2 additions & 2 deletions code/__HELPERS/pronouns.dm
Original file line number Diff line number Diff line change
Expand Up @@ -223,14 +223,14 @@

/mob/living/carbon/human/p_have(temp_gender)
var/list/obscured = check_obscured_slots()
var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
var/skipface = !HAS_TRAIT(src, TRAIT_NOHIDEFACE) && ((wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE)))
if((SLOT_W_UNIFORM in obscured) && skipface)
temp_gender = PLURAL
return ..()

/mob/living/carbon/human/p_are(temp_gender)
var/list/obscured = check_obscured_slots()
var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
var/skipface = (!HAS_TRAIT(src, TRAIT_NOHIDEFACE) && (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE)))
if((SLOT_W_UNIFORM in obscured) && skipface)
temp_gender = PLURAL
return ..()
Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_NOFIRE" = TRAIT_NOFIRE,
"TRAIT_NOGUNS" = TRAIT_NOGUNS,
"TRAIT_NOHARDCRIT" = TRAIT_NOHARDCRIT,
"TRAIT_NOHIDEFACE" = TRAIT_NOHIDEFACE,
"TRAIT_NOHUNGER" = TRAIT_NOHUNGER,
"TRAIT_NOLIMBDISABLE" = TRAIT_NOLIMBDISABLE,
"TRAIT_NOMARROW" = TRAIT_NOMARROW,
Expand Down
2 changes: 1 addition & 1 deletion code/datums/elements/flavor_text.dm
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ GLOBAL_LIST_EMPTY(mobs_with_editable_flavor_text) //et tu, hacky code
var/unknown = L.get_visible_name() == "Unknown"
if(!unknown && iscarbon(target))
var/mob/living/carbon/C = L
unknown = (C.wear_mask && (C.wear_mask.flags_inv & HIDEFACE)) || (C.head && (C.head.flags_inv & HIDEFACE))
unknown = !HAS_TRAIT(C, TRAIT_NOHIDEFACE) && ((C.wear_mask && (C.wear_mask.flags_inv & HIDEFACE)) || (C.head && (C.head.flags_inv & HIDEFACE)))
if(unknown)
if(!("...?" in examine_list)) //can't think of anything better in case of multiple flavor texts.
examine_list += "...?"
Expand Down
11 changes: 10 additions & 1 deletion code/datums/traits/neutral.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1108,4 +1108,13 @@
if(!QDELETED(H))
H.remove_language(/datum/language/bug)


/datum/quirk/distinct
name = "Distinct"
desc = "Whether you've got horns, wings, a big ass tail, or maybe just your general vibe, something about you cannot be concealed"
value = 0
category = "Lifepath Quirks"
mechanics = "Face coverings will not hide your identity from others, including flavor text and species"
conflicts = list()
mob_trait = TRAIT_NOHIDEFACE
gain_text = span_notice("You feel seen!")
lose_text = span_notice("You feel hidden")
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/human/examine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
. += vassDesc

var/list/obscured = check_obscured_slots()
var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
var/skipface = !HAS_TRAIT(src, TRAIT_NOHIDEFACE) && ((wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE)))

if(skipface || get_visible_name() == "Unknown")
. += "You can't make out what species they are."
Expand Down
4 changes: 3 additions & 1 deletion code/modules/mob/living/carbon/human/human_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@

//Returns "Unknown" if facially disfigured and real_name if not. Useful for setting name when Fluacided or when updating a human's name variable
/mob/living/carbon/human/proc/get_face_name(if_no_face="Unknown")
if( wear_mask && (wear_mask.flags_inv&HIDEFACE) ) //Wearing a mask which hides our face, use id-name if possible
if(real_name && HAS_TRAIT(src, TRAIT_NOHIDEFACE))
return real_name
if(wear_mask && (wear_mask.flags_inv&HIDEFACE)) //Wearing a mask which hides our face, use id-name if possible
return if_no_face
if( head && (head.flags_inv&HIDEFACE) )
return if_no_face //Likewise for hats
Expand Down

0 comments on commit 17f4338

Please sign in to comment.