Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
@@ -1,3 +1,3 @@
// This file contains all of the "static" define strings that tie to a trait.
// WARNING: The sections here actually matter in this file as it's tested by CI. Please do not toy with the sections."

Expand Down Expand Up @@ -124,6 +124,8 @@
// 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
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