- type: entity
  id: BaseLandMine
  abstract: true
  components:
  - type: Clickable
  - type: InteractionOutline
  - type: ItemToggle
    soundActivate:
      path: /Audio/Weapons/click.ogg
      params:
        maxDistance: 1
  - type: Pullable
  - type: MovedByPressure
  - type: Physics
    bodyType: Static
    fixedRotation: true
  - type: Fixtures
    fixtures:
      slips:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.2,-0.2,0.2,0.2"
        hard: false
        layer:
          - LowImpassable
  - type: Sprite
    drawdepth: Items
    sprite: Objects/Misc/landmine.rsi
    layers:
    - state: landmine
    - state: landmine-unshaded
      shader: unshaded
      map: [ "enum.ToggleableVisuals.Layer" ]
  - type: Appearance
  - type: GenericVisualizer
    visuals:
      enum.ToggleableVisuals.Enabled:
        enum.ToggleableVisuals.Layer:
          True: {visible: true}
          False: {visible: false}
  - type: Damageable
  - type: Injurable
    damageContainer: Inorganic
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 50
      behaviors:
      - !type:TriggerBehavior
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  - type: LandMine
    sound:
        path: /Audio/Effects/beep_landmine.ogg
        params:
            maxDistance: 10
  - type: Armable
  - type: StepTrigger
    requiredTriggeredSpeed: 0
    stepOn: true

- type: entity
  id: LandMineKickUnarmed
  name: kick mine
  parent: BaseLandMine
  components:
  - type: GhostKickOnTrigger
    targetUser: true
  - type: DeleteOnTrigger

- type: entity
  id: LandMineKick
  suffix: armed
  parent: LandMineKickUnarmed
  components:
  - type: ItemToggle
    activated: true
    onActivate: false
  - type: Armable

- type: entity
  name: modular mine
  description: This bad boy could be packing any number of dangers. Or a bike horn.
  parent: BaseLandMine
  id: LandMineModularUnarmed
  components:
  - type: PayloadCase
  - type: Construction
    graph: ModularMineGraph
    node: emptyCase

- type: entity
  id: LandMineModular
  suffix: armed
  parent: LandMineModularUnarmed
  components:
  - type: ItemToggle
    activated: true
    onActivate: false
  - type: Armable

- type: entity
  name: explosive mine
  parent: BaseLandMine
  id: LandMineExplosiveUnarmed
  components:
  - type: ExplodeOnTrigger
  - type: Explosive
    explosionType: Default
    maxIntensity: 10
    intensitySlope: 3
    totalIntensity: 120 # about a ~4 tile radius
    canCreateVacuum: false

- type: entity
  suffix: armed
  parent: LandMineExplosiveUnarmed
  id: LandMineExplosive
  components:
  - type: ItemToggle
    activated: true
    onActivate: false
  - type: Armable
