# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aiden <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2025 Aidenkrz <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2025 Fishbait <Fishbait@git.ml>
# SPDX-FileCopyrightText: 2025 GoobBot <uristmchands@proton.me>
# SPDX-FileCopyrightText: 2025 Ilya246 <57039557+Ilya246@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Ilya246 <ilyukarno@gmail.com>
# SPDX-FileCopyrightText: 2025 deltanedas <@deltanedas:kde.org>
# SPDX-FileCopyrightText: 2025 fishbait <gnesse@gmail.com>
# SPDX-FileCopyrightText: 2025 unknown <Administrator@DESKTOP-PMRIVVA.kommune.indresogn.no>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  id: BinglePit
  categories: [ Spawner ] # needed so tests don't sus
  name: binglepit
  description: Looks Hungry
  placement:
    mode: SnapgridCenter
  components:
  - type: BinglePit
  - type: StepTrigger
    requiredTriggeredSpeed: 0
    intersectRatio: 0.4
    triggerGroups:
      types:
      - Chasm
  - type: Transform
    anchored: true
  - type: Physics
    bodyType: Static
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.5,-0.5,0.5,0.5"
        layer:
        - WallLayer
        mask:
        - ItemMask
        density: 1000
        hard: false
  - type: Sprite
    drawdepth: FloorTiles
    layers:
    - sprite: _Goobstation/Mobs/Bingle/bingle_pit.rsi
      state: pit
  - type: Appearance
  - type: InteractionOutline
  - type: Clickable
  - type: Damageable
    damageContainer: StructuralInorganic
    damageModifierSet: Metallic
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 600
      behaviors:
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  - type: EmitSoundOnSpawn
    sound:
      path: /Audio/Weapons/Guns/Gunshots/rocket_launcher.ogg
  - type: RequireProjectileTarget
  - type: SolutionContainerManager
    solutions:
      drainBuffer:
        maxVol: 1000
  - type: Drain # remove liquids around pit
    unitsPerSecond: 10
    unitsDestroyedPerSecond: 10
  - type: ExplosionResistance
    damageCoefficient: 0.9 #No more suicide bombers inshallah
  - type: PassiveDamage #passive Healing
    damage:
      types:
        Heat: -1
        Shock: -1
        Structural: -1
      groups:
        Brute: -3
  - type: AntiRottingContainer
  - type: SpawnOnDespawn
    prototype: CrateFunBingleLoot

- type: entity
  id: BinglePitBingleless
  parent: BinglePit
  suffix: no starting
  components:
  - type: BinglePit
    startingBingles: 0
