Esempio n. 1
0
 public void Register(Region reg)
 {
     if (this.regions[0] == reg || this.regions[1] == reg)
     {
         Log.Error("Tried to double-register region " + reg.ToString() + " in " + this);
     }
     else if (this.RegionA == null || !this.RegionA.valid)
     {
         this.RegionA = reg;
     }
     else if (this.RegionB == null || !this.RegionB.valid)
     {
         this.RegionB = reg;
     }
     else
     {
         Log.Error("Could not register region " + reg.ToString() + " in link " + this + ": > 2 regions on link!\nRegionA: " + this.RegionA.DebugString + "\nRegionB: " + this.RegionB.DebugString);
     }
 }
Esempio n. 2
0
 public void Register(Region reg)
 {
     if (regions[0] == reg || regions[1] == reg)
     {
         Log.Error("Tried to double-register region " + reg.ToString() + " in " + this);
     }
     else if (RegionA == null || !RegionA.valid)
     {
         RegionA = reg;
     }
     else if (RegionB == null || !RegionB.valid)
     {
         RegionB = reg;
     }
     else
     {
         Log.Error(string.Concat("Could not register region ", reg.ToString(), " in link ", this, ": > 2 regions on link!\nRegionA: ", RegionA.DebugString, "\nRegionB: ", RegionB.DebugString));
     }
 }
 public void Register(Region reg)
 {
     if (this.regions[0] == reg || this.regions[1] == reg)
     {
         Log.Error(string.Concat(new object[]
         {
             "Tried to double-register region ",
             reg.ToString(),
             " in ",
             this
         }), false);
         return;
     }
     if (this.RegionA == null || !this.RegionA.valid)
     {
         this.RegionA = reg;
     }
     else if (this.RegionB == null || !this.RegionB.valid)
     {
         this.RegionB = reg;
     }
     else
     {
         Log.Error(string.Concat(new object[]
         {
             "Could not register region ",
             reg.ToString(),
             " in link ",
             this,
             ": > 2 regions on link!\nRegionA: ",
             this.RegionA.DebugString,
             "\nRegionB: ",
             this.RegionB.DebugString
         }), false);
     }
 }
Esempio n. 4
0
 private void QueueNewOpenRegion(Region region)
 {
     if (region == null)
     {
         Log.ErrorOnce("Tried to queue null region.", 881121, false);
         return;
     }
     if (region.reachedIndex == this.reachedIndex)
     {
         Log.ErrorOnce("Region is already reached; you can't open it. Region: " + region.ToString(), 719991, false);
         return;
     }
     this.openQueue.Enqueue(region);
     region.reachedIndex = this.reachedIndex;
     this.numRegionsOpened++;
 }
 private void QueueNewOpenRegion(Region region)
 {
     if (region.closedIndex[closedArrayPos] == closedIndex)
     {
         throw new InvalidOperationException("Region is already closed; you can't open it. Region: " + region.ToString());
     }
     open.Enqueue(region);
     region.closedIndex[closedArrayPos] = closedIndex;
 }
Esempio n. 6
0
 private void QueueNewOpenRegion(Region region)
 {
     if (region.closedIndex[this.closedArrayPos] == this.closedIndex)
     {
         throw new InvalidOperationException("Region is already closed; you can't open it. Region: " + region.ToString());
     }
     if (region.extentsClose.Area <= 4)
     {
         this.open.PushFront(region);
     }
     else
     {
         this.open.PushBack(region);
     }
     region.closedIndex[this.closedArrayPos] = this.closedIndex;
 }
Esempio n. 7
0
 private void QueueNewOpenRegion(Region region)
 {
     if (region == null)
     {
         Log.ErrorOnce("Tried to queue null region.", 881121);
     }
     else if (region.reachedIndex == reachedIndex)
     {
         Log.ErrorOnce("Region is already reached; you can't open it. Region: " + region.ToString(), 719991);
     }
     else
     {
         openQueue.Enqueue(region);
         region.reachedIndex = reachedIndex;
         numRegionsOpened++;
     }
 }