Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions code/__DEFINES/~darkpack/flavor_text.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#define EXAMINE_DNA_HEADSHOT "headshot"
/// Examine Panel flavor text
#define EXAMINE_DNA_FLAVOR_TEXT "flavor_text"
#define EXAMINE_DNA_WAR_FORM_FLAVOR_TEXT "war_form_flavor_text"
#define EXAMINE_DNA_FERAL_FORM_FLAVOR_TEXT "feral_form_flavor_text"
/// Examine Panel flavor text
#define EXAMINE_DNA_NSFW_FLAVOR_TEXT "nsfw_flavor_text"
/// Examine Panel OOC notes
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/~darkpack/traits/declarations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
// If the vampire can't perform mental abilities that require eye contact, as an example: dominate.
#define TRAIT_NO_EYE_CONTACT "no_eye_contact"

// If the splat shifts between diffrent forms as a fera
#define TRAIT_FERA_FORMS "fera_forms"
// If the splat uses the WTA renown system described in W20 p. 245
#define TRAIT_FERA_RENOWN "wta_fera_renown"
/// If the species has garou breeds to select.
Expand Down
5 changes: 3 additions & 2 deletions code/_globalvars/traits/_traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_ENHANCED_MELEE_DODGE" = TRAIT_ENHANCED_MELEE_DODGE, // DARKPACK EDIT ADD
"TRAIT_FAIR_GLABRO" = TRAIT_FAIR_GLABRO, // DARKPACK EDIT ADD - MERITS_FLAWS
"TRAIT_FEEDING_RESTRICTION" = TRAIT_FEEDING_RESTRICTION, // DARKPACK EDIT ADD
"TRAIT_FERA_FORMS" = TRAIT_FERA_FORMS, // DARKPACK EDIT ADD - WEREWOLF
"TRAIT_FERA_FUR" = TRAIT_FERA_FUR, // DARKPACK EDIT ADD - WEREWOLF
"TRAIT_FERA_RENOWN" = TRAIT_FERA_RENOWN, // DARKPACK EDIT ADD - WEREWOLF
"TRAIT_FORCED_EMOTION" = TRAIT_FORCED_EMOTION, // DARKPACK EDIT ADD - Melpominee
Expand Down Expand Up @@ -742,10 +743,10 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_STAKED" = TRAIT_STAKED, // DARKPACK EDIT ADD
"TRAIT_STAKE_IMMUNE" = TRAIT_STAKE_IMMUNE, // DARKPACK EDIT ADD
"TRAIT_STAKE_RESISTANT" = TRAIT_STAKE_RESISTANT, // DARKPACK EDIT ADD
"TRAIT_THE_LARGEST_MAW" = TRAIT_THE_LARGEST_MAW, // DARKPACK EDIT ADD - MERITS/FLAWS
"TRAIT_THIRD_EYE" = TRAIT_THIRD_EYE, // DARKPACK EDIT ADD - Tremere & Salubri Quirk
"TRAIT_STILLNESS_OF_DEATH" = TRAIT_STILLNESS_OF_DEATH, // DARKPACK EDIT ADD - Gargoyle Quirk
"TRAIT_THE_LARGEST_MAW" = TRAIT_THE_LARGEST_MAW, // DARKPACK EDIT ADD - MERITS/FLAWS
"TRAIT_THE_LARGEST_MAW" = TRAIT_THE_LARGEST_MAW, // DARKPACK EDIT ADD - MERITS/FLAWS
"TRAIT_THIRD_EYE" = TRAIT_THIRD_EYE, // DARKPACK EDIT ADD - Tremere & Salubri Quirk
"TRAIT_TIMEWARPER" = TRAIT_TIMEWARPER, // DARKPACK EDIT ADD
"TRAIT_TIME_SENSE" = TRAIT_TIME_SENSE, // DARKPACK EDIT ADD - MERITS_FLAWS
"TRAIT_TORPOR" = TRAIT_TORPOR, // DARKPACK EDIT ADD
Expand Down
18 changes: 16 additions & 2 deletions modular_darkpack/modules/flavor_text/code/examine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,17 @@
var/mob/living/carbon/human/holder_human = holder
obscured = holder_human.obscured_slots & HIDEFACE

var/main_flavor_text_key = EXAMINE_DNA_FLAVOR_TEXT

if(iscrinos(holder))
main_flavor_text_key = EXAMINE_DNA_WAR_FORM_FLAVOR_TEXT
else if(ishispo(holder) || islupus(holder))
main_flavor_text_key = EXAMINE_DNA_FERAL_FORM_FLAVOR_TEXT

