Files

33 lines
1.0 KiB
C#
Raw Permalink Normal View History

2022-08-14 01:59:14 -04:00
using Content.Shared.Chemistry.Reagent;
using Content.Shared.Eye.Blinding;
using Content.Shared.Eye.Blinding.Systems;
2022-08-14 01:59:14 -04:00
using JetBrains.Annotations;
using Robust.Shared.Prototypes;
2022-08-14 01:59:14 -04:00
namespace Content.Server.Chemistry.ReagentEffects
{
/// <summary>
/// Heal or apply eye damage
2022-08-14 01:59:14 -04:00
/// </summary>
[UsedImplicitly]
public sealed partial class ChemHealEyeDamage : ReagentEffect
2022-08-14 01:59:14 -04:00
{
/// <summary>
/// How much eye damage to add.
/// </summary>
[DataField]
public int Amount = -1;
2022-08-14 01:59:14 -04:00
protected override string? ReagentEffectGuidebookText(IPrototypeManager prototype, IEntitySystemManager entSys)
=> Loc.GetString("reagent-effect-guidebook-cure-eye-damage", ("chance", Probability), ("deltasign", MathF.Sign(Amount)));
2022-08-14 01:59:14 -04:00
public override void Effect(ReagentEffectArgs args)
{
if (args.Scale != 1f) // huh?
return;
args.EntityManager.EntitySysManager.GetEntitySystem<BlindableSystem>().AdjustEyeDamage(args.SolutionEntity, Amount);
2022-08-14 01:59:14 -04:00
}
}
}