示例#1
0
        public static bool MapUpdate(Map __instance)
        {
            SkyManagerUpdate2(__instance);
            __instance.powerNetManager.UpdatePowerNetsAndConnections_First();
            __instance.regionGrid.UpdateClean();
            __instance.regionAndRoomUpdater.TryRebuildDirtyRegionsAndRooms();
            __instance.glowGrid.GlowGridUpdate_First();
            __instance.lordManager.LordManagerUpdate();

            bool worldRenderedNow = WorldRendererUtility.WorldRenderedNow;

            if (!worldRenderedNow && Find.CurrentMap == __instance)
            {
                if (AlwaysRedrawShadows)
                {
                    __instance.mapDrawer.WholeMapChanged(MapMeshFlag.Things);
                }
                PlantFallColors.SetFallShaderGlobals(__instance);
                __instance.waterInfo.SetTextures();
                __instance.avoidGrid.DebugDrawOnMap();

                __instance.mapDrawer.MapMeshDrawerUpdate_First();
                __instance.powerNetGrid.DrawDebugPowerNetGrid();
                DoorsDebugDrawer.DrawDebug();
                __instance.mapDrawer.DrawMapMesh();
                __instance.dynamicDrawManager.DrawDynamicThings();

                __instance.gameConditionManager.GameConditionManagerDraw(__instance);
                MapEdgeClipDrawer.DrawClippers(__instance);
                __instance.designationManager.DrawDesignations();
                __instance.overlayDrawer.DrawAllOverlays();
                __instance.temporaryThingDrawer.Draw();
            }

            try
            {
                __instance.areaManager.AreaManagerUpdate();
            }
            catch (Exception ex)
            {
                Log.Error(ex.ToString());
            }

            __instance.weatherManager.WeatherManagerUpdate();
            MapComponentUtility.MapComponentUpdate(__instance);

            return(false);
        }
示例#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);
        }