- type: entity
  parent: CMBarricadeBase
  id: CMBarricadeSandbag
  name: sandbag barricade
  description: A makeshift barricade made out of the sand from the ground. Tough to beat but easy to pierce.
  components:
  - type: BarricadeSandbag
  - type: Climbable
  - type: MeleeSound
    soundGroups:
      Brute:
        path:
          "/Audio/Effects/Footsteps/snowstep1.ogg"
  - type: Sprite
    sprite: _RMC14/Structures/Walls/Barricades/barricade.rsi
    layers:
    - state: DamageOverlay_0
      map: [ "enum.RMCDamageOverlayVisuals.DamageOverlay" ]
      sprite: _RMC14/Structures/Walls/Barricades/sandbag_cracks.rsi
    - map: [ "acided" ]
    drawdepth: WallTops
  - type: GenericVisualizer
    visuals:
      enum.BarbedWireVisualLayers.Wire:
        barbWired:
          UnWired: { state: sandbag_wire, visible: false }
          WiredClosed: { state: sandbag_wire, visible: true }
      enum.SprayAcidedVisuals.Acided:
        acided:
          True:
            sprite: _RMC14/Effects/xeno_spray_acid.rsi
            state: acid
            visible: true
          False:
            visible: false
  - type: Damageable
    damageContainer: Inorganic
    damageModifierSet: CMSandbag
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 1300
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: MetalBreak
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  - type: DamageVisuals
    thresholds: [4, 8, 12]
    damageDivisor: 28.125
    trackAllDamage: true
    overlay: false
    targetLayers:
    - "enum.RMCDamageOverlayVisuals.DamageOverlay"
    hideIfZero: false
    damageGroup: "Brute"
  - type: Barbed
    thornsDamage:
      types:
        Slash: 10
  - type: Physics
  - type: Fixtures
    fixtures:
      fix1:
        shape: !type:PhysShapeAabb
          bounds: "-0.49,-0.45,0.49,-0.55"
        mask:
        - FullTileMask
        layer:
        - WallLayer
        - BulletImpassable
  - type: BarricadeBlock
    bidirectional: true
    blocking: 75
  - type: Appearance
  - type: Flamability
    chance: 0.3
    rate: 0.8
    range: 0.5
    spread: 0.3


- type: entity
  parent: CMBarricadeBase
  id: CMBarricadeHesco
  name: HESCO barricade
  description: A sandbag wall. Provides better protection than a makeshift sandbag barricade, but requires specialized equipment to set up.
  components:
  - type: BarricadeSandbag
  - type: Climbable
  - type: MeleeSound
    soundGroups:
      Brute:
        path:
          "/Audio/Effects/Footsteps/snowstep1.ogg"
  - type: Sprite
    sprite: _RMC14/Structures/Walls/Barricades/barricade.rsi
    layers:
    - state: hesco
      color: "#a98c7c"
    - map: [ "acided" ]
    drawdepth: WallTops
  - type: GenericVisualizer
    visuals:
      enum.BarbedWireVisualLayers.Wire:
      enum.SprayAcidedVisuals.Acided:
        acided:
          True:
            sprite: _RMC14/Effects/xeno_spray_acid.rsi
            state: acid
            visible: true
          False:
            visible: false
  - type: Damageable
    damageContainer: Inorganic
    damageModifierSet: CMHescoBarricade
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 500
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: MetalBreak
      - !type:DoActsBehavior
        acts: [ "Destruction" ]

- type: entity
  parent: BaseItem
  id: CMSandbagEmpty
  name: empty sandbags
  description: Some empty sandbags, best to fill them up if you want to use them.
  components:
  - type: Item
    sprite: _RMC14/Objects/Misc/sandbags.rsi
    inhandVisuals:
      left:
      - state: stack-inhand-left
      right:
      - state: stack-inhand-right
    size: Small
  - type: Sprite
    sprite: _RMC14/Objects/Misc/sandbags.rsi
    layers:
    - state: sandbag_stack
    - map: [ "acided" ]
  - type: EmptySandbag
  - type: Stack
    stackType: CMSandbagEmpty
    count: 1
  - type: Flamability
    chance: 0.7
    rate: 0.2
    range: 0.4
    spread: 0.3

- type: entity
  parent: CMSandbagEmpty
  id: CMSandbagEmpty50
  suffix: "50"
  components:
  - type: Stack
    stackType: CMSandbagEmpty
    count: 50

- type: entity
  parent: CMSandbagEmpty
  id: CMSandbagEmpty25
  suffix: "25"
  components:
  - type: Stack
    stackType: CMSandbagEmpty
    count: 25

- type: entity
  parent: CMSandbagEmpty
  id: CMSandbagEmpty10
  suffix: "10"
  components:
  - type: Stack
    stackType: CMSandbagEmpty
    count: 10

- type: entity
  parent: BaseItem
  id: CMSandbagFull
  name: sandbags
  description: Some bags filled with sand. For now, just cumbersome, but soon to be used for fortifications.
  components:
  - type: Item
    sprite: _RMC14/Objects/Misc/sandbags.rsi
    inhandVisuals:
      left:
      - state: pile-inhand-left
      right:
      - state: pile-inhand-right
    size: Huge
  - type: Sprite
    sprite: _RMC14/Objects/Misc/sandbags.rsi
    layers:
    - state: sandbag_pile
    - map: [ "acided" ]
  - type: FullSandbag
  - type: Stack
    stackType: CMSandbagFull
    count: 1
  - type: Flamability
    chance: 0.2
    rate: 0.1
    range: 0.3
    spread: 0.2
  - type: InteractedBlacklist
    blacklist:
      components:
      - Xeno

- type: entity
  parent: CMSandbagFull
  id: CMSandbagFull50
  suffix: "50"
  components:
  - type: Stack
    stackType: CMSandbagFull
    count: 50

- type: entity
  parent: CMSandbagFull
  id: CMSandbagFull25
  suffix: "25"
  components:
  - type: Stack
    stackType: CMSandbagFull
    count: 25

- type: entity
  parent: CMSandbagFull
  id: CMSandbagFull5
  suffix: "5"
  components:
  - type: Stack
    stackType: CMSandbagFull
    count: 5

- type: stack
  id: CMSandbagEmpty
  name: empty sandbags
  spawn: CMSandbagEmpty
  maxCount: 50

- type: stack
  id: CMSandbagFull
  name: empty sandbags
  spawn: CMSandbagFull
  maxCount: 50

- type: entity
  parent: CMBarricadeSandbag
  id: RMCBarricadeSandbagSoro
  suffix: Brown
  components:
  - type: Sprite
    color: "#a98c7c"
