Just expect 32 signals max instead of constantly refreshing the array

This commit is contained in:
xen-42 2025-08-04 21:12:00 -04:00
parent 3403c5da34
commit 8089de358a
2 changed files with 1 additions and 4 deletions

View File

@ -113,9 +113,6 @@ namespace NewHorizons.Builder.Props.Audio
NumberOfFrequencies = EnumUtils.GetValues<SignalFrequency>().Length; NumberOfFrequencies = EnumUtils.GetValues<SignalFrequency>().Length;
// This stuff happens after the signalscope is Awake so we have to change the number of frequencies now
GameObject.FindObjectOfType<Signalscope>()._strongestSignals = new AudioSignal[NumberOfFrequencies + 1];
return freq; return freq;
} }

View File

@ -11,7 +11,7 @@ namespace NewHorizons.Patches.SignalPatches
[HarmonyPatch(nameof(Signalscope.Awake))] [HarmonyPatch(nameof(Signalscope.Awake))]
public static void Signalscope_Awake(Signalscope __instance) public static void Signalscope_Awake(Signalscope __instance)
{ {
__instance._strongestSignals = new AudioSignal[8]; __instance._strongestSignals = new AudioSignal[32];
} }
[HarmonyPrefix] [HarmonyPrefix]