public void Nortify_UnLinked(Building_LinkableDoor other) { if (this.linkData.Any()) { this.linkData = CheckAround(); } }
private LinkData CheckAround() { LinkData result = new LinkData(); for (int i = 0; i < 4; i++) { IntVec3 pos = base.Position + GenAdj.CardinalDirections[i]; Building_LinkableDoor door = base.Map.thingGrid.ThingAt(pos, base.def) as Building_LinkableDoor; if (door != null && door.CanLinkFromOther) { result.linkType = ((i + 2) % 4); result.linkedDoors.Add(door); door.Nortify_Linked(this, i); break; } } return(result); }
public override void SpawnSetup(Map map, bool respawningAfterLoad) { base.SpawnSetup(map, respawningAfterLoad); this.linkData = this.CheckAround(); }