Move target spotted blink gate into render settings

This commit is contained in:
Meta Vens 2026-06-21 23:42:01 +01:00
commit c624982215
3 changed files with 28 additions and 6 deletions

View file

@ -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)

View file

@ -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)

View file

@ -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;