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
else
DisplayBodiesOnTitleScreen();
try
{
Main.Instance.OnAllTitleScreensLoaded?.Invoke();
}
catch (Exception e)
{
NHLogger.LogError($"Error in event handler for OnAllTitleScreensLoaded: {e}");
}
}
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.
/// </summary>
UnityEvent<string> GetTitleScreenLoadedEvent();
/// <summary>
/// An event invoked when NH has finished building the title screen.
/// </summary>
UnityEvent GetAllTitleScreensLoadedEvent();
#endregion
#region Querying configs

View File

@ -112,6 +112,7 @@ namespace NewHorizons
public StringEvent OnStarSystemLoaded = new();
public StringEvent OnPlanetLoaded = new();
public StringEvent OnTitleScreenLoaded = new();
public UnityEvent OnAllTitleScreensLoaded = new();
/// <summary>
/// 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> GetBodyLoadedEvent() => Main.Instance.OnPlanetLoaded;
public UnityEvent<string> GetTitleScreenLoadedEvent() => Main.Instance.OnTitleScreenLoaded;
public UnityEvent GetAllTitleScreensLoadedEvent() => Main.Instance.OnAllTitleScreensLoaded;
public bool SetDefaultSystem(string name)
{