- type: entity
  id: ReinforcedWindow
  name: reinforced window
  parent: [BaseDeltaPressureReinforcedGlass, Window]
  components:
  - type: Sprite
    drawdepth: WallTops
    sprite: Structures/Windows/reinforced_window.rsi
  - type: Icon
    sprite: Structures/Windows/reinforced_window.rsi
  - type: Repairable
    fuelCost: 10
    doAfterDelay: 2
  - type: Damageable
    damageModifierSet: RGlass
  - type: Injurable
    damageContainer: StructuralInorganic
  - type: RCDDeconstructable
    cost: 6
    delay: 6
    fx: EffectRCDDeconstruct6
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 150 #excess damage (nuke?). avoid computational cost of spawning entities.
      behaviors:
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
      - !type:PlaySoundBehavior
        sound:
          collection: WindowShatter
    - trigger:
        !type:DamageTrigger
        damage: 75
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: WindowShatter
      - !type:SpawnEntitiesBehavior
        spawn:
          ShardGlassReinforced:
            min: 1
            max: 2
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  - type: IconSmooth
    base: rwindow
  - type: Construction
    graph: Window
    node: reinforcedWindow
  - type: Appearance
  - type: DamageVisuals
    thresholds: [5, 10, 20]
    damageDivisor: 3
    trackAllDamage: true
    damageOverlay:
      sprite: Structures/Windows/cracks.rsi

- type: entity
  id: WindowReinforcedDirectional
  parent: [BaseDeltaPressureReinforcedGlassQuarter, WindowDirectional]
  name: directional reinforced window
  description: Don't smudge up the glass down there.
  placement:
    mode: SnapgridCenter
    snap:
    - Window
  components:
  - type: Sprite
    sprite: Structures/Windows/directional.rsi
    state: reinforced_window
  - type: Icon
    sprite: Structures/Windows/directional.rsi
    state: reinforced_window
  - type: Construction
    graph: WindowDirectional
    node: windowReinforcedDirectional
  - type: Appearance
  - type: DamageVisuals
    thresholds: [5, 10, 20]
    damageDivisor: 1.5
    trackAllDamage: true
    damageOverlay:
      sprite: Structures/Windows/cracks_directional.rsi
  - type: Damageable
    damageModifierSet: RGlass
  - type: RCDDeconstructable
    cost: 4
    delay: 4
    fx: EffectRCDDeconstruct4
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 75
      behaviors:
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
      - !type:PlaySoundBehavior
        sound:
          collection: WindowShatter
    - trigger:
        !type:DamageTrigger
        damage: 37
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: WindowShatter
      - !type:SpawnEntitiesBehavior
        spawn:
          ShardGlassReinforced:
            min: 1
            max: 1
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  - type: StaticPrice
    price: 22.5

- type: entity
  parent: ReinforcedWindow
  id: ReinforcedWindowDiagonal
  suffix: diagonal
  placement:
    mode: SnapgridCenter
    snap:
    - Window
  components:
  - type: Sprite
    drawdepth: WallTops
    sprite: Structures/Windows/reinforced_window_diagonal.rsi
    state: state0
  - type: Tag
    tags:
    - Diagonal
    - Window
  - type: IconSmooth
    mode: Diagonal
    key: windows
    base: state
  - type: Icon
    sprite: Structures/Windows/reinforced_window_diagonal.rsi
    state: state0
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PolygonShape
            vertices:
            - "-0.5,-0.5"
            - "0.5,0.5"
            - "0.5,-0.5"
        mask:
        - FullTileMask
        layer:
        - GlassLayer
  - type: Airtight
    noAirWhenFullyAirBlocked: false
    airBlockedDirection:
    - South
    - East
  - type: DamageVisuals
    damageOverlay:
      sprite: Structures/Windows/cracks_diagonal.rsi
  - type: Construction
    graph: WindowDiagonal
    node: reinforcedWindowDiagonal
