Exemple #1
0
 public void Nortify_UnLinked(Building_LinkableDoor other)
 {
     if (this.linkData.Any())
     {
         this.linkData = CheckAround();
     }
 }
Exemple #2
0
        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);
        }
Exemple #3
0
 public override void SpawnSetup(Map map, bool respawningAfterLoad)
 {
     base.SpawnSetup(map, respawningAfterLoad);
     this.linkData = this.CheckAround();
 }