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;
|
2021-10-21 07:30:55 +11:00
|
|
|
using JetBrains.Annotations;
|
2021-07-31 04:50:32 -07:00
|
|
|
|
|
|
|
|
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-10-21 07:30:55 +11:00
|
|
|
[UsedImplicitly]
|
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
|
|
|
|
2021-11-08 15:33:45 -07:00
|
|
|
public override void Metabolize(EntityUid solutionEntity, EntityUid organEntity, Solution.ReagentQuantity reagent, IEntityManager entityManager)
|
2021-07-31 04:50:32 -07:00
|
|
|
{
|
2021-11-08 15:33:45 -07:00
|
|
|
EntitySystem.Get<DamageableSystem>().TryChangeDamage(solutionEntity, Damage, true);
|
2021-07-31 04:50:32 -07:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|