public override void PostDrawExtraSelectionOverlays() { if (this.radiationRadius > 0) { GenDraw.DrawCircleOutline(this.parent.Position.ToVector3Shifted(), this.radiationRadius, SimpleColor.Green); } }
public static void DrawForItem(Thing item) { var mgr = HaulExplicitly.GetManager(item.Map); HaulExplicitlyPosting posting = mgr.PostingWithItem(item); if (posting == null) { return; } //draw line Vector3 start = item.Position.ToVector3ShiftedWithAltitude(alt); Vector3 circle_center = posting.center; circle_center.y = alt; Vector3 line_vector = circle_center - start; if (line_vector.magnitude > posting.visualization_radius) { line_vector = line_vector.normalized * (line_vector.magnitude - posting.visualization_radius); GenDraw.DrawLineBetween(start, start + line_vector); } if (postings_drawn_this_frame.Contains(posting.id)) { return; } postings_drawn_this_frame.Add(posting.id); //draw circle GenDraw.DrawCircleOutline(circle_center, posting.visualization_radius); }
public override void DrawGhost(ThingDef def, IntVec3 center, Rot4 rot, Color ghostCol, Thing thing = null) { CompProperties_ProjectileInterceptor compProperties = def.GetCompProperties <CompProperties_ProjectileInterceptor>(); if (compProperties != null) { GenDraw.DrawCircleOutline(center.ToVector3Shifted(), compProperties.radius); } }
public override void DrawGhost(ThingDef def, IntVec3 center, Rot4 rot, Color ghostCol, Thing thing = null) { base.DrawGhost(def, center, rot, ghostCol); SimpleColor circleColor = SimpleColor.Red; if (ghostCol == Designator_Place.CanPlaceColor) { circleColor = SimpleColor.Green; } GenDraw.DrawCircleOutline(center.ToVector3Shifted() + new Vector3(0, AltitudeLayer.MetaOverlays.AltitudeFor(), 3).RotatedBy(rot.AsAngle), 1.5f, circleColor); }
public static void TargetHighlighterUpdate() { for (int i = 0; i < arrowPositions.Count; i++) { GenDraw.DrawArrowPointingAt(arrowPositions[i]); } arrowPositions.Clear(); for (int j = 0; j < circleOverlays.Count; j++) { GenDraw.DrawCircleOutline(circleOverlays[j].First, circleOverlays[j].Second); } circleOverlays.Clear(); }
public override void DrawExtraSelectionOverlays() { base.DrawExtraSelectionOverlays(); GenDraw.DrawCircleOutline(GreenhouseCell.ToVector3Shifted(), 0.45f, SimpleColor.Cyan); var room = GreenhouseRoom; if (GetRoomError(room) != null) { return; } cells.Clear(); cells.AddRange(room.Cells); cells.Add(Position); GenDraw.DrawFieldEdges(cells, Color.green); }