From: ScarKy0 <106310278+ScarKy0@users.noreply.github.com> Date: Fri, 5 Dec 2025 00:42:03 +0000 (+0100) Subject: Warfarin and Hemorrhinol, Hemophilia turned into a StatusEffect (#41685) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=405bc6c8f13085b432ab59a9315cac34e9487504;p=space-station-14.git Warfarin and Hemorrhinol, Hemophilia turned into a StatusEffect (#41685) * init * yeah * move folders * comments * i hate cloning sometimes * review * review squred * fix stuff --- diff --git a/Content.Shared/StatusEffectNew/StatusEffectSystem.Relay.cs b/Content.Shared/StatusEffectNew/StatusEffectSystem.Relay.cs index 9b16aadff0..30c5d9f67e 100644 --- a/Content.Shared/StatusEffectNew/StatusEffectSystem.Relay.cs +++ b/Content.Shared/StatusEffectNew/StatusEffectSystem.Relay.cs @@ -1,3 +1,4 @@ +using Content.Shared.Body.Events; using Content.Shared.Damage.Events; using Content.Shared.Mobs.Events; using Content.Shared.Movement.Events; @@ -31,6 +32,8 @@ public sealed partial class StatusEffectsSystem SubscribeLocalEvent(RelayStatusEffectEvent); SubscribeLocalEvent(RelayStatusEffectEvent); + + SubscribeLocalEvent(RefRelayStatusEffectEvent); } private void RefRelayStatusEffectEvent(EntityUid uid, StatusEffectContainerComponent component, ref T args) where T : struct diff --git a/Content.Shared/Traits/Assorted/HemophiliaComponent.cs b/Content.Shared/Traits/Assorted/HemophiliaComponent.cs deleted file mode 100644 index 208883f11c..0000000000 --- a/Content.Shared/Traits/Assorted/HemophiliaComponent.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Robust.Shared.GameStates; - -namespace Content.Shared.Traits.Assorted; - -/// -/// This component is used for the Hemophilia Trait, it reduces the passive bleed stack reduction amount so entities with it bleed for longer. -/// -[RegisterComponent, NetworkedComponent, AutoGenerateComponentState] -public sealed partial class HemophiliaComponent : Component -{ - /// - /// What multiplier should be applied to the BleedReduction when an entity bleeds? - /// - [DataField, AutoNetworkedField] - public float HemophiliaBleedReductionMultiplier = 0.33f; -} diff --git a/Content.Shared/Traits/Assorted/HemophiliaStatusEffectComponent.cs b/Content.Shared/Traits/Assorted/HemophiliaStatusEffectComponent.cs new file mode 100644 index 0000000000..3216052257 --- /dev/null +++ b/Content.Shared/Traits/Assorted/HemophiliaStatusEffectComponent.cs @@ -0,0 +1,22 @@ +using Robust.Shared.GameStates; + +namespace Content.Shared.Traits.Assorted; + +/// +/// This component is used for the Hemophilia Trait, it reduces the passive bleed stack reduction amount so entities with it bleed for longer. +/// +[RegisterComponent, NetworkedComponent, AutoGenerateComponentState] +public sealed partial class HemophiliaStatusEffectComponent : Component +{ + /// + /// Multiplier to use for the amount of bloodloss reduction during a bleed tick. + /// + [DataField, AutoNetworkedField] + public float BleedReductionMultiplier = 0.33f; + + /// + /// Multiplier to use for the amount of blood lost during a bleed tick. + /// + [DataField, AutoNetworkedField] + public float BleedAmountMultiplier = 1f; +} diff --git a/Content.Shared/Traits/Assorted/HemophiliaSystem.cs b/Content.Shared/Traits/Assorted/HemophiliaSystem.cs index 53f6609575..4544007ac7 100644 --- a/Content.Shared/Traits/Assorted/HemophiliaSystem.cs +++ b/Content.Shared/Traits/Assorted/HemophiliaSystem.cs @@ -1,4 +1,5 @@ using Content.Shared.Body.Events; +using Content.Shared.StatusEffectNew; namespace Content.Shared.Traits.Assorted; @@ -6,11 +7,14 @@ public sealed class HemophiliaSystem : EntitySystem { public override void Initialize() { - SubscribeLocalEvent(OnBleedModifier); + SubscribeLocalEvent>(OnBleedModifier); } - private void OnBleedModifier(Entity ent, ref BleedModifierEvent args) + private void OnBleedModifier(Entity ent, ref StatusEffectRelayedEvent args) { - args.BleedReductionAmount *= ent.Comp.HemophiliaBleedReductionMultiplier; + var ev = args.Args; + ev.BleedReductionAmount *= ent.Comp.BleedReductionMultiplier; + ev.BleedAmount *= ent.Comp.BleedAmountMultiplier; + args.Args = ev; } } diff --git a/Resources/Locale/en-US/reagents/meta/medicine.ftl b/Resources/Locale/en-US/reagents/meta/medicine.ftl index 1d2dac1bf5..f1eb6e82a5 100644 --- a/Resources/Locale/en-US/reagents/meta/medicine.ftl +++ b/Resources/Locale/en-US/reagents/meta/medicine.ftl @@ -147,3 +147,6 @@ reagent-desc-potassium-iodide = Will reduce the damaging effects of radiation by reagent-name-haloperidol = haloperidol reagent-desc-haloperidol = Removes most stimulating and hallucinogenic drugs. Reduces druggy effects and jitteriness. Causes drowsiness. + +reagent-name-warfarin = warfarin +reagent-desc-warfarin = Commonly used as an anticoagulant medication. Causes blood to have difficulty forming clots. Can cause internal bleeding when overdosed. diff --git a/Resources/Locale/en-US/reagents/meta/physical-desc.ftl b/Resources/Locale/en-US/reagents/meta/physical-desc.ftl index 6e0ebf53bf..b9e6249fa0 100644 --- a/Resources/Locale/en-US/reagents/meta/physical-desc.ftl +++ b/Resources/Locale/en-US/reagents/meta/physical-desc.ftl @@ -97,3 +97,4 @@ reagent-physical-desc-slimy = slimy reagent-physical-desc-neural = neural reagent-physical-desc-unidentifiable = unidentifiable reagent-physical-desc-non-newtonian = non-newtonian +reagent-physical-desc-thin = thin diff --git a/Resources/Locale/en-US/reagents/meta/toxins.ftl b/Resources/Locale/en-US/reagents/meta/toxins.ftl index 46de20a592..89271516a8 100644 --- a/Resources/Locale/en-US/reagents/meta/toxins.ftl +++ b/Resources/Locale/en-US/reagents/meta/toxins.ftl @@ -84,3 +84,6 @@ reagent-desc-mechanotoxin = A neurotoxin used as venom by some species of spider reagent-name-toxintrash = reprocessed material reagent-desc-toxintrash = An awful-smelling slurry efficiently refined from discarded matter. It represents a perfect, zero-waste conversion of salvage into Vox sustenance, though it is a violent poison to others. + +reagent-name-hemorrhinol = hemorrhinol +reagent-desc-hemorrhinol = A toxin that causes severe damage to blood vessels, causing rapid bleeding. diff --git a/Resources/Prototypes/Entities/Mobs/Player/clone.yml b/Resources/Prototypes/Entities/Mobs/Player/clone.yml index e9e4f04f10..419bf23325 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/clone.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/clone.yml @@ -16,7 +16,6 @@ # traits - BlackAndWhiteOverlay - Clumsy - - Hemophilia - ImpairedMobility # - LegsParalyzed (you get healed) - LightweightDrunk diff --git a/Resources/Prototypes/Entities/StatusEffects/body.yml b/Resources/Prototypes/Entities/StatusEffects/body.yml index 6b6f704a2c..739c9c3b22 100644 --- a/Resources/Prototypes/Entities/StatusEffects/body.yml +++ b/Resources/Prototypes/Entities/StatusEffects/body.yml @@ -9,13 +9,19 @@ - Bloodstream - type: entity - parent: [ BloodstreamStatusEffectBase ] + parent: BloodstreamStatusEffectBase + id: BloodstreamStatusEffectDebuff + abstract: true + components: + - type: RejuvenateRemovedStatusEffect + +- type: entity + parent: BloodstreamStatusEffectDebuff id: StatusEffectBloodloss name: bloodloss components: - type: StutteringAccent - type: DrunkStatusEffect - - type: RejuvenateRemovedStatusEffect - type: entity parent: MobStatusEffectBase @@ -29,5 +35,30 @@ - type: PainNumbnessStatusEffect - type: entity - parent: PainNumbnessTraitStatusEffect + parent: BloodstreamStatusEffectBase + id: StatusEffectHemophiliaTrait + components: + - type: HemophiliaStatusEffect + +- type: entity + parent: BloodstreamStatusEffectDebuff + id: StatusEffectAnticoagulant # Decreases the amount of blood coagulation when bleeding. + name: thin blood + components: + - type: HemophiliaStatusEffect + bleedReductionMultiplier: 0.33 + bleedAmountMultiplier: 1 + +- type: entity + parent: BloodstreamStatusEffectDebuff + id: StatusEffectHemorrhage # Increases the amount of blood lost when bleeding. + name: hemorrhage + components: + - type: HemophiliaStatusEffect + bleedReductionMultiplier: 1 # We don't want it to also reduce coagulation, it would stack with Anticoagulant. + bleedAmountMultiplier: 1.33 + +- type: entity + parent: [ PainNumbnessTraitStatusEffect, MobStatusEffectDebuff ] id: StatusEffectPainNumbness + name: pain numbness diff --git a/Resources/Prototypes/Reagents/medicine.yml b/Resources/Prototypes/Reagents/medicine.yml index 84b5535802..06c261b0a7 100644 --- a/Resources/Prototypes/Reagents/medicine.yml +++ b/Resources/Prototypes/Reagents/medicine.yml @@ -1487,3 +1487,27 @@ - !type:AdjustReagent reagent: MindbreakerToxin amount: -3.0 + +- type: reagent + id: Warfarin + name: reagent-name-warfarin + group: Medicine + desc: reagent-desc-warfarin + physicalDesc: reagent-physical-desc-thin + allowedDepartments: + - Medical + flavor: medicine + color: "#d0e21b" + metabolisms: + Medicine: + effects: # One day this could be useful for treating blood clots, if we get those + - !type:ModifyStatusEffect + effectProto: StatusEffectAnticoagulant + time: 30 # 10 bleed ticks, you bleed every 3 seconds by default. + type: Update + - !type:ModifyBleed + conditions: + - !type:ReagentCondition + reagent: Warfarin + min: 15 + amount: 0.25 diff --git a/Resources/Prototypes/Reagents/toxins.yml b/Resources/Prototypes/Reagents/toxins.yml index 4a75270325..79f8e5cc29 100644 --- a/Resources/Prototypes/Reagents/toxins.yml +++ b/Resources/Prototypes/Reagents/toxins.yml @@ -751,3 +751,22 @@ conditions: - !type:MetabolizerTypeCondition type: [Vox] + +- type: reagent + id: Hemorrhinol + name: reagent-name-hemorrhinol + group: Toxins + desc: reagent-desc-hemorrhinol + physicalDesc: reagent-physical-desc-thin + contrabandSeverity: Major + flavor: sharp + color: "#96424f" + metabolisms: + Poison: + effects: + - !type:ModifyStatusEffect + effectProto: StatusEffectHemorrhage + time: 21 # 7 bleed ticks, you bleed every 3 seconds by default. + type: Update + - !type:ModifyBleed + amount: 0.5 diff --git a/Resources/Prototypes/Recipes/Reactions/medicine.yml b/Resources/Prototypes/Recipes/Reactions/medicine.yml index f710f5c471..1a9db942da 100644 --- a/Resources/Prototypes/Recipes/Reactions/medicine.yml +++ b/Resources/Prototypes/Recipes/Reactions/medicine.yml @@ -662,3 +662,27 @@ amount: 1 products: Haloperidol: 5 + +- type: reaction + id: Warfarin + reactants: + SulfuricAcid: + amount: 1 + Nitrogen: + amount: 1 + Sodium: + amount: 1 + products: + Warfarin: 2 + +- type: reaction + id: Hemorrhinol + reactants: + Warfarin: + amount: 2 + Razorium: + amount: 2 + Plasma: + amount: 1 + products: + Hemorrhinol: 2 diff --git a/Resources/Prototypes/Traits/disabilities.yml b/Resources/Prototypes/Traits/disabilities.yml index de102b54ee..299032bf77 100644 --- a/Resources/Prototypes/Traits/disabilities.yml +++ b/Resources/Prototypes/Traits/disabilities.yml @@ -93,8 +93,10 @@ name: trait-hemophilia-name description: trait-hemophilia-desc category: Disabilities - components: - - type: Hemophilia + specials: + - !type:ApplyStatusEffectSpecial + statusEffects: + - StatusEffectHemophiliaTrait - type: trait id: ImpairedMobility