- type: entity
  id: UraniumWindow
  name: uranium window
  parent: WindowRCDResistant
  components:
  - type: Sprite
    drawdepth: WallTops
    sprite: _NF/Structures/Windows/uranium_window.rsi # Frontier
  - type: Icon
    sprite: _NF/Structures/Windows/uranium_window.rsi # Frontier
    state: full
  - type: Damageable
    damageContainer: StructuralInorganic
    damageModifierSet: Glass
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 200
      behaviors:
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
    - trigger:
        !type:DamageTrigger
        damage: 100
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: WindowShatter
      - !type:SpawnEntitiesBehavior
        spawn:
          ShardGlassUranium:
            min: 1
            max: 2
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  - type: IconSmooth
    base: uwindow
  - type: Construction
    graph: Window
    node: uraniumWindow
  - type: Appearance
  - type: DamageVisuals
    thresholds: [5, 10, 20]
    damageDivisor: 3
    trackAllDamage: true
    damageOverlay:
      sprite: Structures/Windows/cracks.rsi
  - type: StaticPrice
    price: 80 # Frontier: 200<80 - TODO: material value rework
  - type: RadiationBlocker
    resistance: 3

- type: entity
  id: UraniumWindowDirectional
  parent: WindowDirectionalRCDResistant
  name: directional uranium window
  description: Don't smudge up the glass down there.
  placement:
    mode: SnapgridCenter
    snap:
    - Window
  components:
  - type: Sprite
    sprite: Structures/Windows/directional.rsi
    state: uranium_window
  - type: Icon
    sprite: Structures/Windows/directional.rsi
    state: uranium_window
  - type: Construction
    graph: WindowDirectional
    node: uraniumWindowDirectional
  - type: Appearance
  - type: DamageVisuals
    thresholds: [5, 10, 20]
    damageDivisor: 1.5
    trackAllDamage: true
    damageOverlay:
      sprite: Structures/Windows/cracks_directional.rsi
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 100
      behaviors:
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
    - trigger:
        !type:DamageTrigger
        damage: 50
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: WindowShatter
      - !type:SpawnEntitiesBehavior
        spawn:
          ShardGlassUranium:
            min: 1
            max: 1
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  - type: StaticPrice
    price: 40 # Frontier: 100<40 - TODO: material value rework
  - type: RadiationBlocker
    resistance: 1.5

- type: entity
  parent: UraniumWindow
  id: UraniumWindowDiagonal
  suffix: diagonal
  placement:
    mode: SnapgridCenter
    snap:
    - Window
  components:
  - type: Sprite
    drawdepth: WallTops
    sprite: _NF/Structures/Windows/uranium_window_diagonal.rsi # Frontier
    state: state0
  - type: Tag
    tags:
    - Diagonal
    - Window
  - type: IconSmooth
    mode: Diagonal
    key: walls # Frontier: windows<walls
    base: state
  - type: Icon
    sprite: _NF/Structures/Windows/uranium_window_diagonal.rsi # Frontier
    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: uraniumWindowDiagonal
