Skip to content

Commit

Permalink
simplify GlimmerEquilibrium constant
Browse files Browse the repository at this point in the history
  • Loading branch information
VMSolidus committed Jul 1, 2024
1 parent 8bbcafa commit c8e0572
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ private void OnPowerUsed(PyrokinesisPowerActionEvent args)
fireball.IntensitySlope = 1 * psionicFactor;
fireball.TotalIntensity = 25 * psionicFactor;

if (_glimmerSystem.GlimmerOutput >= _glimmerSystem.GlimmerEquilibrium)
if (_glimmerSystem.GlimmerOutput >= GlimmerSystem.GlimmerEquilibrium)
fireball.CanCreateVacuum = true;
else fireball.CanCreateVacuum = false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public override void Update(float frameTime)

if (source.Accumulator > source.SecondsPerGlimmer)
{
var glimmerEquilibrium = _glimmerSystem.GlimmerEquilibrium;
var glimmerEquilibrium = GlimmerSystem.GlimmerEquilibrium;
source.Accumulator -= source.SecondsPerGlimmer;

// Shorthand explanation:
Expand Down
9 changes: 1 addition & 8 deletions Content.Shared/Psionics/Glimmer/GlimmerSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,8 @@ public float GlimmerInput
/// <summary>
/// This constant is equal to the intersection of the Glimmer Equation(https://www.desmos.com/calculator/posutiq38e) and the line Y = X.
/// </summary>
private const float _glimmerEquilibrium = 502.941f;
public const float GlimmerEquilibrium = 502.941f;

/// <summary>
/// This constant is equal to the intersection of the Glimmer Equation(https://www.desmos.com/calculator/posutiq38e) and the line Y = X.
/// </summary>
public float GlimmerEquilibrium
{
get { return _glimmerEquilibrium; }
}

/// <summary>
/// Glimmer Output represents the player-facing value of the station's glimmer, and is given by f(x) for this graph: https://www.desmos.com/calculator/posutiq38e
Expand Down

0 comments on commit c8e0572

Please sign in to comment.