2021-09-06 15:49:44 +02:00
|
|
|
using Content.Shared.Chemistry.Components;
|
2021-07-31 04:50:32 -07:00
|
|
|
using Content.Shared.Chemistry.Reagent;
|
|
|
|
|
using Robust.Shared.GameObjects;
|
|
|
|
|
using Robust.Shared.Serialization.Manager.Attributes;
|
|
|
|
|
using Content.Shared.Damage;
|
|
|
|
|
|
|
|
|
|
namespace Content.Server.Chemistry.ReagentEffects
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
2021-09-15 03:07:37 +10:00
|
|
|
/// Default metabolism for medicine reagents.
|
2021-07-31 04:50:32 -07:00
|
|
|
/// </summary>
|
2021-09-15 03:07:37 +10:00
|
|
|
public class HealthChange : ReagentEffect
|
2021-07-31 04:50:32 -07:00
|
|
|
{
|
|
|
|
|
/// <summary>
|
2021-09-15 03:07:37 +10:00
|
|
|
/// Damage to apply every metabolism cycle. Damage Ignores resistances.
|
2021-07-31 04:50:32 -07:00
|
|
|
/// </summary>
|
2021-09-15 03:07:37 +10:00
|
|
|
[DataField("damage", required: true)]
|
|
|
|
|
public DamageSpecifier Damage = default!;
|
2021-07-31 04:50:32 -07:00
|
|
|
|
|
|
|
|
public override void Metabolize(IEntity solutionEntity, Solution.ReagentQuantity amount)
|
|
|
|
|
{
|
2021-09-15 03:07:37 +10:00
|
|
|
EntitySystem.Get<DamageableSystem>().TryChangeDamage(solutionEntity.Uid, Damage, true);
|
2021-07-31 04:50:32 -07:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|