- type: entity
  id: Window
  name: window
  description: Don't smudge up the glass down there.
  placement:
    mode: SnapgridCenter
    snap:
    - Window
  components:
  - type: Clickable
  - type: RCDDeconstructWhitelist
  - type: InteractionOutline
  - type: Sprite
    color: "#DDDDDD"
    netsync: false
    drawdepth: WallTops
    sprite: Constructible/Structures/Windows/window.rsi
  - type: Icon
    sprite: Constructible/Structures/Windows/window.rsi
    state: full
  - type: Physics
    shapes:
    - !type:PhysShapeAabb
      layer:
      - Impassable
      - MobImpassable
      - VaultImpassable
      - SmallImpassable
  - type: Damageable
    resistances: metallicResistances
  - type: Destructible
    thresholds:
      15:
        behaviors:
        - !type:PlaySoundCollectionBehavior
          soundCollection: GlassBreak
        - !type:SpawnEntitiesBehavior
          spawn:
            ShardGlass:
              min: 1
              max: 2
        - !type:DoActsBehavior
          acts: [ "Destruction" ]
  - type: SnapGrid
    offset: Center
  - type: Airtight
  - type: Window
    base: window
    maxDamage: 15
  - type: Construction
    graph: window
    node: window
  - type: Appearance
    visuals:
    - type: WindowVisualizer

- type: entity
  id: ReinforcedWindow
  name: reinforced window
  parent: Window
  components:
  - type: Sprite
    drawdepth: WallTops
    sprite: Constructible/Structures/Windows/reinforced_window.rsi
  - type: Icon
    sprite: Constructible/Structures/Windows/reinforced_window.rsi
  - type: Damageable
    resistances: metallicResistances
  - type: Destructible
    thresholds:
      75:
        behaviors:
        - !type:PlaySoundCollectionBehavior
          soundCollection: GlassBreak
        - !type:SpawnEntitiesBehavior
          spawn:
            ShardGlassReinforced:
              min: 1
              max: 2
        - !type:DoActsBehavior
          acts: [ "Destruction" ]
  - type: Window
    base: rwindow
    maxDamage: 75
  - type: Construction
    graph: window
    node: reinforcedWindow

- type: entity
  id: PhoronWindow
  name: phoronwindow
  parent: Window
  components:
  - type: Sprite
    drawdepth: WallTops
    sprite: Constructible/Structures/Windows/phoron_window.rsi
  - type: Icon
    sprite: Constructible/Structures/Windows/phoron_window.rsi
  - type: Damageable
    resistances: metallicResistances
  - type: Destructible
    thresholds:
      100:
        behaviors:
        - !type:PlaySoundCollectionBehavior
          soundCollection: GlassBreak
        - !type:SpawnEntitiesBehavior
          spawn:
            ShardGlassPhoron:
              min: 1
              max: 2
        - !type:DoActsBehavior
          acts: [ "Destruction" ]
    resistances: metallicResistances
  - type: Window
    base: pwindow
    maxDamage: 100
  - type: Construction
    graph: window
    node: phoronWindow
