From 07d45606aba19ccf264934190c26aeac2a8a5cd4 Mon Sep 17 00:00:00 2001 From: explosivekitty Date: Sat, 25 Apr 2026 02:27:24 +0200 Subject: [PATCH] Adds new quirk that makes brain traumas you receive more resilient (#5464) ## About The Pull Request Exactly what the title says. The quirk will make all traumas you get more resilient by 1 meaning traumas curable with neurine now will have to be cured with brain surgery, traumas curable with brain surgery will now become curable with lobotomy etc. You can configure the trait to make traumas you will get only curable with lobotomy or blessed lobotomy(or unremovable) if that's still not enough for you(this option is called hardcore mode in quirk configuration), and you can make traumas that would be curable with blessed lobotomy straight up unremovable if you really want to have them rest of your round(permanent traumas in quirk configuration) ## Why It's Good For The Game Adds another configurable negative quirk to the game that people can customize their character with ## Proof Of Testing
Screenshots/Videos image
## Changelog :cl: add: Added new negative quirk that makes brain traumas more resilient /:cl: --- .../~~bubber_defines/traits/declarations.dm | 3 + .../negative_quirks/resilient_traumas.dm | 63 +++++++++++++++++++ tgstation.dme | 1 + .../bubbers/resilient_traumas.tsx | 15 +++++ 4 files changed, 82 insertions(+) create mode 100644 modular_zubbers/code/datums/quirks/negative_quirks/resilient_traumas.dm create mode 100644 tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/character_preferences/bubbers/resilient_traumas.tsx diff --git a/code/__DEFINES/~~bubber_defines/traits/declarations.dm b/code/__DEFINES/~~bubber_defines/traits/declarations.dm index 36cda32d942..c4761904e70 100644 --- a/code/__DEFINES/~~bubber_defines/traits/declarations.dm +++ b/code/__DEFINES/~~bubber_defines/traits/declarations.dm @@ -64,3 +64,6 @@ /// The trait that determines if someone has the robotic limb reattachment quirk. #define TRAIT_ROBOTIC_LIMBATTACHMENT "trait_robotic_limbattachment" + +/// Trait that gives your brain traumas more resilance +#define TRAIT_RESILIENT_TRAUMAS "trait_resilient_traumas" diff --git a/modular_zubbers/code/datums/quirks/negative_quirks/resilient_traumas.dm b/modular_zubbers/code/datums/quirks/negative_quirks/resilient_traumas.dm new file mode 100644 index 00000000000..387505886ce --- /dev/null +++ b/modular_zubbers/code/datums/quirks/negative_quirks/resilient_traumas.dm @@ -0,0 +1,63 @@ +/datum/quirk/resilient_traumas + name = "Unrobust Brain" + desc = "Your nervous system is particularly weak, making you more susceptible to neurological traumas. All of the brain traumas you get will be more resilient and could be permanent." + icon = FA_ICON_HOUSE_CRACK //replace with something more fitting, i can't find anything nice looking for this + value = -4 + mob_trait = TRAIT_RESILIENT_TRAUMAS + gain_text = span_danger("Your brain becomes more soft!") + lose_text = span_notice("Your brain hardens again...") + medical_record_text = "Patient's brain is particularly sensitive to brain traumas." + hardcore_value = 4 + var/hardcore_mode = FALSE + var/permanent_traumas = FALSE + +/datum/quirk_constant_data/resilient_traumas + associated_typepath = /datum/quirk/resilient_traumas + customization_options = list( + /datum/preference/toggle/hardcore_mode, + /datum/preference/toggle/permanent_traumas + ) + +/datum/preference/toggle/hardcore_mode + category = PREFERENCE_CATEGORY_MANUALLY_RENDERED + savefile_key = "resilient_traumas_hardcore" + savefile_identifier = PREFERENCE_CHARACTER + can_randomize = FALSE + default_value = FALSE + +/datum/preference/toggle/hardcore_mode/apply_to_human(mob/living/carbon/human/target, value, datum/preferences/preferences) + return + +/datum/preference/toggle/hardcore_mode/create_default_value() + return FALSE + +/datum/preference/toggle/permanent_traumas + category = PREFERENCE_CATEGORY_MANUALLY_RENDERED + savefile_key = "resilient_traumas_permanent_traumas" + savefile_identifier = PREFERENCE_CHARACTER + can_randomize = FALSE + default_value = FALSE + +/datum/preference/toggle/permanent_traumas/apply_to_human(mob/living/carbon/human/target, value, datum/preferences/preferences) + return + +/datum/preference/toggle/permanent_traumas/create_default_value() + return FALSE + +/datum/quirk/resilient_traumas/post_add() + hardcore_mode = quirk_holder.client.prefs.read_preference(/datum/preference/toggle/hardcore_mode) + permanent_traumas = quirk_holder.client.prefs.read_preference(/datum/preference/toggle/permanent_traumas) + return ..() + +/datum/brain_trauma/on_gain() + . = ..() + if(HAS_TRAIT(owner, TRAIT_RESILIENT_TRAUMAS)) + if(resilience == TRAUMA_RESILIENCE_WOUND || resilience >= TRAUMA_RESILIENCE_ABSOLUTE) + return + + var/datum/quirk/resilient_traumas/quirk = owner.get_quirk(/datum/quirk/resilient_traumas) + if(resilience == TRAUMA_RESILIENCE_LOBOTOMY || (quirk.hardcore_mode && resilience > TRAUMA_RESILIENCE_BASIC)) + resilience = quirk.permanent_traumas ? TRAUMA_RESILIENCE_ABSOLUTE : TRAUMA_RESILIENCE_MAGIC + return + + resilience = quirk.hardcore_mode ? TRAUMA_RESILIENCE_LOBOTOMY : resilience + 1 diff --git a/tgstation.dme b/tgstation.dme index b95a48b2031..a24913191ee 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -9030,6 +9030,7 @@ #include "modular_zubbers\code\datums\quirks\negative_quirks\nerve_staple.dm" #include "modular_zubbers\code\datums\quirks\negative_quirks\numb_override.dm" #include "modular_zubbers\code\datums\quirks\negative_quirks\permanent_limp.dm" +#include "modular_zubbers\code\datums\quirks\negative_quirks\resilient_traumas.dm" #include "modular_zubbers\code\datums\quirks\negative_quirks\sensitive_snout.dm" #include "modular_zubbers\code\datums\quirks\negative_quirks\sol_weakness.dm" #include "modular_zubbers\code\datums\quirks\neutral_quirks\bald.dm" diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/character_preferences/bubbers/resilient_traumas.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/character_preferences/bubbers/resilient_traumas.tsx new file mode 100644 index 00000000000..d0372662ffb --- /dev/null +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/character_preferences/bubbers/resilient_traumas.tsx @@ -0,0 +1,15 @@ +import { CheckboxInput, FeatureToggle } from '../../base'; + +export const resilient_traumas_permanent_traumas: FeatureToggle = { + name: 'Permanent Traumas', + description: + 'Brain traumas you gain will become permanent instead curable with blessed lobotomy.', + component: CheckboxInput, +}; + +export const resilient_traumas_hardcore: FeatureToggle = { + name: 'Hardcore Mode', + description: + 'Basic traumas will only curable by lobotomy and everything else will be permanent/curable through blessed lobotomy.', + component: CheckboxInput, +};