- type: entity
  parent: ReinforcedWindow
  id: XenoResinWindow
  name: resin window
  description: Transparent and hardened, yet slightly sticky to the touch. Slightly stronger than a normal reinforced window.
  components:
  - type: Sprite
    drawdepth: WallTops
    sprite: Structures/Windows/xeno_resin.rsi
  - type: Icon
    sprite: Structures/Windows/xeno_resin.rsi
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 200 #excess damage (nuke?). avoid computational cost of spawning entities.
      behaviors:
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
      - !type:PlaySoundBehavior
        sound:
          collection: WindowShatter
    - trigger:
        !type:DamageTrigger
        damage: 100
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: WindowShatter
      - !type:SpawnEntitiesBehavior
        spawn:
          ShardGlassReinforced:
            min: 1
            max: 2
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  - type: IconSmooth
    base: xwindow
  - type: DamageVisuals
    thresholds: [5, 10, 20]
    damageDivisor: 4
    trackAllDamage: true
    damageOverlay:
      sprite: Structures/Windows/cracks.rsi
