From eaa3f0e6ed14e778aaeb194b9cf3e40aa9226377 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 21 Jun 2026 23:24:14 +0100 Subject: [PATCH] Move target status fill band into runtime render settings --- Aetheria.State.Verify/Program.cs | 5 ++++- Assets/Scripts/Gameplay/ActionGameManager.cs | 6 ++++-- .../Runtime/AetheriaRuntimeDaemonRenderQueries.cs | 5 +++++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Aetheria.State.Verify/Program.cs b/Aetheria.State.Verify/Program.cs index ab43a162f..c7721fde2 100644 --- a/Aetheria.State.Verify/Program.cs +++ b/Aetheria.State.Verify/Program.cs @@ -1829,6 +1829,7 @@ static void RequireDaemonRenderQueryAuthority(string root) "public double NormalizeDetectionProgress(double infoGathered)", "public double NormalizeTargetVisibilityFill(double infoGathered)", "public double NormalizeVisibilityToTargetFill(double infoGathered)", + "public double NormalizeTargetStatusFill(double normalizedValue)", "public double ResolveLockIndicatorNoiseAmplitude(double lockProgress)", "public double ResolveLockIndicatorNoiseFrequency(double lockProgress)", "public double ResolveLockSpinSpeed(double lockProgress)", @@ -2192,6 +2193,7 @@ static void RequireDaemonRenderQueryAuthority(string root) "renderSettings.NormalizeSevereHeatstrokePost(", "renderSettings.NormalizeTargetVisibilityFill(", "renderSettings.NormalizeVisibilityToTargetFill(", + "renderSettings.NormalizeTargetStatusFill(", "renderSettings.ResolveLockIndicatorNoiseAmplitude(", "renderSettings.ResolveLockIndicatorNoiseFrequency(", "renderSettings.ResolveLockSpinSpeed(", @@ -2217,7 +2219,8 @@ static void RequireDaemonRenderQueryAuthority(string root) "Settings.GameplaySettings.SevereHeatstrokeRiskThreshold", "Settings.GameplaySettings.LockIndicatorNoiseAmplitude", "Settings.GameplaySettings.LockIndicatorFrequency", - "Settings.GameplaySettings.LockSpinSpeed" + "Settings.GameplaySettings.LockSpinSpeed", + "Mathf.Lerp(.25f, .75f," }; var renderLoopHits = FindMethodScopedLineHits(actionGameManager, forbiddenRenderLoopSymbols) .Where(hit => hit.MethodName is "Update" or "UpdateTargetIndicators") diff --git a/Assets/Scripts/Gameplay/ActionGameManager.cs b/Assets/Scripts/Gameplay/ActionGameManager.cs index 78a9567c1..808db9098 100644 --- a/Assets/Scripts/Gameplay/ActionGameManager.cs +++ b/Assets/Scripts/Gameplay/ActionGameManager.cs @@ -3717,8 +3717,10 @@ public class ActionGameManager : MonoBehaviour var targetMaxDurability = targetHull?.Durability > 0 ? (float)targetHull.Durability : Math.Max(target.Hull.Durability, 1f); - TargetHitpointsFill.fillAmount = Mathf.Lerp(.25f, .75f, target.Hull.Durability / targetMaxDurability); - TargetShieldsFill.fillAmount = target.Shield == null ? 0 : Mathf.Lerp(.25f, .75f, target.Shield.Progress); + TargetHitpointsFill.fillAmount = (float)renderSettings.NormalizeTargetStatusFill(target.Hull.Durability / targetMaxDurability); + TargetShieldsFill.fillAmount = target.Shield == null + ? 0 + : (float)renderSettings.NormalizeTargetStatusFill(target.Shield.Progress); } var tractorPower = Input.Player.TractorBeam.ReadValue(); diff --git a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeDaemonRenderQueries.cs b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeDaemonRenderQueries.cs index 3829e962f..3bcec3be9 100644 --- a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeDaemonRenderQueries.cs +++ b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeDaemonRenderQueries.cs @@ -128,6 +128,11 @@ namespace GameCult.Aetheria.State.Verse return Lerp(0.25, 0.75, NormalizeDetectionProgress(infoGathered)); } + public double NormalizeTargetStatusFill(double normalizedValue) + { + return Lerp(0.25, 0.75, normalizedValue); + } + public double ResolveLockIndicatorNoiseAmplitude(double lockProgress) { return LockIndicatorNoiseAmplitude * (1.0 - Saturate(lockProgress));