- type: entity
  id: CollideFloorTrap
  abstract: true
  placement:
    mode: SnapgridCenter
  components:
    - type: Sprite
      sprite: Tiles/Misc/floortrap.rsi
      state: floortrap
    - type: Fixtures
      fixtures:
        floortrap:
          shape:
            !type:PhysShapeAabb
            bounds: "-0.4,-0.4,0.4,0.4"
          hard: false
          mask:
            - ItemMask
          layer:
            - SlipLayer
    - type: Physics
    - type: Tag
      tags:
        - HideContextMenu

- type: entity
  parent: CollideFloorTrap
  id: CollideFloorTrapSpawn
  name: floor trap spawn
  abstract: true
  components:
    - type: Sprite
      sprite: Tiles/Misc/floortrap.rsi
      state: floortrapspawn

- type: entity
  parent: CollideFloorTrap
  id: FloorTrapExplosion
  name: explosion floor trap
  components:
    - type: TriggerOnCollide
      fixtureID: floortrap
      maxTriggers: 1
    - type: ExplodeOnTrigger
    - type: Explosive
      explosionType: Default
      totalIntensity: 20.0
      intensitySlope: 5
      maxIntensity: 4
    - type: DeleteOnTrigger

- type: entity
  parent: CollideFloorTrap
  id: FloorTrapEMP
  name: EMP floor trap
  components:
    - type: TriggerOnCollide
      fixtureID: floortrap
      maxTriggers: 1
    - type: EmpOnTrigger
      range: 2
      energyConsumption: 5000
    - type: DeleteOnTrigger

- type: entity
  parent: CollideFloorTrapSpawn
  id: SpawnFloorTrapCarp
  suffix: Carp
  components:
    - type: TriggerOnCollide
      fixtureID: floortrap
      maxTriggers: 1
    - type: SpawnOnTrigger
      proto: MobCarp
    - type: DeleteOnTrigger

- type: entity
  parent: CollideFloorTrapSpawn
  id: SpawnFloorTrapBear
  suffix: Bear
  components:
    - type: TriggerOnCollide
      fixtureID: floortrap
      maxTriggers: 1
    - type: SpawnOnTrigger
      proto: MobBearSpace
    - type: DeleteOnTrigger

- type: entity
  parent: CollideFloorTrapSpawn
  id: SpawnFloorTrapKangaroo
  suffix: Kangaroo
  components:
    - type: TriggerOnCollide
      fixtureID: floortrap
      maxTriggers: 1
    - type: SpawnOnTrigger
      proto: MobKangarooSpace
    - type: DeleteOnTrigger

- type: entity
  parent: CollideFloorTrapSpawn
  id: SpawnFloorTrapXenoDrone
  suffix: Xeno. Drone
  components:
    - type: TriggerOnCollide
      fixtureID: floortrap
      maxTriggers: 1
  # begin starcup: add burrowing ability
    - type: EmitSoundOnTrigger
      sound:
        path: /Audio/_starcup/Effects/Burrowing/burrow_off_large.ogg
      positional: true
      predicted: true
  # end starcup
    - type: SpawnOnTrigger
      proto: MobXenoDrone
    - type: DeleteOnTrigger
  # begin starcup: add burrowing ability
    - type: Sprite
      noRot: true
      sprite: _starcup/Mobs/Special/burrowed_large.rsi
      drawdepth: FloorObjects
      layers:
      - state: burrowed1
        map: ["random"]
    - type: RandomSprite
      available:
      - random:
          burrowed1: ""
          burrowed2: ""
          burrowed3: ""
          burrowed4: ""
  # end starcup

- type: entity
  parent: CollideFloorTrapSpawn
  id: SpawnFloorTrapXenoBurrower
  suffix: Xeno. Burrower
  components:
    - type: TriggerOnCollide
      fixtureID: floortrap
      maxTriggers: 1
  # begin starcup: add burrowing ability
    - type: EmitSoundOnTrigger
      sound:
        path: /Audio/_starcup/Effects/Burrowing/burrow_off_large.ogg
      positional: true
      predicted: true
  # end starcup
    - type: SpawnOnTrigger
      proto: MobXeno
    - type: DeleteOnTrigger
  # begin starcup: add burrowing ability
    - type: Sprite
      noRot: true
      sprite: _starcup/Mobs/Special/burrowed_large.rsi
      drawdepth: FloorObjects
      layers:
      - state: burrowed1
        map: ["random"]
    - type: RandomSprite
      available:
      - random:
          burrowed1: ""
          burrowed2: ""
          burrowed3: ""
          burrowed4: ""
  # end starcup
