- type: entity
  parent: BaseStructure
  id: BaseRailingWood
  abstract: true
  name: railingwood
  description: Basic wooden railing meant to protect idiots like you from falling. This one has some fashion to it.
  components:
  - type: Sprite
    drawdepth: SmallObjects
    sprite: _Sunrise/Structures/Walls/woodenrailing.rsi
  - type: Icon
    sprite: _Sunrise/Structures/Walls/woodenrailing.rsi
  - type: Physics
    bodyType: Static
  - type: InteractionOutline
  - type: Repairable
  - type: Damageable
    damageContainer: StructuralInorganic
    damageModifierSet: Wood
  - type: Climbable
  - type: Construction
    graph: RailingWood
  - type: RCDDeconstructable
    cost: 2
    delay: 2
    fx: EffectRCDDeconstruct2

- type: entity
  parent: BaseRailingWood
  id: RailingWood
  components:
  - type: Sprite
    state: side
  - type: Icon
    state: side
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.49,-0.49,0.49,-0.25"
        density: 1000
        mask:
        - TableMask
        layer:
        - TableLayer
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 100
      behaviors:
        - !type:DoActsBehavior
          acts: [ "Destruction" ]
    - trigger:
        !type:DamageTrigger
        damage: 20
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: WoodDestroy
          params:
            volume: -6
      - !type:SpawnEntitiesBehavior
        spawn:
          MaterialWoodPlank:
            min: 1
            max: 2
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  - type: Construction
    node: railing

- type: entity
  parent: BaseRailingWood
  id: RailingCornerWood
  components:
  - type: Sprite
    state: corner
  - type: Icon
    state: corner
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.49,-0.49,0.49,-0.25"
        density: 1000
        mask:
        - TableMask
        layer:
        - TableLayer
      fix2:
        shape:
          !type:PhysShapeAabb
          bounds: "0.49,0.49,0.25,-0.49"
        density: 1000
        mask:
        - TableMask
        layer:
        - TableLayer
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 100
      behaviors:
        - !type:DoActsBehavior
          acts: [ "Destruction" ]
    - trigger:
        !type:DamageTrigger
        damage: 20
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: WoodDestroy
          params:
            volume: -6
      - !type:SpawnEntitiesBehavior
        spawn:
          MaterialWoodPlank:
            min: 1
            max: 2
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  - type: Construction
    node: railingCorner

- type: entity
  parent: BaseRailingWood
  id: RailingCornerWoodSmall
  components:
  - type: Sprite
    state: corner_small
  - type: Icon
    state: corner_small
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.49,0.49,-0.25,0.25"
        density: 1000
        mask:
        - TableMask
        layer:
        - TableLayer
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 100
      behaviors:
        - !type:DoActsBehavior
          acts: [ "Destruction" ]
    - trigger:
        !type:DamageTrigger
        damage: 20
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: WoodDestroy
          params:
            volume: -6
      - !type:SpawnEntitiesBehavior
        spawn:
          MaterialWoodPlank:
            min: 1
            max: 2
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  - type: Construction
    node: railingCornerSmall

- type: entity
  parent: BaseRailingWood
  id: RailingRoundWood
  components:
  - type: Sprite
    state: round
  - type: Icon
    state: round
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.49,-0.49,0.49,-0.25"
        density: 1000
        mask:
          - TableMask
        layer:
          - TableLayer
      fix2:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.49,-0.49,-0.25,0.49"
        density: 1000
        mask:
          - TableMask
        layer:
          - TableLayer
      fix3:
        shape:
          !type:PhysShapeAabb
          bounds: "0.25,-0.49,0.49,0.49"
        density: 1000
        mask:
          - TableMask
        layer:
          - TableLayer
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 100
      behaviors:
        - !type:DoActsBehavior
          acts: [ "Destruction" ]
    - trigger:
        !type:DamageTrigger
        damage: 20
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: WoodDestroy
          params:
            volume: -6
      - !type:SpawnEntitiesBehavior
        spawn:
          MaterialWoodPlank:
            min: 1
            max: 2
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  - type: Construction
    node: railingRound
