-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Bug fixes - Fix flares turning white in the main system again #668 - Fix rotations of props that used `RemoveComponents`. This won't visibly affect any existing mods, and just makes it so that the rotation shown in Unity Explorer will match what's used in the config.
- Loading branch information
Showing
4 changed files
with
47 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using HarmonyLib; | ||
using System.Linq; | ||
|
||
namespace NewHorizons.Patches | ||
{ | ||
[HarmonyPatch(typeof(SolarFlareEmitter))] | ||
public static class SolarFlareEmitterPatches | ||
{ | ||
[HarmonyPostfix] | ||
[HarmonyPatch(nameof(SolarFlareEmitter.Awake))] | ||
public static void SolarFlareEmitter_Awake(SolarFlareEmitter __instance) | ||
{ | ||
// Because in StarBuilder we use inactive game objects instead of real prefabs these objects all get created inactive | ||
foreach (var flare in __instance._streamers.Concat(__instance._loops).Concat(__instance._domes)) | ||
{ | ||
flare.gameObject.SetActive(true); | ||
flare.enabled = true; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters