Refactor reaction effects to use reagent effects (#5426)

* reaction effect refactor

* works now
This commit is contained in:
mirrorcult
2021-11-21 00:35:02 -07:00
committed by GitHub
parent 9b39838db7
commit 1ab7170adb
36 changed files with 83 additions and 82 deletions

View File

@@ -18,10 +18,10 @@ namespace Content.Server.Chemistry.ReagentEffects
public float HydrationFactor { get; set; } = 3.0f;
/// Satiate thirst if a ThirstComponent can be found
public override void Metabolize(ReagentEffectArgs args)
public override void Effect(ReagentEffectArgs args)
{
if (args.EntityManager.TryGetComponent(args.SolutionEntity, out ThirstComponent? thirst))
thirst.UpdateThirst(HydrationFactor * (float) args.Metabolizing);
thirst.UpdateThirst(HydrationFactor * (float) args.Quantity);
}
}
}