mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Make planets get destroyed a tick later for that one guy
This commit is contained in:
parent
5898b9c52e
commit
ce088f499a
@ -43,11 +43,11 @@ namespace NewHorizons.Builder.General
|
||||
foreach(var name in _solarSystemBodies)
|
||||
{
|
||||
var ao = AstroObjectLocator.GetAstroObject(name);
|
||||
if (ao != null) Main.Instance.ModHelper.Events.Unity.FireOnNextUpdate(() => RemoveBody(ao, false));
|
||||
if (ao != null) Main.Instance.ModHelper.Events.Unity.FireInNUpdates(() => RemoveBody(ao, false), 2);
|
||||
}
|
||||
|
||||
// Bring the sun back because why not
|
||||
Main.Instance.ModHelper.Events.Unity.FireInNUpdates(() => { if (Locator.GetAstroObject(AstroObject.Name.Sun).gameObject.activeInHierarchy) { sunVolumes.SetActive(true); } }, 2);
|
||||
Main.Instance.ModHelper.Events.Unity.FireInNUpdates(() => { if (Locator.GetAstroObject(AstroObject.Name.Sun).gameObject.activeInHierarchy) { sunVolumes.SetActive(true); } }, 3);
|
||||
}
|
||||
|
||||
public static void RemoveBody(AstroObject ao, bool delete = false, List<AstroObject> toDestroy = null)
|
||||
|
||||
@ -128,8 +128,8 @@ namespace NewHorizons.Handlers
|
||||
if (body.Config.Destroy)
|
||||
{
|
||||
var ao = existingPlanet.GetComponent<AstroObject>();
|
||||
if (ao != null) Main.Instance.ModHelper.Events.Unity.FireInNUpdates(() => PlanetDestroyer.RemoveBody(ao), 1);
|
||||
else Main.Instance.ModHelper.Events.Unity.FireInNUpdates(() => existingPlanet.SetActive(false), 1);
|
||||
if (ao != null) Main.Instance.ModHelper.Events.Unity.FireInNUpdates(() => PlanetDestroyer.RemoveBody(ao), 2);
|
||||
else Main.Instance.ModHelper.Events.Unity.FireInNUpdates(() => existingPlanet.SetActive(false), 2);
|
||||
}
|
||||
else UpdateBody(body, existingPlanet);
|
||||
}
|
||||
|
||||
@ -429,7 +429,7 @@ namespace NewHorizons
|
||||
|
||||
public string[] GetInstalledAddons()
|
||||
{
|
||||
return Main.MountedAddons.ConvertAll(x => x.ModHelper.Manifest.UniqueName).ToArray();
|
||||
return Main.MountedAddons.Select(x => x.ModHelper.Manifest.UniqueName).ToArray();
|
||||
}
|
||||
}
|
||||
#endregion API
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user