Example #1
0
        public void MapUpdate()
        {
            bool worldRenderedNow = WorldRendererUtility.WorldRenderedNow;

            this.skyManager.SkyManagerUpdate();
            this.powerNetManager.UpdatePowerNetsAndConnections_First();
            this.regionGrid.UpdateClean();
            this.regionAndRoomUpdater.TryRebuildDirtyRegionsAndRooms();
            this.glowGrid.GlowGridUpdate_First();
            this.lordManager.LordManagerUpdate();
            if (!worldRenderedNow && Find.VisibleMap == this)
            {
                this.waterInfo.SetTextures();
                Find.FactionManager.FactionsDebugDrawOnMap();
                this.mapDrawer.MapMeshDrawerUpdate_First();
                this.powerNetGrid.DrawDebugPowerNetGrid();
                DoorsDebugDrawer.DrawDebug();
                this.mapDrawer.DrawMapMesh();
                this.dynamicDrawManager.DrawDynamicThings();
                this.gameConditionManager.GameConditionManagerDraw();
                MapEdgeClipDrawer.DrawClippers(this);
                this.designationManager.DrawDesignations();
                this.overlayDrawer.DrawAllOverlays();
            }
            try
            {
                this.areaManager.AreaManagerUpdate();
            }
            catch (Exception ex)
            {
                Log.Error(ex.ToString());
            }
            this.weatherManager.WeatherManagerUpdate();
            MapComponentUtility.MapComponentUpdate(this);
        }
Example #2
0
        public void MapUpdate()
        {
            bool worldRenderedNow = WorldRendererUtility.WorldRenderedNow;

            skyManager.SkyManagerUpdate();
            powerNetManager.UpdatePowerNetsAndConnections_First();
            regionGrid.UpdateClean();
            regionAndRoomUpdater.TryRebuildDirtyRegionsAndRooms();
            glowGrid.GlowGridUpdate_First();
            lordManager.LordManagerUpdate();
            if (!worldRenderedNow && Find.CurrentMap == this)
            {
                if (AlwaysRedrawShadows)
                {
                    mapDrawer.WholeMapChanged(MapMeshFlag.Things);
                }
                PlantFallColors.SetFallShaderGlobals(this);
                waterInfo.SetTextures();
                avoidGrid.DebugDrawOnMap();
                mapDrawer.MapMeshDrawerUpdate_First();
                powerNetGrid.DrawDebugPowerNetGrid();
                DoorsDebugDrawer.DrawDebug();
                mapDrawer.DrawMapMesh();
                dynamicDrawManager.DrawDynamicThings();
                gameConditionManager.GameConditionManagerDraw(this);
                MapEdgeClipDrawer.DrawClippers(this);
                designationManager.DrawDesignations();
                overlayDrawer.DrawAllOverlays();
                temporaryThingDrawer.Draw();
            }
            try
            {
                areaManager.AreaManagerUpdate();
            }
            catch (Exception ex)
            {
                Log.Error(ex.ToString());
            }
            weatherManager.WeatherManagerUpdate();
            MapComponentUtility.MapComponentUpdate(this);
        }
Example #3
0
        public void MapUpdate()
        {
            bool worldRenderedNow = WorldRendererUtility.WorldRenderedNow;

            Profiler.BeginSample("SkyManagerUpdate()");
            this.skyManager.SkyManagerUpdate();
            Profiler.EndSample();
            Profiler.BeginSample("PowerNetManager.UpdatePowerNetsAndConnections_First()");
            this.powerNetManager.UpdatePowerNetsAndConnections_First();
            Profiler.EndSample();
            Profiler.BeginSample("regionGrid.UpdateClean()");
            this.regionGrid.UpdateClean();
            Profiler.EndSample();
            Profiler.BeginSample("RegionAndRoomUpdater.TryRebuildDirtyRegionsAndRooms()");
            this.regionAndRoomUpdater.TryRebuildDirtyRegionsAndRooms();
            Profiler.EndSample();
            Profiler.BeginSample("glowGrid.GlowGridUpdate_First()");
            this.glowGrid.GlowGridUpdate_First();
            Profiler.EndSample();
            Profiler.BeginSample("LordManagerUpdate()");
            this.lordManager.LordManagerUpdate();
            Profiler.EndSample();
            if (!worldRenderedNow && Find.CurrentMap == this)
            {
                if (Map.AlwaysRedrawShadows)
                {
                    this.mapDrawer.WholeMapChanged(MapMeshFlag.Things);
                }
                Profiler.BeginSample("FallIntensityUpdate");
                GenPlant.SetFallShaderGlobals(this);
                Profiler.EndSample();
                Profiler.BeginSample("waterInfo.SetTextures()");
                this.waterInfo.SetTextures();
                Profiler.EndSample();
                Profiler.BeginSample("FactionsDebugDrawOnMap()");
                Find.FactionManager.FactionsDebugDrawOnMap();
                Profiler.EndSample();
                Profiler.BeginSample("mapDrawer.MapMeshDrawerUpdate_First");
                this.mapDrawer.MapMeshDrawerUpdate_First();
                Profiler.EndSample();
                Profiler.BeginSample("PowerNetGrid.DrawDebugPowerNetGrid()");
                this.powerNetGrid.DrawDebugPowerNetGrid();
                Profiler.EndSample();
                Profiler.BeginSample("DoorsDebugDrawer.DrawDebug()");
                DoorsDebugDrawer.DrawDebug();
                Profiler.EndSample();
                Profiler.BeginSample("mapDrawer.DrawMapMesh");
                this.mapDrawer.DrawMapMesh();
                Profiler.EndSample();
                Profiler.BeginSample("drawManager.DrawDynamicThings");
                this.dynamicDrawManager.DrawDynamicThings();
                Profiler.EndSample();
                Profiler.BeginSample("GameConditionManagerDraw");
                this.gameConditionManager.GameConditionManagerDraw(this);
                Profiler.EndSample();
                Profiler.BeginSample("DrawClippers");
                MapEdgeClipDrawer.DrawClippers(this);
                Profiler.EndSample();
                Profiler.BeginSample("designationManager.DrawDesignations()");
                this.designationManager.DrawDesignations();
                Profiler.EndSample();
                Profiler.BeginSample("OverlayDrawer.DrawAllOverlays()");
                this.overlayDrawer.DrawAllOverlays();
                Profiler.EndSample();
            }
            Profiler.BeginSample("AreaManagerUpdate()");
            try
            {
                this.areaManager.AreaManagerUpdate();
            }
            catch (Exception ex)
            {
                Log.Error(ex.ToString(), false);
            }
            Profiler.EndSample();
            Profiler.BeginSample("WeatherManagerUpdate()");
            this.weatherManager.WeatherManagerUpdate();
            Profiler.EndSample();
            Profiler.BeginSample("MapComponentUpdate()");
            MapComponentUtility.MapComponentUpdate(this);
            Profiler.EndSample();
        }