public static void NewGameInit() { if (!InterOp.is_loading_game()) { InterOp.clear_quest_messages(); Randomizer.Log($"New Game Init - {SeedController.SeedName}", false); ShopController.SetCostsAfterInit(); foreach (UberState s in DefaultUberStates) { s.Write(); } foreach (UberState s in Kuberstates) { s.Write(); } foreach (UberState s in DialogAndRumors) { s.Write(); } if (SeedController.KSDoorsOpen) { foreach (UberState s in KeystoneDoors) { s.Write(); } } if (!AHK.IniFlag("ShowShortCutscenes")) { foreach (UberState s in ShortCutscenes) { s.Write(); } } if (!AHK.IniFlag("ShowLongCutscenes")) { foreach (UberState s in LongCutscenes) { s.Write(); } } InterOp.discover_everything(); if (SeedController.Settings.LegacySeedgen && !SeedController.Flags.Contains(Flag.NOSWORD)) { SaveController.SetAbility(AbilityType.SpiritEdge); var slotRaw = AHK.IniString("Misc", "SpawnSlot"); var slot = 0; if (slotRaw != string.Empty) { slot = slotRaw.ParseToInt("Spawn Slot Ini") - 1; if (slot > 2 || slot < 0) { AHK.Print($"Ignoring invalid slot specifier {slotRaw}", toMessageLog: false); slot = 0; } } InterOp.bind(slot, 1002); } if (PsuedoLocs.GAME_START.Pickup().NonEmpty) { Randomizer.InputUnlockCallback = () => { MapController.UpdateReachable(2000); PsuedoLocs.GAME_START.OnCollect(); InterOp.save(); }; } else { MapController.UpdateReachable(); } InterOp.set_shard_slots(3); InterOp.save(); NeedsNewGameInit = false; } }