From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Sat, 19 Apr 2025 08:49:02 +0000 (+1000) Subject: Fix charges (#36714) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=bffd951867cbcab08abf296ebcbfb0067bf6d98c;p=space-station-14.git Fix charges (#36714) We have the absolute value so use that. --- diff --git a/Content.Shared/Charges/Systems/SharedChargesSystem.cs b/Content.Shared/Charges/Systems/SharedChargesSystem.cs index 2eb05f8bfc..4805e5a441 100644 --- a/Content.Shared/Charges/Systems/SharedChargesSystem.cs +++ b/Content.Shared/Charges/Systems/SharedChargesSystem.cs @@ -118,7 +118,7 @@ public abstract class SharedChargesSystem : EntitySystem action.Comp.LastUpdate = _timing.CurTime; } - action.Comp.LastCharges = Math.Clamp(action.Comp.LastCharges + addCharges, 0, action.Comp.MaxCharges); + action.Comp.LastCharges = Math.Clamp(charges, 0, action.Comp.MaxCharges); Dirty(action); }