mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Remove all proxies bc they suck
This commit is contained in:
parent
a1e84d8152
commit
47585783c3
@ -211,9 +211,14 @@ namespace NewHorizons.Builder.General
|
|||||||
HeavenlyBodyBuilder.Remove(ao);
|
HeavenlyBodyBuilder.Remove(ao);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void RemoveDistantProxyClones()
|
public static void RemoveAllProxies()
|
||||||
{
|
{
|
||||||
GameObject.Destroy(GameObject.FindObjectOfType<DistantProxyManager>().gameObject);
|
GameObject.Destroy(GameObject.FindObjectOfType<DistantProxyManager>().gameObject);
|
||||||
|
|
||||||
|
foreach(var name in _solarSystemBodies)
|
||||||
|
{
|
||||||
|
RemoveProxy(name.Replace(" ", "").Replace("'", ""));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void DisableBody(GameObject go, bool delete)
|
private static void DisableBody(GameObject go, bool delete)
|
||||||
@ -233,6 +238,9 @@ namespace NewHorizons.Builder.General
|
|||||||
|
|
||||||
if (distantProxy != null) GameObject.Destroy(distantProxy.gameObject);
|
if (distantProxy != null) GameObject.Destroy(distantProxy.gameObject);
|
||||||
if (distantProxyClone != null) GameObject.Destroy(distantProxyClone.gameObject);
|
if (distantProxyClone != null) GameObject.Destroy(distantProxyClone.gameObject);
|
||||||
|
|
||||||
|
if (distantProxy == null && distantProxyClone == null)
|
||||||
|
Logger.Log($"Couldn't find proxy for {name}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -102,7 +102,7 @@ namespace NewHorizons.Handlers
|
|||||||
Logger.Log("Done loading bodies");
|
Logger.Log("Done loading bodies");
|
||||||
|
|
||||||
// I don't know what these do but they look really weird from a distance
|
// I don't know what these do but they look really weird from a distance
|
||||||
Main.Instance.ModHelper.Events.Unity.FireInNUpdates(() => PlanetDestroyer.RemoveDistantProxyClones(), 1);
|
Main.Instance.ModHelper.Events.Unity.FireOnNextUpdate(PlanetDestroyer.RemoveAllProxies);
|
||||||
|
|
||||||
if (Main.Instance.CurrentStarSystem != "SolarSystem") PlanetDestroyer.RemoveSolarSystem();
|
if (Main.Instance.CurrentStarSystem != "SolarSystem") PlanetDestroyer.RemoveSolarSystem();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user