Move heatstroke pulse tuning into daemon render settings

This commit is contained in:
Meta Vens 2026-06-21 23:38:05 +01:00
commit c54e3b63e7
3 changed files with 27 additions and 7 deletions

View file

@ -1823,9 +1823,12 @@ static void RequireDaemonRenderQueryAuthority(string root)
"public double SevereHeatstrokeRiskThreshold { get; }",
"public double TargetDetectionInfoThreshold { get; }",
"public double LockIndicatorNoiseAmplitude { get; }",
"public double HeatstrokePhasingFloor { get; }",
"public double HeatstrokePhasingFrequency { 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 double NormalizeTargetVisibilityFill(double infoGathered)",
"public double NormalizeVisibilityToTargetFill(double infoGathered)",
@ -2197,7 +2200,7 @@ static void RequireDaemonRenderQueryAuthority(string root)
{
"renderSettings.NormalizeDetectionProgress(",
"renderSettings.NormalizeHeatstrokePost(",
"renderSettings.NormalizeSevereHeatstrokePost(",
"renderSettings.ResolveSevereHeatstrokePostWeight(",
"renderSettings.NormalizeTargetVisibilityFill(",
"renderSettings.NormalizeVisibilityToTargetFill(",
"renderSettings.NormalizeTargetStatusFill(",
@ -2207,7 +2210,9 @@ static void RequireDaemonRenderQueryAuthority(string root)
"new AetheriaRuntimeExponentialLerp(",
"Settings.GameplaySettings.TargetDetectionInfoThreshold",
"Settings.GameplaySettings.SevereHeatstrokeRiskThreshold",
"Settings.GameplaySettings.LockIndicatorNoiseAmplitude"
"Settings.GameplaySettings.LockIndicatorNoiseAmplitude",
"Settings.HeatstrokePhasingFloor",
"Settings.HeatstrokePhasingFrequency"
};
var missingActionGameManagerRenderSymbols = requiredActionGameManagerRenderSymbols
@ -2227,6 +2232,8 @@ static void RequireDaemonRenderQueryAuthority(string root)
"Settings.GameplaySettings.LockIndicatorNoiseAmplitude",
"Settings.GameplaySettings.LockIndicatorFrequency",
"Settings.GameplaySettings.LockSpinSpeed",
"Settings.HeatstrokePhasingFloor",
"Settings.HeatstrokePhasingFrequency",
"Mathf.Lerp(.25f, .75f,"
};
var renderLoopHits = FindMethodScopedLineHits(actionGameManager, forbiddenRenderLoopSymbols)

View file

@ -582,7 +582,9 @@ public class ActionGameManager : MonoBehaviour
Settings.GameplaySettings.HeatstrokeTemperature,
Settings.GameplaySettings.SevereHeatstrokeRiskThreshold,
Settings.GameplaySettings.TargetDetectionInfoThreshold,
Settings.GameplaySettings.LockIndicatorNoiseAmplitude);
Settings.GameplaySettings.LockIndicatorNoiseAmplitude,
Settings.HeatstrokePhasingFloor,
Settings.HeatstrokePhasingFrequency);
}
private readonly (float2 direction, string name)[] _directions = {
@ -3695,10 +3697,8 @@ public class ActionGameManager : MonoBehaviour
_viewDirection = Quaternion.Euler(_entityYawPitch.y * Mathf.Rad2Deg, _entityYawPitch.x * Mathf.Rad2Deg, 0) * Vector3.forward;
RequestLookDirection(_viewDirection);
HeatstrokePost.weight = (float)renderSettings.NormalizeHeatstrokePost(CurrentEntity.Heatstroke);
var severeHeatstrokeLerp = (float)renderSettings.NormalizeSevereHeatstrokePost(CurrentEntity.Heatstroke);
SevereHeatstrokePost.weight =
severeHeatstrokeLerp + severeHeatstrokeLerp * (1 - severeHeatstrokeLerp) *
Mathf.Max(Settings.HeatstrokePhasingFloor, Mathf.Sin(Time.time * Settings.HeatstrokePhasingFrequency));
(float)renderSettings.ResolveSevereHeatstrokePostWeight(CurrentEntity.Heatstroke, Time.time);
if(CurrentEntity is Ship)
{

View file

@ -58,7 +58,9 @@ namespace GameCult.Aetheria.State.Verse
double heatstrokeTemperature,
double severeHeatstrokeRiskThreshold,
double targetDetectionInfoThreshold,
double lockIndicatorNoiseAmplitude)
double lockIndicatorNoiseAmplitude,
double heatstrokePhasingFloor = 0.0,
double heatstrokePhasingFrequency = 5.0)
{
TemperatureEmissionCurve = temperatureEmissionCurve;
LockIndicatorFrequency = lockIndicatorFrequency;
@ -69,6 +71,8 @@ namespace GameCult.Aetheria.State.Verse
SevereHeatstrokeRiskThreshold = severeHeatstrokeRiskThreshold;
TargetDetectionInfoThreshold = targetDetectionInfoThreshold;
LockIndicatorNoiseAmplitude = lockIndicatorNoiseAmplitude;
HeatstrokePhasingFloor = heatstrokePhasingFloor;
HeatstrokePhasingFrequency = heatstrokePhasingFrequency;
}
public AetheriaRuntimeExponentialCurve TemperatureEmissionCurve { get; }
@ -80,6 +84,8 @@ namespace GameCult.Aetheria.State.Verse
public double SevereHeatstrokeRiskThreshold { get; }
public double TargetDetectionInfoThreshold { get; }
public double LockIndicatorNoiseAmplitude { get; }
public double HeatstrokePhasingFloor { get; }
public double HeatstrokePhasingFrequency { get; }
public double NormalizeThermalRisk(double temperature)
{
@ -107,6 +113,13 @@ namespace GameCult.Aetheria.State.Verse
return Saturate((heatstroke - SevereHeatstrokeRiskThreshold) / range);
}
public double ResolveSevereHeatstrokePostWeight(double heatstroke, double timeSeconds)
{
var normalized = NormalizeSevereHeatstrokePost(heatstroke);
return normalized + normalized * (1.0 - normalized) *
Math.Max(HeatstrokePhasingFloor, Math.Sin(timeSeconds * HeatstrokePhasingFrequency));
}
public double NormalizeDetectionProgress(double infoGathered)
{
return TargetDetectionInfoThreshold <= 0