# SPDX-FileCopyrightText: 2022 Kevin Zheng <kevinz5000@gmail.com>
# SPDX-FileCopyrightText: 2022 Nairod <110078045+Nairodian@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Peptide90 <78795277+Peptide90@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Scribbles0 <91828755+Scribbles0@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Colin-Tel <113523727+Colin-Tel@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 DrSmugleaf <DrSmugleaf@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Ed <96445749+TheShuEd@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Emisse <99158783+Emisse@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Errant <35878406+dmnct@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Flareguy <78941145+Flareguy@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Ubaser <134914314+UbaserB@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Veritius <veritiusgaming@gmail.com>
# SPDX-FileCopyrightText: 2023 metalgearsloth <comedian_vs_clown@hotmail.com>
# SPDX-FileCopyrightText: 2024 Cojoke <83733158+Cojoke-dot@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 EmoGarbage404 <retron404@gmail.com>
# SPDX-FileCopyrightText: 2024 Kara <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2024 Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Plykiya <58439124+Plykiya@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 lzk <124214523+lzk228@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 plykiya <plykiya@protonmail.com>
# SPDX-FileCopyrightText: 2024 starch <starchpersonal@gmail.com>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aidenkrz <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2025 Aviu00 <93730715+Aviu00@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 BramvanZijp <56019239+BramvanZijp@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Killerqu00 <47712032+Killerqu00@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 SX-7 <92227810+SX-7@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 gus <august.eymann@gmail.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  id: JetpackEffect
  categories: [ HideSpawnMenu ]
  components:
  - type: FadingTimedDespawn # Goobstation
    lifetime: 2
    fadeOutTime: 1
  - type: Sprite
    drawdepth: SmallMobs
    noRot: true
    layers:
    - shader: unshaded
      map: ["enum.EffectLayers.Unshaded"]
      sprite: Effects/atmospherics.rsi
      state: frezon_old
  - type: Tag
    tags:
      - HideContextMenu
  - type: AnimationPlayer

- type: entity
  parent: GasTankBase
  abstract: true
  id: BaseJetpack
  name: jetpack
  description: It's a jetpack. It can hold 5 L of gas.
  components:
  - type: Sprite
    sprite: Objects/Tanks/Jetpacks/blue.rsi
    layers:
    - state: icon
      map: ["enum.JetpackVisuals.Layer"]
  - type: Item
    sprite: Objects/Tanks/Jetpacks/blue.rsi
    size: Huge
  - type: UserInterface
    interfaces:
      enum.SharedGasTankUiKey.Key:
        type: GasTankBoundUserInterface
  - type: UseDelay
    delays:
      gasTank:
        length: 1.0
  - type: Clothing
    sprite: Objects/Tanks/Jetpacks/blue.rsi
    quickEquip: false
    slots:
    - Back
  - type: GasTank
    outputPressure: 21.3
    air:
      volume: 5
      temperature: 293.15
  - type: Jetpack
    moleUsage: 0.00085
  - type: Appearance
  - type: GenericVisualizer
    visuals:
      enum.JetpackVisuals.Enabled:
        enum.JetpackVisuals.Layer:
          True: {state: icon-on}
          False: {state: icon}
  - type: StaticPrice
    price: 100

- type: entity
  parent: BaseAction
  id: ActionToggleJetpack
  name: Toggle jetpack
  description: Toggles the jetpack, giving you movement outside the station.
  components:
  - type: Action
    icon:
      sprite: Objects/Tanks/Jetpacks/blue.rsi
      state: icon
    iconOn:
      sprite: Objects/Tanks/Jetpacks/blue.rsi
      state: icon-on
    useDelay: 1.0
  - type: InstantAction
    event: !type:ToggleJetpackEvent

#Empty blue
- type: entity
  id: JetpackBlue
  parent: BaseJetpack
  name: jetpack
  suffix: Empty
  components:
  - type: Sprite
    sprite: Objects/Tanks/Jetpacks/blue.rsi
  - type: Clothing
    sprite: Objects/Tanks/Jetpacks/blue.rsi
    slots:
      - Back

# Filled blue
- type: entity
  id: JetpackBlueFilled
  parent: JetpackBlue
  name: jetpack
  suffix: Filled
  components:
  - type: GasTank
    outputPressure: 42.6
    air:
      # 13 minutes of thrust
      volume: 5
      temperature: 293.15
      moles:
        - 1.025689525 # oxygen
        - 1.025689525 # nitrogen

#Empty black
- type: entity
  id: JetpackBlack
  parent: [BaseJetpack, BaseSyndicateContraband]
  name: jetpack
  suffix: Empty
  components:
  - type: Item
    sprite: Objects/Tanks/Jetpacks/black.rsi
  - type: Sprite
    sprite: Objects/Tanks/Jetpacks/black.rsi
  - type: Clothing
    sprite: Objects/Tanks/Jetpacks/black.rsi
    slots:
      - Back
  - type: StaticPrice
    price: 1000

