* im good at atomizing. welcome to half-finished chem guides. * wagh * e * save work * aa * woweee UI * finishing the last of it * don't actually update the engine :( --------- Co-authored-by: moonheart08 <moonheart08@users.noreply.github.com>
33 lines
1.0 KiB
C#
33 lines
1.0 KiB
C#
using Content.Shared.Chemistry.Reagent;
|
|
using Content.Shared.Eye.Blinding;
|
|
using Content.Shared.Eye.Blinding.Systems;
|
|
using JetBrains.Annotations;
|
|
using Robust.Shared.Prototypes;
|
|
|
|
namespace Content.Server.Chemistry.ReagentEffects
|
|
{
|
|
/// <summary>
|
|
/// Heal or apply eye damage
|
|
/// </summary>
|
|
[UsedImplicitly]
|
|
public sealed class ChemHealEyeDamage : ReagentEffect
|
|
{
|
|
/// <summary>
|
|
/// How much eye damage to add.
|
|
/// </summary>
|
|
[DataField("amount")]
|
|
public int Amount = -1;
|
|
|
|
protected override string? ReagentEffectGuidebookText(IPrototypeManager prototype, IEntitySystemManager entSys)
|
|
=> Loc.GetString("reagent-effect-guidebook-cure-eye-damage", ("chance", Probability), ("deltasign", MathF.Sign(Amount)));
|
|
|
|
public override void Effect(ReagentEffectArgs args)
|
|
{
|
|
if (args.Scale != 1f) // huh?
|
|
return;
|
|
|
|
args.EntityManager.EntitySysManager.GetEntitySystem<BlindableSystem>().AdjustEyeDamage(args.SolutionEntity, Amount);
|
|
}
|
|
}
|
|
}
|