From c624982215bb531da0c664c983687c67e7f244cb Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 21 Jun 2026 23:42:01 +0100 Subject: [PATCH] Move target spotted blink gate into render settings --- Aetheria.State.Verify/Program.cs | 10 +++++++++- Assets/Scripts/Gameplay/ActionGameManager.cs | 10 ++++++---- .../Runtime/AetheriaRuntimeDaemonRenderQueries.cs | 14 +++++++++++++- 3 files changed, 28 insertions(+), 6 deletions(-) diff --git a/Aetheria.State.Verify/Program.cs b/Aetheria.State.Verify/Program.cs index 7ed8fe1ce..9773a9bcc 100644 --- a/Aetheria.State.Verify/Program.cs +++ b/Aetheria.State.Verify/Program.cs @@ -1825,11 +1825,14 @@ static void RequireDaemonRenderQueryAuthority(string root) "public double LockIndicatorNoiseAmplitude { get; }", "public double HeatstrokePhasingFloor { get; }", "public double HeatstrokePhasingFrequency { get; }", + "public double TargetSpottedBlinkFrequency { get; }", + "public double TargetSpottedBlinkOffset { get; }", "public double NormalizeThermalRisk(double temperature)", "public double NormalizeHeatstrokePost(double heatstroke)", "public double NormalizeSevereHeatstrokePost(double heatstroke)", "public double ResolveSevereHeatstrokePostWeight(double heatstroke, double timeSeconds)", "public double NormalizeDetectionProgress(double infoGathered)", + "public bool ResolveTargetSpottedFillEnabled(double infoGathered, double timeSeconds)", "public double NormalizeTargetVisibilityFill(double infoGathered)", "public double NormalizeVisibilityToTargetFill(double infoGathered)", "public double NormalizeTargetStatusFill(double normalizedValue)", @@ -2199,6 +2202,7 @@ static void RequireDaemonRenderQueryAuthority(string root) var requiredActionGameManagerRenderSymbols = new[] { "renderSettings.NormalizeDetectionProgress(", + "renderSettings.ResolveTargetSpottedFillEnabled(", "renderSettings.NormalizeHeatstrokePost(", "renderSettings.ResolveSevereHeatstrokePostWeight(", "renderSettings.NormalizeTargetVisibilityFill(", @@ -2212,7 +2216,9 @@ static void RequireDaemonRenderQueryAuthority(string root) "Settings.GameplaySettings.SevereHeatstrokeRiskThreshold", "Settings.GameplaySettings.LockIndicatorNoiseAmplitude", "Settings.HeatstrokePhasingFloor", - "Settings.HeatstrokePhasingFrequency" + "Settings.HeatstrokePhasingFrequency", + "TargetSpottedBlinkFrequency", + "TargetSpottedBlinkOffset" }; var missingActionGameManagerRenderSymbols = requiredActionGameManagerRenderSymbols @@ -2234,6 +2240,8 @@ static void RequireDaemonRenderQueryAuthority(string root) "Settings.GameplaySettings.LockSpinSpeed", "Settings.HeatstrokePhasingFloor", "Settings.HeatstrokePhasingFrequency", + "TargetSpottedBlinkFrequency", + "TargetSpottedBlinkOffset", "Mathf.Lerp(.25f, .75f," }; var renderLoopHits = FindMethodScopedLineHits(actionGameManager, forbiddenRenderLoopSymbols) diff --git a/Assets/Scripts/Gameplay/ActionGameManager.cs b/Assets/Scripts/Gameplay/ActionGameManager.cs index 059ae1131..35824fc16 100644 --- a/Assets/Scripts/Gameplay/ActionGameManager.cs +++ b/Assets/Scripts/Gameplay/ActionGameManager.cs @@ -584,7 +584,9 @@ public class ActionGameManager : MonoBehaviour Settings.GameplaySettings.TargetDetectionInfoThreshold, Settings.GameplaySettings.LockIndicatorNoiseAmplitude, Settings.HeatstrokePhasingFloor, - Settings.HeatstrokePhasingFrequency); + Settings.HeatstrokePhasingFrequency, + TargetSpottedBlinkFrequency, + TargetSpottedBlinkOffset); } private readonly (float2 direction, string name)[] _directions = { @@ -3671,9 +3673,9 @@ public class ActionGameManager : MonoBehaviour var infoGatheredByHostile = GetObservedInfoGathered(indicator.Key, CurrentEntity); indicator.Value.Fill.fillAmount = (float)renderSettings.NormalizeDetectionProgress(infoGatheredByHostile); - indicator.Value.Fill.enabled = - !(infoGatheredByHostile > renderSettings.TargetDetectionInfoThreshold) || - Mathf.Sin(TargetSpottedBlinkFrequency * Time.time) + TargetSpottedBlinkOffset > 0; + indicator.Value.Fill.enabled = renderSettings.ResolveTargetSpottedFillEnabled( + infoGatheredByHostile, + Time.time); } } foreach (var indicator in _visibleFriendlyIndicators) diff --git a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeDaemonRenderQueries.cs b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeDaemonRenderQueries.cs index 7af86635b..560ad13b2 100644 --- a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeDaemonRenderQueries.cs +++ b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeDaemonRenderQueries.cs @@ -60,7 +60,9 @@ namespace GameCult.Aetheria.State.Verse double targetDetectionInfoThreshold, double lockIndicatorNoiseAmplitude, double heatstrokePhasingFloor = 0.0, - double heatstrokePhasingFrequency = 5.0) + double heatstrokePhasingFrequency = 5.0, + double targetSpottedBlinkFrequency = 20.0, + double targetSpottedBlinkOffset = -0.25) { TemperatureEmissionCurve = temperatureEmissionCurve; LockIndicatorFrequency = lockIndicatorFrequency; @@ -73,6 +75,8 @@ namespace GameCult.Aetheria.State.Verse LockIndicatorNoiseAmplitude = lockIndicatorNoiseAmplitude; HeatstrokePhasingFloor = heatstrokePhasingFloor; HeatstrokePhasingFrequency = heatstrokePhasingFrequency; + TargetSpottedBlinkFrequency = targetSpottedBlinkFrequency; + TargetSpottedBlinkOffset = targetSpottedBlinkOffset; } public AetheriaRuntimeExponentialCurve TemperatureEmissionCurve { get; } @@ -86,6 +90,8 @@ namespace GameCult.Aetheria.State.Verse public double LockIndicatorNoiseAmplitude { get; } public double HeatstrokePhasingFloor { get; } public double HeatstrokePhasingFrequency { get; } + public double TargetSpottedBlinkFrequency { get; } + public double TargetSpottedBlinkOffset { get; } public double NormalizeThermalRisk(double temperature) { @@ -127,6 +133,12 @@ namespace GameCult.Aetheria.State.Verse : Saturate(infoGathered / TargetDetectionInfoThreshold); } + public bool ResolveTargetSpottedFillEnabled(double infoGathered, double timeSeconds) + { + return !(infoGathered > TargetDetectionInfoThreshold) || + Math.Sin(TargetSpottedBlinkFrequency * timeSeconds) + TargetSpottedBlinkOffset > 0; + } + public double NormalizeTargetVisibilityFill(double infoGathered) { var denominator = 1.0 - TargetDetectionInfoThreshold;