From 55249e3688710ba5de6af0b08e54ede68b4e242e Mon Sep 17 00:00:00 2001 From: Fortune117 Date: Thu, 21 Oct 2021 07:30:55 +1100 Subject: [PATCH] Add Overdosing Behaviour to Meth (#4949) * Added debug bottle of meth as well as a damage increase on a Reagent Threshold * fix for metabolism getting funked when there is a failed reaction condition * removed max, raised minimum to 10 * reduced regular meth damage, increased overdose damage --- .../Body/Metabolism/MetabolizerSystem.cs | 2 +- .../Chemistry/ReagentEffects/HealthChange.cs | 2 ++ .../Prototypes/Body/Mechanisms/human.yml | 9 ++++++++- .../Prototypes/Entities/Debugging/drugs.yml | 19 +++++++++++++++++++ 4 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 Resources/Prototypes/Entities/Debugging/drugs.yml diff --git a/Content.Server/Body/Metabolism/MetabolizerSystem.cs b/Content.Server/Body/Metabolism/MetabolizerSystem.cs index 070a3e18c7..1587528ca8 100644 --- a/Content.Server/Body/Metabolism/MetabolizerSystem.cs +++ b/Content.Server/Body/Metabolism/MetabolizerSystem.cs @@ -106,7 +106,7 @@ namespace Content.Server.Body.Metabolism } if (!conditionsMet) - return; + continue; // If we're part of a body, pass that entity to Metabolize // Otherwise, just pass our owner entity, maybe we're a plant or something diff --git a/Content.Server/Chemistry/ReagentEffects/HealthChange.cs b/Content.Server/Chemistry/ReagentEffects/HealthChange.cs index ccf16a352f..8cb7113064 100644 --- a/Content.Server/Chemistry/ReagentEffects/HealthChange.cs +++ b/Content.Server/Chemistry/ReagentEffects/HealthChange.cs @@ -3,12 +3,14 @@ using Content.Shared.Chemistry.Reagent; using Robust.Shared.GameObjects; using Robust.Shared.Serialization.Manager.Attributes; using Content.Shared.Damage; +using JetBrains.Annotations; namespace Content.Server.Chemistry.ReagentEffects { /// /// Default metabolism for medicine reagents. /// + [UsedImplicitly] public class HealthChange : ReagentEffect { /// diff --git a/Resources/Prototypes/Body/Mechanisms/human.yml b/Resources/Prototypes/Body/Mechanisms/human.yml index 7a66c84733..09e705b2f3 100644 --- a/Resources/Prototypes/Body/Mechanisms/human.yml +++ b/Resources/Prototypes/Body/Mechanisms/human.yml @@ -188,10 +188,17 @@ - !type:HealthChange damage: types: - Poison: 3 # 2.5 + Poison: 2 # 2.5 - !type:MovespeedModifier walkSpeedModifier: 1.3 sprintSpeedModifier: 1.3 + - !type:HealthChange + conditions: + - !type:ReagentThreshold + min: 10 + damage: + types: + Poison: 4 # this is added to the base damage of the meth. Omnizine: effects: - !type:HealthChange diff --git a/Resources/Prototypes/Entities/Debugging/drugs.yml b/Resources/Prototypes/Entities/Debugging/drugs.yml new file mode 100644 index 0000000000..25699ce434 --- /dev/null +++ b/Resources/Prototypes/Entities/Debugging/drugs.yml @@ -0,0 +1,19 @@ +- type: entity + parent: DrinkGlassBase + id: DrinkMeth + name: meth # beer it is. coffee. beer? coff-ee? be-er? c-o... b-e + description: Just a whole glass of meth. + suffix: DEBUG + components: + - type: Tag + tags: + - Debug + - type: SolutionContainerManager + solutions: + drink: + maxVol: 20 + reagents: + - ReagentId: Meth + Quantity: 20 + - type: Sprite + sprite: Objects/Consumable/Drinks/beer.rsi