2022-08-14 01:59:14 -04:00
|
|
|
using Content.Shared.Chemistry.Reagent;
|
|
|
|
|
using Content.Shared.Eye.Blinding;
|
2023-04-29 17:32:14 +12:00
|
|
|
using Content.Shared.Eye.Blinding.Systems;
|
2022-08-14 01:59:14 -04:00
|
|
|
using JetBrains.Annotations;
|
2023-06-04 16:45:02 -04:00
|
|
|
using Robust.Shared.Prototypes;
|
2022-08-14 01:59:14 -04:00
|
|
|
|
|
|
|
|
namespace Content.Server.Chemistry.ReagentEffects
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
2023-04-29 17:32:14 +12:00
|
|
|
/// Heal or apply eye damage
|
2022-08-14 01:59:14 -04:00
|
|
|
/// </summary>
|
|
|
|
|
[UsedImplicitly]
|
2023-08-22 18:14:33 -07:00
|
|
|
public sealed partial class ChemHealEyeDamage : ReagentEffect
|
2022-08-14 01:59:14 -04:00
|
|
|
{
|
|
|
|
|
/// <summary>
|
2023-04-29 17:32:14 +12:00
|
|
|
/// How much eye damage to add.
|
2022-11-07 21:32:36 -05:00
|
|
|
/// </summary>
|
2023-12-29 04:47:43 -08:00
|
|
|
[DataField]
|
2022-11-07 21:32:36 -05:00
|
|
|
public int Amount = -1;
|
2022-08-14 01:59:14 -04:00
|
|
|
|
2023-06-04 16:45:02 -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)
|
|
|
|
|
{
|
2023-04-29 17:32:14 +12:00
|
|
|
if (args.Scale != 1f) // huh?
|
2022-12-21 09:51:49 -05:00
|
|
|
return;
|
|
|
|
|
|
2023-04-29 17:32:14 +12:00
|
|
|
args.EntityManager.EntitySysManager.GetEntitySystem<BlindableSystem>().AdjustEyeDamage(args.SolutionEntity, Amount);
|
2022-08-14 01:59:14 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|