コード例 #1
0
 public void RegisterSteamNet(SteamNet newNet)
 {
     allNets.Add(newNet);
     newNet.steamNetManager = this;
     map.GetComponent <SteamNetGrid>().Notify_SteamNetCreated(newNet);
     SteamNetMaker.UpdateVisualLinkagesFor(newNet);
 }
コード例 #2
0
 private void TryCreateNetAt(IntVec3 cell)
 {
     if (!cell.InBounds(map))
     {
         return;
     }
     if (map.GetComponent <SteamNetGrid>().TransmittedSteamNetAt(cell) == null)
     {
         Building transmitter = cell.GetSteamTransmitter(map);
         if (transmitter != null && transmitter.TransmitsSteamNow())
         {
             SteamNet steamNet = SteamNetMaker.NewSteamNetStartingFrom(transmitter);
             RegisterSteamNet(steamNet);
             for (int i = 0; i < steamNet.transmitters.Count; i++)
             {
                 SteamConnectionMaker.ConnectAllConnectorsToTransmitter(steamNet.transmitters[i]);
             }
         }
     }
 }
コード例 #3
0
 public static SteamNet NewSteamNetStartingFrom(Building root)
 {
     return(new SteamNet(SteamNetMaker.ContiguousSteamBuildings(root)));
 }