Example #1
0
        // draws selection brackets over designated things
        public override void SelectedUpdate()
        {
            GenUI.RenderMouseoverBracket();

            // foreach (Thing thing in slotsComp.designatedThings)
            // designation.DesignationDraw();
        }
 public override void SelectedUpdate()
 {
     GenDraw.DrawNoBuildEdgeLines();
     if (!ArchitectCategoryTab.InfoRect.Contains(UI.MousePositionOnUIInverted))
     {
         IntVec3 intVec = UI.MouseCell();
         if (this.PlacingDef is TerrainDef)
         {
             GenUI.RenderMouseoverBracket();
             return;
         }
         Color ghostCol;
         if (this.CanDesignateCell(intVec).Accepted)
         {
             ghostCol = new Color(0.5f, 1f, 0.6f, 0.4f);
         }
         else
         {
             ghostCol = new Color(1f, 0f, 0f, 0.4f);
         }
         this.DrawGhost(ghostCol);
         if (this.CanDesignateCell(intVec).Accepted&& this.PlacingDef.specialDisplayRadius > 0.01f)
         {
             GenDraw.DrawRadiusRing(UI.MouseCell(), this.PlacingDef.specialDisplayRadius);
         }
         GenDraw.DrawInteractionCell((ThingDef)this.PlacingDef, intVec, this.placingRot);
     }
 }
Example #3
0
        public override void SelectedUpdate()
        {
            GenUI.RenderMouseoverBracket();

            cachedCellResults.Clear();
            cachedThingResults.Clear();
        }
Example #4
0
 public override void SelectedUpdate()
 {
     GenUI.RenderMouseoverBracket();
     if (selectedArea != null)
     {
         selectedArea.MarkForDraw();
     }
 }
Example #5
0
 public override void SelectedUpdate()
 {
     GenUI.RenderMouseoverBracket();
     if (Designator_AreaAllowed.selectedArea != null && Find.WindowStack.FloatMenu == null)
     {
         Designator_AreaAllowed.selectedArea.MarkForDraw();
     }
 }
Example #6
0
 // Draws the ring.
 public override void SelectedUpdate()
 {
     GenUI.RenderMouseoverBracket();
     GenDraw.DrawNoBuildEdgeLines();
     if (!ArchitectCategoryTab.InfoRect.Contains(UI.MousePositionOnUIInverted))
     {
         GenDraw.DrawRadiusRing(UI.MouseCell(), 6.71f);
     }
 }
 public override void SelectedUpdate()
 {
     GenUI.RenderMouseoverBracket();
     if (Map.areaManager.Get <Area_Labor>() == null)
     {
         Map.areaManager.AllAreas.Add(new Area_Labor(Map.areaManager));
     }
     Map.areaManager.Get <Area_Labor>().MarkForDraw();
 }
Example #8
0
 public override void SelectedUpdate()
 {
     base.SelectedUpdate();
     GenUI.RenderMouseoverBracket();
     OverlayDrawHandler.DrawZonesThisFrame();
     if (Find.Selector.SelectedZone != null)
     {
         GenDraw.DrawFieldEdges(Find.Selector.SelectedZone.Cells);
     }
     GenDraw.DrawNoZoneEdgeLines();
 }
Example #9
0
        public override void SelectedUpdate()
        {
            GenUI.RenderMouseoverBracket();
            MapComponent_PathfinderDirections grid = base.Map.GetComponent <MapComponent_PathfinderDirections>();

            if (grid == null)
            {
                grid = new MapComponent_PathfinderDirections(base.Map);
                base.Map.components.Add(grid);
            }
            grid.MarkForDraw();
        }
        public override void SelectedUpdate()
        {
            GenUI.RenderMouseoverBracket();
            PathAvoidGrid pathAvoidGrid = base.Map.GetComponent <PathAvoidGrid>();
            bool          flag          = pathAvoidGrid == null;

            if (flag)
            {
                pathAvoidGrid = new PathAvoidGrid(base.Map);
                base.Map.components.Add(pathAvoidGrid);
            }
            pathAvoidGrid.MarkForDraw();
        }
        public override void SelectedUpdate()
        {
            GenUI.RenderMouseoverBracket();
            //if ( Find.WindowStack.WindowOfType<Window_SelectPathfinderFillDirections>() == null ) {
            MapComponent_PathfinderDirections grid = base.Map.GetComponent <MapComponent_PathfinderDirections>();

            if (grid == null)
            {
                grid = new MapComponent_PathfinderDirections(base.Map);
                base.Map.components.Add(grid);
            }
            grid.MarkForDraw();
            //}
        }