//Check if the mob is obscured, then continue to headshot
if(isobserver(user) || show_flavor_text_when_masked || !obscured)
headshot = holder_human.dna.features[EXAMINE_DNA_HEADSHOT]
flavor_text = holder_human.dna.features[EXAMINE_DNA_FLAVOR_TEXT]
flavor_text = holder_human.dna.features[main_flavor_text_key]
flavor_text_nsfw = holder.dna.features[EXAMINE_DNA_NSFW_FLAVOR_TEXT]
ooc_notes = holder.dna.features[EXAMINE_DNA_OOC_NOTES]
character_notes = holder.dna.features[EXAMINE_DNA_CHARACTER_NOTES]
Expand All @@ -63,7 +70,14 @@

/mob/living/carbon/proc/flavor_text_creation()
var/flavor_text_to_show
var/preview_text = copytext_char(dna.features[EXAMINE_DNA_FLAVOR_TEXT], 1, FLAVOR_PREVIEW_LIMIT)

var/main_flavor_text_key = EXAMINE_DNA_FLAVOR_TEXT
if(iscrinos(src))
main_flavor_text_key = EXAMINE_DNA_WAR_FORM_FLAVOR_TEXT
else if(ishispo(src) || islupus(src))
main_flavor_text_key = EXAMINE_DNA_FERAL_FORM_FLAVOR_TEXT

var/preview_text = copytext_char(dna.features[main_flavor_text_key], 1, FLAVOR_PREVIEW_LIMIT)
// What examine_tgui.dm uses to determine if flavor text appears as "Obscured".
var/face_obscured = obscured_slots & HIDEFACE
if(!face_obscured || (face_obscured && client?.prefs.read_preference(/datum/preference/toggle/show_flavor_text_when_masked)))
Expand Down
26 changes: 26 additions & 0 deletions modular_darkpack/modules/flavor_text/code/preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,32 @@
/datum/preference/text/flavor_text/apply_to_human(mob/living/carbon/human/target, value)
target.dna.features[EXAMINE_DNA_FLAVOR_TEXT] = value


/datum/preference/text/war_form_flavor_text
category = PREFERENCE_CATEGORY_NON_CONTEXTUAL
priority = PREFERENCE_PRIORITY_BODYPARTS
savefile_identifier = PREFERENCE_CHARACTER
savefile_key = "war_form_flavor_text"
maximum_value_length = MAX_FLAVOR_LEN
relevant_inherent_trait = TRAIT_FERA_FORMS
must_have_relevant_trait = TRUE

/datum/preference/text/war_form_flavor_text/apply_to_human(mob/living/carbon/human/target, value)
target.dna.features[EXAMINE_DNA_WAR_FORM_FLAVOR_TEXT] = value


/datum/preference/text/feral_form_flavor_text
category = PREFERENCE_CATEGORY_NON_CONTEXTUAL
priority = PREFERENCE_PRIORITY_BODYPARTS
savefile_identifier = PREFERENCE_CHARACTER
savefile_key = "feral_form_flavor_text"
maximum_value_length = MAX_FLAVOR_LEN
relevant_inherent_trait = TRAIT_FERA_FORMS
must_have_relevant_trait = TRUE

/datum/preference/text/feral_form_flavor_text/apply_to_human(mob/living/carbon/human/target, value)
target.dna.features[EXAMINE_DNA_FERAL_FORM_FLAVOR_TEXT] = value

///////////////////////////////////////////////////////////////////////////

/datum/preference/text/nsfw_flavor_text
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
/datum/splat/werewolf/shifter
abstract_type = /datum/splat/werewolf/shifter
splat_traits = list(
TRAIT_FERA_FORMS,
TRAIT_WTA_GAROU_BREED,
TRAIT_WTA_GAROU_AUSPICE,
TRAIT_WTA_GAROU_TRIBE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@ export const flavor_text: Feature<string> = {
component: FeatureTextInput,
};

export const war_form_flavor_text: Feature<string> = {
name: 'Flavor Text (War form)',
description: "Appears when your character is examined as a war form fera (Crinos). This replaces the main flavor text section.",
component: FeatureTextInput,
};

export const feral_form_flavor_text: Feature<string> = {
name: 'Flavor Text (Feral form)',
description: "Appears when your character is examined as a feral and dire form fera (Hispo/Lupus). This replaces the main flavor text section.",
component: FeatureTextInput,
};

export const nsfw_flavor_text: Feature<string> = {
name: 'Flavor Text (NSFW)',
description: "Appears when your character is examined (but only if they're identifiable - try a gas mask).",
Expand Down
Loading