- type: entity
  parent: [ BaseStructure, StructureHealthBarrierStrong ]
  id: DeployableBarrier
  name: deployable barrier
  description: A deployable barrier. Swipe your ID card to lock/unlock it.
  components:
  - type: Transform
    anchored: false
    noRot: true
  - type: Sprite
    sprite: Objects/Specific/Security/barrier.rsi
    layers:
    - state: idle
    - state: locked
      map: ["enum.LockVisualLayers.Lock"]
  - type: Appearance
  - type: LockVisuals
  - type: InteractionOutline
  - type: Physics
    bodyType: Dynamic
    canCollide: false
  - type: Fixtures
    fixtures:
      base:
        shape:
          !type:PhysShapeCircle
          radius: 0.45
        density: 75
        mask:
        - MachineMask
      barrier:
        shape:
          !type:PhysShapeCircle
          radius: 0.45
        layer:
        - WallLayer
  - type: DeployableBarrier
    fixture: barrier
  - type: AccessReader
    access: [["Security"]]
  - type: Lock
    locked: false
    lockOnClick: true # toggle lock just by clicking on barrier
    lockTime: 5
    unlockTime: 5
  - type: Damageable
    damageModifierSet: PlasteelStaticMod
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 120
      behaviors:
      - !type:SpawnEntitiesBehavior
        spawn:
          SheetPlasteel1:
            min: 3
            max: 5
      - !type:PlaySoundBehavior
        sound:
          collection: MetalBreak
  - type: PointLight
    enabled: false
    radius: 3
    color: red
  - type: StaticPrice
    price: 200
