]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
fix: Check revenant ability costs correctly (#32050)
authorDisposableCrewmember42 <disposablecrewmember42@proton.me>
Tue, 10 Sep 2024 23:07:07 +0000 (23:07 +0000)
committerGitHub <noreply@github.com>
Tue, 10 Sep 2024 23:07:07 +0000 (19:07 -0400)
* fix: Check revenant ability costs correctly

* refactor: Idiomatically get negative value

Content.Server/Revenant/EntitySystems/RevenantSystem.cs
Content.Shared/Revenant/Components/RevenantComponent.cs

index fa4f6db240c2b677cbf4b5f36de54f26cb29ac55..4cfceaf2974777ebdde6e07d2b59a6508afef1d3 100644 (file)
@@ -170,7 +170,7 @@ public sealed partial class RevenantSystem : EntitySystem
             }
         }
 
-        ChangeEssenceAmount(uid, abilityCost, component, false);
+        ChangeEssenceAmount(uid, -abilityCost, component, false);
 
         _statusEffects.TryAddStatusEffect<CorporealComponent>(uid, "Corporeal", TimeSpan.FromSeconds(debuffs.Y), false);
         _stun.TryStun(uid, TimeSpan.FromSeconds(debuffs.X), false);
index d7fb28ef13607b4e8f64b2dc957a19cedae647e4..e6543f1906961491063b8b542f7b56fe1e096c56 100644 (file)
@@ -86,7 +86,7 @@ public sealed partial class RevenantComponent : Component
     /// The amount of essence that is needed to use the ability.
     /// </summary>
     [ViewVariables(VVAccess.ReadWrite), DataField("defileCost")]
-    public FixedPoint2 DefileCost = -30;
+    public FixedPoint2 DefileCost = 30;
 
     /// <summary>
     /// The status effects applied after the ability
@@ -121,7 +121,7 @@ public sealed partial class RevenantComponent : Component
     /// The amount of essence that is needed to use the ability.
     /// </summary>
     [ViewVariables(VVAccess.ReadWrite), DataField("overloadCost")]
-    public FixedPoint2 OverloadCost = -40;
+    public FixedPoint2 OverloadCost = 40;
 
     /// <summary>
     /// The status effects applied after the ability
@@ -149,7 +149,7 @@ public sealed partial class RevenantComponent : Component
     /// The amount of essence that is needed to use the ability.
     /// </summary>
     [ViewVariables(VVAccess.ReadWrite), DataField("blightCost")]
-    public float BlightCost = -50;
+    public float BlightCost = 50;
 
     /// <summary>
     /// The status effects applied after the ability
@@ -171,7 +171,7 @@ public sealed partial class RevenantComponent : Component
     /// The amount of essence that is needed to use the ability.
     /// </summary>
     [ViewVariables(VVAccess.ReadWrite), DataField("malfunctionCost")]
-    public FixedPoint2 MalfunctionCost = -60;
+    public FixedPoint2 MalfunctionCost = 60;
 
     /// <summary>
     /// The status effects applied after the ability