protected override bool CanDrawNumbersBetween(Thing thing, ThingDef def, IntVec3 a, IntVec3 b, Map map) { if (ThingToInstall != thing) { return(!GenThing.CloserThingBetween(def, a, b, map, ThingToInstall)); } return(false); }
protected virtual bool CanDrawNumbersBetween(Thing thing, ThingDef def, IntVec3 a, IntVec3 b, Map map) { return(!GenThing.CloserThingBetween(def, a, b, map)); }
public static void DrawLinesToNearbyBeacons(ThingDef myDef, IntVec3 myPos, Rot4 myRot, Map map, Thing thing = null) { Vector3 a = GenThing.TrueCenter(myPos, myRot, myDef.size, myDef.Altitude); foreach (Thing item in map.listerThings.ThingsOfDef(ThingDefOf.ShipLandingBeacon)) { if ((thing == null || thing != item) && item.Faction == Faction.OfPlayer) { CompShipLandingBeacon compShipLandingBeacon = item.TryGetComp <CompShipLandingBeacon>(); if (compShipLandingBeacon != null && CanLinkTo(myPos, compShipLandingBeacon) && !GenThing.CloserThingBetween(myDef, myPos, item.Position, map)) { GenDraw.DrawLineBetween(a, item.TrueCenter(), SimpleColor.White); } } } float minEdgeDistance = myDef.GetCompProperties <CompProperties_ShipLandingBeacon>().edgeLengthRange.min - 1f; float maxEdgeDistance = myDef.GetCompProperties <CompProperties_ShipLandingBeacon>().edgeLengthRange.max - 1f; foreach (Thing item2 in map.listerThings.ThingsInGroup(ThingRequestGroup.Blueprint)) { if ((thing == null || thing != item2) && item2.def.entityDefToBuild == myDef && (myPos.x == item2.Position.x || myPos.z == item2.Position.z) && !AlignedDistanceTooShort(myPos, item2.Position, minEdgeDistance) && !AlignedDistanceTooLong(myPos, item2.Position, maxEdgeDistance) && !GenThing.CloserThingBetween(myDef, myPos, item2.Position, map)) { GenDraw.DrawLineBetween(a, item2.TrueCenter(), SimpleColor.White); } } }