public void RegisterSteamNet(SteamNet newNet) { allNets.Add(newNet); newNet.steamNetManager = this; map.GetComponent <SteamNetGrid>().Notify_SteamNetCreated(newNet); SteamNetMaker.UpdateVisualLinkagesFor(newNet); }
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]); } } } }
public static SteamNet NewSteamNetStartingFrom(Building root) { return(new SteamNet(SteamNetMaker.ContiguousSteamBuildings(root))); }