Example #12
0
 public static void SelectedUpdate(this Designator_Place @this)
 {
     GenDraw.DrawNoBuildEdgeLines();
     if (!ArchitectCategoryTab.InfoRect.Contains(UI.MousePositionOnUIInverted))
     {
         IntVec3 intVec = UI.MouseCell();
         if (@this.PlacingDef is TerrainDef)
         {
             GenUI.RenderMouseoverBracket();
             return;
         }
         Color ghostCol;
         if (@this.CanDesignateCell(intVec).Accepted)
         {
             ghostCol = new Color(0.5f, 1f, 0.6f, 0.4f);
         }
         else
         {
             ghostCol = new Color(1f, 0f, 0f, 0.4f);
         }
         DrawGhost(@this, ghostCol);
         if (@this.CanDesignateCell(intVec).Accepted&& @this.PlacingDef.specialDisplayRadius > 0.01f)
         {
             GenDraw.DrawRadiusRing(UI.MouseCell(), @this.PlacingDef.specialDisplayRadius);
             if ((@this.PlacingDef as ThingDef)?.building?.turretGunDef?.Verbs?.FirstOrDefault()?.requireLineOfSight == true)
             {
                 var   map   = Find.VisibleMap;
                 float range = ((ThingDef)@this.PlacingDef).building.turretGunDef.Verbs[0].range;
                 foreach (var cell in GenRadial.RadialCellsAround(intVec, range, false))
                 {
                     if (GenSight.LineOfSight(intVec, cell, map, true) != GenSight.LineOfSight(cell, intVec, map, true))
                     {
                         CellRenderer.RenderCell(cell, 0f);
                     }
                     if (GenSight.LineOfSight(intVec, cell, map, true))
                     {
                         CellRenderer.RenderCell(cell, 0.6f);
                         continue;
                     }
                 }
             }
         }
         GenDraw.DrawInteractionCell((ThingDef)@this.PlacingDef, intVec, placingRotGet(@this));
     }
 }
Example #13
0
 public override void SelectedUpdate()
 {
     GenDraw.DrawNoBuildEdgeLines();
     if (!ArchitectCategoryTab.InfoRect.Contains(UI.MousePositionOnUIInverted))
     {
         IntVec3 intVec = UI.MouseCell();
         if (PlacingDef is TerrainDef)
         {
             GenUI.RenderMouseoverBracket();
         }
         else
         {
             Color ghostCol = (!CanDesignateCell(intVec).Accepted) ? CannotPlaceColor : CanPlaceColor;
             DrawGhost(ghostCol);
             if (CanDesignateCell(intVec).Accepted&& PlacingDef.specialDisplayRadius > 0.01f)
             {
                 GenDraw.DrawRadiusRing(UI.MouseCell(), PlacingDef.specialDisplayRadius);
             }
             GenDraw.DrawInteractionCell((ThingDef)PlacingDef, intVec, placingRot);
         }
     }
 }
 public override void SelectedUpdate()
 {
     GenUI.RenderMouseoverBracket();
     base.Map.areaManager.NoRoof.MarkForDraw();
     base.Map.areaManager.BuildRoof.MarkForDraw();
 }
 public override void SelectedUpdate()
 {
     GenUI.RenderMouseoverBracket();
     Designator_AreaNoFireFighting.NoFireFightingArea(base.Map.areaManager).MarkForDraw();
 }
Example #16
0
 public override void SelectedUpdate()
 {
     GenUI.RenderMouseoverBracket();
     PriorityGrid.MarkForDraw();
 }
 public override void SelectedUpdate()
 {
     GenUI.RenderMouseoverBracket();
     base.Map.areaManager.SnowClear.MarkForDraw();
 }
 public override void SelectedUpdate()
 {
     GenUI.RenderMouseoverBracket();
     GenDraw.DrawNoBuildEdgeLines();
 }
 public override void SelectedUpdate()
 {
     GenUI.RenderMouseoverBracket();
 }
Example #20
0
 public override void SelectedUpdate()
 {
     GenUI.RenderMouseoverBracket();
     GenDraw.DrawNoBuildEdgeLines();
     VisibilityDesignator.PlanningVisibility = true;
 }
 public override void SelectedUpdate()
 {
     GenUI.RenderMouseoverBracket();
     NoFireFightingArea(Map.areaManager).MarkForDraw();
 }
Example #22
0
        /*public override void PostPlace(Map map, BuildableDef def, IntVec3 loc, Rot4 rot)
         * {
         * }*/

        public override void DrawGhost(ThingDef def, IntVec3 center, Rot4 rot)
        {
            GenUI.RenderMouseoverBracket();
        }
Example #23
0
 public override void SelectedUpdate()
 {
     GenUI.RenderMouseoverBracket();
     Map.areaManager.LandingZone().MarkForDraw();
 }
 public override void SelectedUpdate()
 {
     GenUI.RenderMouseoverBracket();
     NoCleaningPlease.Find.AreaCleaning.MarkForDraw();
 }