Пример #1
0
        public static void RegisterGasNet(GasNet newNet)
        {
            Log.Message("Registering a new Gas net with " +
                newNet.transmitters.Count + " Transmitters and " +
                newNet.traders.Count + " Traders");

            allNets.Add(newNet);
            GasNetGrid.Notify_GasNetCreated(newNet);
        }
Пример #2
0
        public static void DeleteGasNet(GasNet oldNet)
        {
            Log.Message("Deleting an old Gas net with " +
                oldNet.transmitters.Count + " Transmitters and " +
                oldNet.traders.Count + " Traders");

            allNets.Remove(oldNet);
            GasNetGrid.Notify_GasNetDeleted(oldNet);
        }
Пример #3
0
 public static void Notify_GasNetDeleted(GasNet deadNet)
 {
     for (int i=0;i<deadNet.transmitters.Count;i++)
     {
         CellRect rect = deadNet.transmitters[i].parent.OccupiedRect();
         for (int j=rect.minZ;j<=rect.maxZ;j++)
         {
             for (int k = rect.minX;k <=rect.maxX;k++)
             {
                 netGrid[CellIndices.CellToIndex(k, j)] = null;
             }
         }
     }
 }
Пример #4
0
 public virtual void ResetGasVars()
 {
     this.transNet = null;
     this.pressureOnInt = false;
     this.transferInt = true;
 }