readd the other event but named differently

This commit is contained in:
Noah Pilarski 2025-02-15 22:57:49 -05:00
parent 325180589f
commit 98861c13d2
4 changed files with 16 additions and 0 deletions

View File

@ -91,6 +91,15 @@ namespace NewHorizons.Handlers
// default to displaying nh planets if no title screen builders // default to displaying nh planets if no title screen builders
else else
DisplayBodiesOnTitleScreen(); DisplayBodiesOnTitleScreen();
try
{
Main.Instance.OnAllTitleScreensLoaded?.Invoke();
}
catch (Exception e)
{
NHLogger.LogError($"Error in event handler for OnAllTitleScreensLoaded: {e}");
}
} }
public static void InitSubtitles() public static void InitSubtitles()

View File

@ -79,6 +79,11 @@ namespace NewHorizons
/// Gives the unique name of the mod the title screen builder was from. /// Gives the unique name of the mod the title screen builder was from.
/// </summary> /// </summary>
UnityEvent<string> GetTitleScreenLoadedEvent(); UnityEvent<string> GetTitleScreenLoadedEvent();
/// <summary>
/// An event invoked when NH has finished building the title screen.
/// </summary>
UnityEvent GetAllTitleScreensLoadedEvent();
#endregion #endregion
#region Querying configs #region Querying configs

View File

@ -112,6 +112,7 @@ namespace NewHorizons
public StringEvent OnStarSystemLoaded = new(); public StringEvent OnStarSystemLoaded = new();
public StringEvent OnPlanetLoaded = new(); public StringEvent OnPlanetLoaded = new();
public StringEvent OnTitleScreenLoaded = new(); public StringEvent OnTitleScreenLoaded = new();
public UnityEvent OnAllTitleScreensLoaded = new();
/// <summary> /// <summary>
/// Depending on platform, the AsyncOwnershipStatus might not be ready by the time we go to check it. /// Depending on platform, the AsyncOwnershipStatus might not be ready by the time we go to check it.

View File

@ -91,6 +91,7 @@ namespace NewHorizons
public UnityEvent<string> GetStarSystemLoadedEvent() => Main.Instance.OnStarSystemLoaded; public UnityEvent<string> GetStarSystemLoadedEvent() => Main.Instance.OnStarSystemLoaded;
public UnityEvent<string> GetBodyLoadedEvent() => Main.Instance.OnPlanetLoaded; public UnityEvent<string> GetBodyLoadedEvent() => Main.Instance.OnPlanetLoaded;
public UnityEvent<string> GetTitleScreenLoadedEvent() => Main.Instance.OnTitleScreenLoaded; public UnityEvent<string> GetTitleScreenLoadedEvent() => Main.Instance.OnTitleScreenLoaded;
public UnityEvent GetAllTitleScreensLoadedEvent() => Main.Instance.OnAllTitleScreensLoaded;
public bool SetDefaultSystem(string name) public bool SetDefaultSystem(string name)
{ {