mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 14:39:58 +01:00
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 <details> <summary>Screenshots/Videos</summary> <img width="528" height="198" alt="image" src="https://github.com/user-attachments/assets/658e2169-5b46-4161-af9d-a2a60a96f871" /> </details> ## Changelog 🆑 add: Added new negative quirk that makes brain traumas more resilient /🆑
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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
|
||||
@@ -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"
|
||||
|
||||
+15
@@ -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,
|
||||
};
|
||||
Reference in New Issue
Block a user