private static IEnumerator WaitForFoyerLoad() { while (Foyer.DoIntroSequence && Foyer.DoMainMenu) { yield return(null); } if (!m_ListsCleared) { // This should fix issus with Pasts trying to spawn inactive versions of custom enemies // (and any other mod that has created a custom AIActor or object that has a HealthHaver component) // Moved to WaitForForyerLoad so this can clean up fakeprefabs from other mods regardless of mods.txt load order StaticReferenceManager.AllHealthHavers.Clear(); // Remove any custom instances that use BroController StaticReferenceManager.AllBros.Clear(); // Clear any fakeprefab AIActors from lists. StaticReferenceManager.AllEnemies.Clear(); m_ListsCleared = true; } if (ExpandSettings.EnableLanguageFix) { GameManager.Options.CurrentLanguage = ExpandUtility.IntToLanguage(ExpandSettings.GameLanguage); StringTableManager.CurrentLanguage = ExpandUtility.IntToLanguage(ExpandSettings.GameLanguage); } if (ExpandSettings.EnableTestDungeonFlow) { GameManager.Instance.InjectedFlowPath = ExpandSettings.TestFlow; GameManager.Instance.InjectedLevelName = ExpandSettings.TestFloor; } yield break; }