- type: entity
  abstract: true
  id: GasCanisterBase
  placement:
    mode: SnapgridCenter
  components:
  - type: Clickable
  - type: InteractionOutline
  - type: Physics
  - type: SnapGrid
    offset: Center
  - type: Sprite
  - type: Damageable
  - type: Destructible
    thresholds:
      100:
        behaviors:
        - !type:DoActsBehavior
          acts: ["Destruction"]
  - type: GasCanister
  - type: Anchorable
  - type: Pullable
  - type: UserInterface
  - type: Appearance

- type: entity
  parent: GasCanisterBase
  id: GasCanister
  name: Gas Canister
  description: A canister that can contain any type of gas. It can be attached to connector ports using a wrench.
  components:
  - type: Sprite
    netsync: false
    sprite: Constructible/Atmos/canister.rsi
    state: grey
  - type: Appearance
    visuals:
    - type: GasCanisterVisualizer
      stateConnected: can-connector
      stateO0: can-o0
      stateO1: can-o1
      stateO2: can-o2
      stateO3: can-o3
  - type: UserInterface
    interfaces:
      - key: enum.GasCanisterUiKey.Key
        type: GasCanisterBoundUserInterface
  - type: Physics
    mass: 25
    anchored: false
    shapes:
      - !type:PhysShapeAabb
        bounds: "-0.5,-0.25,0.5,0.25"
        mask:
          - Impassable
          - MobImpassable
          - VaultImpassable
          - SmallImpassable
        layer:
          - Opaque
          - MobImpassable
          - VaultImpassable
          - SmallImpassable

- type: entity
  parent: GasCanister
  id: StorageCanister
  name: Storage Canister
  components:
    - type: Sprite
      sprite: Constructible/Atmos/canister.rsi
      state: yellow # Classic toxins canister
    - type: GasCanister
      gasMixture:
        volume: 1000
        moles: # List of gasses for easy reference
          - 0 # oxygen
          - 0 # nitrogen
          - 0 # CO2
          - 0 # Phoron
          - 0 # Tritium
          - 0 # Water vapor
        temperature: 293.15

# Filled canisters, contain 1871.71051 moles each

- type: entity
  parent: GasCanister
  id: AirCanister
  name: Air Canister
  components:
  - type: Sprite
    sprite: Constructible/Atmos/canister.rsi
    state: grey
  - type: GasCanister
    gasMixture:
      volume: 1000
      moles:
        - 393.0592071 # oxygen 21%
        - 1478.6513029 # nitrogen 79%
      temperature: 293.15

- type: entity
  parent: GasCanister
  id: OxygenCanister
  name: Oxygen Canister
  components:
  - type: Sprite
    sprite: Constructible/Atmos/canister.rsi
    state: blue
  - type: GasCanister
    gasMixture:
      volume: 1000
      moles:
        - 1871.71051 # oxygen
      temperature: 293.15

- type: entity
  parent: GasCanister
  id: NitrogenCanister
  name: Nitrogen Canister
  components:
    - type: Sprite
      sprite: Constructible/Atmos/canister.rsi
      state: red
    - type: GasCanister
      gasMixture:
        volume: 1000
        moles:
          - 0 # oxygen
          - 1871.71051 # nitrogen
        temperature: 293.15

- type: entity
  parent: GasCanister
  id: CarbonDioxideCanister
  name: Carbon Dioxide Canister
  components:
    - type: Sprite
      sprite: Constructible/Atmos/canister.rsi
      state: black
    - type: GasCanister
      gasMixture:
        volume: 1000
        moles:
          - 0 # oxygen
          - 0 # nitrogen
          - 1871.71051 # CO2
        temperature: 293.15

- type: entity
  parent: GasCanister
  id: PhoronCanister
  name: Phoron Canister
  components:
    - type: Sprite
      sprite: Constructible/Atmos/canister.rsi
      state: orange
    - type: GasCanister
      gasMixture:
        volume: 1000
        moles:
          - 0 # oxygen
          - 0 # nitrogen
          - 0 # carbon dioxide
          - 1871.71051 # phoron
        temperature: 293.15

- type: entity
  parent: GasCanister
  id: TritiumCanister
  name: Tritium Canister
  components:
    - type: Sprite
      sprite: Constructible/Atmos/canister.rsi
      state: green
    - type: GasCanister
      gasMixture:
        volume: 1000
        moles:
          - 0 # oxygen
          - 0 # nitrogen
          - 0 # CO2
          - 0 # Phoron
          - 1871.71051 # Tritium
        temperature: 293.15

- type: entity
  parent: GasCanister
  id: WaterVaporCanister
  name: Water Vapor Canister
  components:
    - type: Sprite
      sprite: Constructible/Atmos/canister.rsi
      state: water_vapor
    - type: GasCanister
      gasMixture:
        volume: 1000
        moles:
          - 0 # oxygen
          - 0 # nitrogen
          - 0 # CO2
          - 0 # Phoron
          - 0 # Tritium
          - 1871.71051 # Water vapor
        temperature: 293.15
