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

            // foreach (Thing thing in slotsComp.designatedThings)
            // designation.DesignationDraw();
        }
Ejemplo n.º 2
0
 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);
     }
 }
Ejemplo n.º 3
0
        public override void SelectedUpdate()
        {
            GenUI.RenderMouseoverBracket();

            cachedCellResults.Clear();
            cachedThingResults.Clear();
        }
Ejemplo n.º 4
0
 public override void SelectedUpdate()
 {
     GenUI.RenderMouseoverBracket();
     if (selectedArea != null)
     {
         selectedArea.MarkForDraw();
     }
 }
Ejemplo n.º 5
0
 public override void SelectedUpdate()
 {
     GenUI.RenderMouseoverBracket();
     if (Designator_AreaAllowed.selectedArea != null && Find.WindowStack.FloatMenu == null)
     {
         Designator_AreaAllowed.selectedArea.MarkForDraw();
     }
 }
Ejemplo n.º 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();
 }
Ejemplo n.º 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();
 }
Ejemplo n.º 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();
            //}
        }
Ejemplo n.º 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));
     }
 }
Ejemplo n.º 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();
 }
Ejemplo n.º 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();
 }
Ejemplo n.º 20
0
 public override void SelectedUpdate()
 {
     GenUI.RenderMouseoverBracket();
     GenDraw.DrawNoBuildEdgeLines();
     VisibilityDesignator.PlanningVisibility = true;
 }
 public override void SelectedUpdate()
 {
     GenUI.RenderMouseoverBracket();
     NoFireFightingArea(Map.areaManager).MarkForDraw();
 }
Ejemplo n.º 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();
        }
Ejemplo n.º 23
0
 public override void SelectedUpdate()
 {
     GenUI.RenderMouseoverBracket();
     Map.areaManager.LandingZone().MarkForDraw();
 }
 public override void SelectedUpdate()
 {
     GenUI.RenderMouseoverBracket();
     NoCleaningPlease.Find.AreaCleaning.MarkForDraw();
 }