public bool MoveNext() { uint num = (uint)this.$PC; this.$PC = -1; bool flag = false; switch (num) { case 0u: if (!this.parent.Spawned) { return(false); } potentialThings = CompAffectedByFacilities.PotentialThingsToLinkTo(this.parent.def, this.parent.Position, this.parent.Rotation, this.parent.Map); enumerator = potentialThings.GetEnumerator(); num = 4294967293u; break; case 1u: break; default: return(false); } try { switch (num) { } while (enumerator.MoveNext()) { th = enumerator.Current; if (base.CanLinkTo(th)) { this.$current = th; if (!this.$disposing) { this.$PC = 1; } flag = true; return(true); } } } finally { if (!flag) { if (enumerator != null) { enumerator.Dispose(); } } } this.$PC = -1; return(false); }
public static void DrawLinesToPotentialThingsToLinkTo(ThingDef myDef, IntVec3 myPos, Rot4 myRot, Map map) { Vector3 a = Gen.TrueCenter(myPos, myRot, myDef.size, myDef.Altitude); foreach (Thing item in CompAffectedByFacilities.PotentialThingsToLinkTo(myDef, myPos, myRot, map)) { GenDraw.DrawLineBetween(a, item.TrueCenter()); } }