Пример #1
0
 public void Register(VehicleRegion reg)
 {
     if (regions[0] == reg || regions[1] == reg)
     {
         Log.Error(string.Concat(new object[]
         {
             "Tried to double-register water region ",
             reg.ToString(), " in ", this
         }));
         return;
     }
     if (RegionA is null || !RegionA.valid)
     {
         RegionA = reg;
     }
Пример #2
0
 private void QueueNewOpenRegion(VehicleRegion 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;
 }