Exemplo n.º 1
0
 public void RegisterWaterNet(WaterNet newNet)
 {
     allNets.Add(newNet);
     newNet.waterNetManager = this;
     map.GetComponent <WaterNetGrid>().Notify_WaterNetCreated(newNet);
     WaterNetMaker.UpdateVisualLinkagesFor(newNet);
 }
Exemplo n.º 2
0
 private void TryCreateNetAt(IntVec3 cell)
 {
     if (!cell.InBounds(map))
     {
         return;
     }
     if (map.GetComponent <WaterNetGrid>().TransmittedWaterNetAt(cell) == null)
     {
         Building transmitter = cell.GetWaterTransmitter(map);
         if (transmitter != null && transmitter.TransmitsWaterNow())
         {
             WaterNet waterNet = WaterNetMaker.NewWaterNetStartingFrom(transmitter);
             RegisterWaterNet(waterNet);
             for (int i = 0; i < waterNet.transmitters.Count; i++)
             {
                 WaterConnectionMaker.ConnectAllConnectorsToTransmitter(waterNet.transmitters[i]);
             }
         }
     }
 }
 public static WaterNet NewWaterNetStartingFrom(Building root)
 {
     return(new WaterNet(WaterNetMaker.ContiguousWaterBuildings(root)));
 }