# SPDX-FileCopyrightText: 2023 Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 AJCM-git <60196617+AJCM-git@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 BombasterDS <115770678+BombasterDS@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ilya246 <57039557+Ilya246@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Kot <1192090+koteq@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Plykiya <58439124+Plykiya@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 plykiya <plykiya@protonmail.com>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# Stack
- type: stack
  id: Fulton
  name: stack-fulton
  icon:
    sprite: /Textures/Objects/Tools/fulton.rsi
    state: extraction_pack
  spawn: Fulton1
  maxCount: 10

# Entities
- type: entity
  id: FultonBeacon
  parent: BaseFoldable
  name: fulton beacon
  description: Beacon to receive fulton extractions.
  components:
    - type: Physics
      bodyType: Dynamic
    - type: Fixtures
      fixtures:
        fix1:
          shape:
            !type:PhysShapeAabb
            bounds: "-0.25,-0.4,0.25,0.1"
          density: 20
          mask:
            - Impassable
    - type: Item
      size: Normal
    - type: Foldable
      folded: true
    - type: Clickable
    - type: InteractionOutline
    - type: FultonBeacon
    - type: Appearance
    - type: GenericVisualizer
      visuals:
        enum.FoldedVisuals.State:
          foldedLayer:
            True: { state: folded_extraction }
            False: { state: extraction_point }
    - type: Sprite
      sprite: Objects/Tools/fulton.rsi
      drawdepth: SmallObjects
      noRot: true
      layers:
        - state: extraction_point
          map: [ "foldedLayer" ]
    - type: PhysicalComposition #Goobstation - Recycle update
      materialComposition:
        Steel: 250
        Glass: 125

- type: entity
  id: Fulton
  parent: BaseItem
  suffix: Full
  name: fulton
  description: Used to extract containers, items, or forcibly recruit people into your base of operations.
  components:
  - type: Fulton
  - type: Item
    size: Normal
  - type: Stack
    stackType: Fulton
    count: 10
  - type: Sprite
    drawdepth: SmallObjects
    sprite: Objects/Tools/fulton.rsi
    state: extraction_pack
  - type: Damageable
    damageContainer: Inorganic
  - type: Destructible
    thresholds:
      - trigger:
          !type:DamageTrigger
          damage: 100
        behaviors:
          - !type:DoActsBehavior
            acts: [ "Destruction" ]
  - type: PhysicalComposition #Goobstation - Recycle update
    materialComposition:
      Steel: 50
      Cloth: 125

- type: entity
  id: Fulton1
  parent: Fulton
  name: fulton
  suffix: One
  components:
  - type: Stack
    count: 1

- type: entity
  id: FultonEffect
  categories: [ HideSpawnMenu ]
  name: fulton effect
  components:
  - type: TimedDespawn
    lifetime: 60
  - type: Sprite
    drawdepth: Effects
    noRot: true
    offset: 0,0.5
    layers:
      - map: [ "enum.FultonVisualLayers.Base" ]
        sprite: Objects/Tools/fulton_balloon.rsi
        state: fulton_balloon
  - type: Tag
    tags:
      - HideContextMenu
  - type: AnimationPlayer
