private void OnStateChange(KMGameInfo.State state) { switch (state) { case KMGameInfo.State.Setup: Logging.Log("State Change: Setup"); InvoiceData.Enabled = false; InvoiceData.ClearData(); MultipleBombsInterface.RediscoverMultipleBombs(); FactoryGameModePicker.UpdateCompatibleMissions(); _fromSetupRoom = true; _binderConverter.Revert(); break; case KMGameInfo.State.Gameplay: Logging.Log("State Change: Gameplay"); if (GameplayState.MissionToLoad == ModMission.CUSTOM_MISSION_ID && _fromSetupRoom) { FactoryGameModePicker.UpdateMission(GameplayState.CustomMission, true, false, true); StartCoroutine(FixCustomMission()); } _fromSetupRoom = false; _binderConverter.Revert(); break; case KMGameInfo.State.PostGame: Logging.Log("Stage Change: PostGame"); if (InvoiceData.Enabled) { _binderConverter.Convert(); } break; default: break; } }