Ejemplo n.º 1
0
        public void OnDisabled()
        {
            if (sm_redirectionInstalled)
            {
                Redirector.RevertRedirections();
                sm_redirectionInstalled = false;
            }

            ExtendedPathManager.ResetPathFinding();
        }
Ejemplo n.º 2
0
        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;
        }
Ejemplo n.º 3
0
 public override void OnReleased()
 {
     Redirector.RevertRedirections();
 }
Ejemplo n.º 4
0
 public void Uninstall()
 {
     Redirector.RevertRedirections();
 }