Blindness refactor (#15705)

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
Leon Friedrich
2023-04-29 17:32:14 +12:00
committed by GitHub
parent e0b809b62d
commit 84299cae63
34 changed files with 460 additions and 456 deletions

View File

@@ -1,27 +1,28 @@
using Content.Shared.Chemistry.Reagent;
using Content.Shared.Eye.Blinding;
using Content.Shared.Eye.Blinding.Systems;
using JetBrains.Annotations;
namespace Content.Server.Chemistry.ReagentEffects
{
/// <summary>
/// Heal eye damage (or deal)
/// Heal or apply eye damage
/// </summary>
[UsedImplicitly]
public sealed class ChemHealEyeDamage : ReagentEffect
{
/// <summary>
/// How much eye damage to remove.
/// How much eye damage to add.
/// </summary>
[DataField("amount")]
public int Amount = -1;
public override void Effect(ReagentEffectArgs args)
{
if (args.Scale != 1f)
if (args.Scale != 1f) // huh?
return;
args.EntityManager.EntitySysManager.GetEntitySystem<SharedBlindingSystem>().AdjustEyeDamage(args.SolutionEntity, Amount);
args.EntityManager.EntitySysManager.GetEntitySystem<BlindableSystem>().AdjustEyeDamage(args.SolutionEntity, Amount);
}
}
}