# Filled black
- type: entity
  id: JetpackBlackFilled
  parent: JetpackBlack
  name: jetpack
  suffix: Filled
  components:
  - type: GasTank
    outputPressure: 42.6
    air:
      # 13 minutes of thrust
      volume: 5
      temperature: 293.15
      moles:
        - 1.025689525 # oxygen
        - 1.025689525 # nitrogen

#Empty captain
- type: entity
  id: JetpackCaptain
  parent: [BaseJetpack, BaseGrandTheftContraband]
  name: captain's jetpack
  suffix: Empty
  components:
  - type: Sprite
    sprite: Objects/Tanks/Jetpacks/captain.rsi
  - type: Clothing
    sprite: Objects/Tanks/Jetpacks/captain.rsi
    slots:
      - Back
      - SuitStorage
  - type: Item
    sprite: Objects/Tanks/Jetpacks/captain.rsi
    size: Normal
  - type: Tag
    tags:
    - HighRiskItem
  - type: StealTarget
    stealGroup: JetpackCaptainFilled

# Filled captain
- type: entity
  id: JetpackCaptainFilled
  parent: JetpackCaptain
  name: captain's jetpack
  suffix: Filled
  components:
  - type: GasTank
    outputPressure: 42.6
    air:
      # 13 minutes of thrust
      volume: 5
      temperature: 293.15
      moles:
        - 1.025689525 # oxygen
        - 1.025689525 # nitrogen

#Empty mini
- type: entity
  id: JetpackMini
  parent: BaseJetpack
  name: mini jetpack
  description: It's a jetpack. It can hold 1.5 L of gas.
  suffix: Empty
  components:
    - type: Item
      size: Normal # goobstation - MINI jetpack
      sprite: Objects/Tanks/Jetpacks/mini.rsi
    - type: Sprite
      sprite: Objects/Tanks/Jetpacks/mini.rsi
    - type: Clothing
      sprite: Objects/Tanks/Jetpacks/mini.rsi
      slots:
        - Back
        - suitStorage
        - Belt
    - type: GasTank
      outputPressure: 42.6
      air:
        volume: 1.5

# Filled mini
- type: entity
  id: JetpackMiniFilled
  parent: JetpackMini
  name: mini jetpack
  suffix: Filled
  components:
  - type: GasTank
    outputPressure: 42.6
    air:
      # 4 minutes of thrust
      volume: 1.5
      temperature: 293.15
      moles:
        - 0.307706858 # oxygen
        - 0.307706858 # nitrogen

#Empty security
- type: entity
  id: JetpackSecurity
  parent: [BaseJetpack, BaseSecurityContraband]
  name: security jetpack
  suffix: Empty
  components:
  - type: Item
    sprite: Objects/Tanks/Jetpacks/security.rsi
  - type: Sprite
    sprite: Objects/Tanks/Jetpacks/security.rsi
  - type: Clothing
    sprite: Objects/Tanks/Jetpacks/security.rsi
    slots:
      - Back

#Filled security
- type: entity
  id: JetpackSecurityFilled
  parent: JetpackSecurity
  name: security jetpack
  suffix: Filled
  components:
  - type: GasTank
    outputPressure: 42.6
    air:
      # 13 minutes thrust
      volume: 5
      temperature: 293.15
      moles:
        - 1.025689525 # oxygen
        - 1.025689525 # nitrogen

#Empty void
- type: entity
  id: JetpackVoid
  parent: BaseJetpack
  name: void jetpack
  suffix: Empty
  components:
  - type: Item
    sprite: Objects/Tanks/Jetpacks/void.rsi
  - type: Sprite
    sprite: Objects/Tanks/Jetpacks/void.rsi
  - type: Clothing
    sprite: Objects/Tanks/Jetpacks/void.rsi
    slots:
      - Back
      - suitStorage
      - Belt

# Filled void
- type: entity
  id: JetpackVoidFilled
  parent: JetpackVoid
  name: void jetpack
  suffix: Filled
  components:
  - type: GasTank
    outputPressure: 42.6
    air:
      # 13 minutes of thrust
      volume: 5
      temperature: 293.15
      moles:
        - 1.025689525 # oxygen
        - 1.025689525 # nitrogen

# Infinite jetpack
- type: entity
  parent: [ JetpackBlack, BaseXenoborgContraband ]
  id: JetpackXenoborg
  name: xenoborg jetpack
  suffix: Infinite
  components:
  - type: GasTank
    outputPressure: 21.3
    air:
      volume: 5
      temperature: 293.15
  - type: Jetpack
    moleUsage: 0
  - type: MovementSpeedModifier
    weightlessAcceleration: 1.3
    weightlessFriction: 0.3
    weightlessModifier: 1
