- type: entity
  parent: GasPipeBase
  abstract: true
  id: GasBinaryBase
  placement:
    mode: SnapgridCenter
  components:
  - type: AtmosDevice
  - type: SubFloorHide
    blockInteractions: false
    blockAmbience: false
  - type: NodeContainer
    nodes:
      inlet:
        !type:PipeNode
        nodeGroupID: Pipe
        pipeDirection: North
      outlet:
        !type:PipeNode
        nodeGroupID: Pipe
        pipeDirection: South

- type: entity
  parent: GasBinaryBase
  id: GasPressurePump
  name: gas pump
  description: A pump that moves gas by pressure.
  placement:
    mode: SnapgridCenter
  components:
  - type: Sprite
    netsync: false
    sprite: Structures/Piping/Atmospherics/pump.rsi
    layers:
    - sprite: Structures/Piping/Atmospherics/pipe.rsi
      state: pipeStraight
      map: [ "enum.PipeColorVisualizer+Layers.Pipe" ]
    - state: pumpPressure
      map: [ "enum.SubfloorLayers.FirstLayer", "enum.PressurePumpVisualizer+Layers.Enabled" ]
  - type: Appearance
    visuals:
    - type: PipeColorVisualizer
    - type: PressurePumpVisualizer
      disabledState: pumpPressure
      enabledState: pumpPressureOn
  - type: GasPressurePump
  - type: UserInterface
    interfaces:
      - key: enum.GasPressurePumpUiKey.Key
        type: GasPressurePumpBoundUserInterface
  - type: Construction
    graph: GasBinary
    node: pressurepump
  - type: AmbientSound
    enabled: false
    volume: -9
    range: 5
    sound:
      path: /Audio/Ambience/Objects/gas_pump.ogg

- type: entity
  parent: GasBinaryBase
  id: GasVolumePump
  name: volumetric gas pump
  description: A pump that moves gas by volume.
  placement:
    mode: SnapgridCenter
  components:
    - type: Sprite
      netsync: false
      sprite: Structures/Piping/Atmospherics/pump.rsi
      layers:
        - sprite: Structures/Piping/Atmospherics/pipe.rsi
          state: pipeStraight
          map: [ "enum.PipeColorVisualizer+Layers.Pipe" ]
        - state: pumpVolume
          map: [ "enum.SubfloorLayers.FirstLayer", "enum.PressurePumpVisualizer+Layers.Enabled" ]
    - type: Appearance
      visuals:
        - type: PipeColorVisualizer
        - type: PressurePumpVisualizer
          disabledState: pumpVolume
          enabledState: pumpVolumeOn
    - type: GasVolumePump
    - type: UserInterface
      interfaces:
        - key: enum.GasVolumePumpUiKey.Key
          type: GasVolumePumpBoundUserInterface
    - type: Construction
      graph: GasBinary
      node: volumepump
    - type: AmbientSound
      enabled: false
      volume: -9
      range: 5
      sound:
        path: /Audio/Ambience/Objects/gas_pump.ogg

- type: entity
  parent: GasBinaryBase
  id: GasPassiveGate
  name: passive gate
  description: A one-way air valve that does not require power.
  placement:
    mode: SnapgridCenter
  components:
    - type: Sprite
      netsync: false
      sprite: Structures/Piping/Atmospherics/pump.rsi
      layers:
        - sprite: Structures/Piping/Atmospherics/pipe.rsi
          state: pipeStraight
          map: [ "enum.PipeColorVisualizer+Layers.Pipe" ]
        - state: pumpPassiveGate
          map: [ "enum.SubfloorLayers.FirstLayer" ]
    - type: Appearance
      visuals:
        - type: PipeColorVisualizer
    - type: GasPassiveGate
    - type: Construction
      graph: GasBinary
      node: passivegate
    - type: AmbientSound
      enabled: true
      volume: -9
      range: 5
      sound:
        path: /Audio/Ambience/Objects/gas_hiss.ogg

- type: entity
  parent: GasBinaryBase
  id: GasValve
  name: manual valve
  description: A pipe with a valve that can be used to disable the flow of gas through it.
  placement:
    mode: SnapgridCenter
  components:
    # TODO ATMOS: Give unique sprite.
    - type: Sprite
      netsync: false
      sprite: Structures/Piping/Atmospherics/pump.rsi
      layers:
        - sprite: Structures/Piping/Atmospherics/pipe.rsi
          state: pipeStraight
          map: [ "enum.PipeColorVisualizer+Layers.Pipe" ]
        - state: pumpManualValve
          map: [ "enum.SubfloorLayers.FirstLayer", "enum.GasValveVisualizer+Layers.Enabled" ]
    - type: Appearance
      visuals:
        - type: PipeColorVisualizer
        - type: GasValveVisualizer
          disabledState: pumpManualValve
          enabledState: pumpManualValveOn
    - type: GasValve
    - type: NodeContainer
      nodes:
        inlet:
          !type:PipeNode
          nodeGroupID: Pipe
          pipeDirection: North
          volume: 100
        outlet:
          !type:PipeNode
          nodeGroupID: Pipe
          pipeDirection: South
          volume: 100
    - type: Construction
      graph: GasBinary
      node: valve
    - type: AmbientSound
      enabled: false
      volume: -9
      range: 5
      sound:
        path: /Audio/Ambience/Objects/gas_hiss.ogg

- type: entity
  parent: GasBinaryBase
  id: GasPort
  name: connector port
  description: For connecting portable devices related to atmospherics control.
  placement:
    mode: SnapgridCenter
  components:
    - type: Sprite
      netsync: false
      sprite: Structures/Piping/Atmospherics/gascanisterport.rsi
      layers:
        - sprite: Structures/Piping/Atmospherics/pipe.rsi
          state: pipeHalf
          map: [ "enum.PipeColorVisualizer+Layers.Pipe" ]
        - state: gasCanisterPort
          map: [ "enum.SubfloorLayers.FirstLayer" ]
    - type: Appearance
      visuals:
        - type: PipeColorVisualizer
    - type: GasPort
    - type: NodeContainer
      nodes:
        connected:
          !type:PortPipeNode
          nodeGroupID: Pipe
          pipeDirection: South
    - type: Construction
      graph: GasBinary
      node: port

- type: entity
  parent: GasUnaryBase
  id: GasDualPortVentPump
  name: dual-port air vent
  description: Has a valve and a pump attached to it. There are two ports.
  placement:
    mode: SnapgridCenter
  components:
    - type: Sprite
      drawdepth: FloorObjects
      netsync: false
      sprite: Structures/Piping/Atmospherics/vent.rsi
      layers:
        - sprite: Structures/Piping/Atmospherics/pipe.rsi
          state: pipeStraight
          map: [ "enum.PipeColorVisualizer+Layers.Pipe" ]
        - state: vent_off
          map: [ "enum.VentVisualLayers.Vent", "enum.SubfloorLayers.FirstLayer" ]
    - type: Appearance
      visuals:
        - type: PipeColorVisualizer
        - type: VentPumpVisualizer
    - type: GasVentPump
    - type: Construction
      graph: GasBinary
      node: dualportventpump
