public void OnDisabled() { if (sm_redirectionInstalled) { Redirector.RevertRedirections(); sm_redirectionInstalled = false; } ExtendedPathManager.ResetPathFinding(); }
public void Stop() { if (!isEnabled) { return; } timeAdjustment.Disable(); timeBar.CityEventClick -= CustomTimeBarCityEventClick; timeBar.Disable(); eventManager.EventsChanged -= CityEventsChanged; SimulationHandler.NewDay -= CityEventsChanged; CityEventsLoader.Istance.Clear(); RealTimeStorage.Instance.GameSaving -= GameSaving; ResidentAIHook.RealTimeAI = null; TouristAIHook.RealTimeAI = null; PrivateBuildingAIHook.RealTimeAI = null; SimulationHandler.EventManager = null; SimulationHandler.DayTimeSimulation = null; SimulationHandler.CommercialAI = null; try { Redirector.RevertRedirections(); Log.Info($"Successfully reverted all method redirections."); } catch (Exception ex) { Log.Error("Failed to revert method redirections: " + ex.Message); } isEnabled = false; }
public override void OnReleased() { Redirector.RevertRedirections(); }
public void Uninstall() { Redirector.RevertRedirections(); }