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); }
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); }
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; } } } }
public virtual void ResetGasVars() { this.transNet = null; this.pressureOnInt = false; this.transferInt = true; }