Files
crystall-punk-14/Content.Server/Chemistry/ReagentEffects/HealthChange.cs
Fortune117 55249e3688 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
2021-10-20 13:30:55 -07:00

28 lines
888 B
C#

using Content.Shared.Chemistry.Components;
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
{
/// <summary>
/// Default metabolism for medicine reagents.
/// </summary>
[UsedImplicitly]
public class HealthChange : ReagentEffect
{
/// <summary>
/// Damage to apply every metabolism cycle. Damage Ignores resistances.
/// </summary>
[DataField("damage", required: true)]
public DamageSpecifier Damage = default!;
public override void Metabolize(IEntity solutionEntity, Solution.ReagentQuantity amount)
{
EntitySystem.Get<DamageableSystem>().TryChangeDamage(solutionEntity.Uid, Damage, true);
}
}
}