- type: entity
  id: ScpBaseWindoor
  parent: BaseWindoor
  abstract: true
  placement:
    mode: SnapgridCenter
  components:
  - type: Sprite
    sprite: _Scp/Structures/Doors/Windoors/windoor.rsi

- type: entity
  id: ScpBaseSecureWindoor
  parent: ScpBaseWindoor
  abstract: true
  components:
  - type: Sprite
    sprite: _Scp/Structures/Doors/Windoors/secure_windoor.rsi
    layers:
    - state: closed
      map: [ "enum.DoorVisualLayers.Base" ]
    - state: closed_unlit
      shader: unshaded
      map: [ "enum.DoorVisualLayers.BaseUnlit" ]
      visible: false
    - state: welded
      map: [ "enum.WeldableLayers.BaseWelded" ]
    - state: bolted_unlit
      shader: unshaded
      map: [ "enum.DoorVisualLayers.BaseBolted" ]
    - state: emergency_unlit
      shader: unshaded
      map: [ "enum.DoorVisualLayers.BaseEmergencyAccess" ]
    - state: panel_open
      map: [ "enum.WiresVisualLayers.MaintenancePanel" ]
      visible: false
    - state: electrified_ai
      sprite: Interface/Misc/ai_hud.rsi
      shader: unshaded
      visible: false
      map: [ "enum.ElectrifiedLayers.HUD" ]
    - state: electrified
      sprite: Effects/electricity.rsi
      shader: unshaded
      visible: false
      map: [ "enum.ElectrifiedLayers.Sparks" ]
  - type: Damageable
    damageModifierSet: RGlass
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 600
      behaviors: #excess damage (nuke?). avoid computational cost of spawning entities.
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
    - trigger:
        !type:DamageTrigger
        damage: 400
      behaviors:
      - !type:SpawnEntitiesBehavior
        spawn:
          ShardGlass:
            min: 1
            max: 2
          SheetPlasteel1:
            min: 1
            max: 2
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  - type: Construction
    graph: Windoor
    node: windoorSecure
  - type: StaticPrice
    price: 350
  - type: Tag
    tags:
      - SecureWindoor
      # This tag is used to nagivate the Airlock construction graph. It's needed because the construction graph is shared between Airlock, AirlockGlass, and HighSecDoor

#Plasma Windoors
- type: entity
  id: ScpBasePlasmaWindoor
  parent: ScpBaseWindoor
  abstract: true
  components:
  - type: Sprite
    sprite: _Scp/Structures/Doors/Windoors/plasma.rsi
    layers:
    - state: closed
      map: [ "enum.DoorVisualLayers.Base" ]
    - state: closed_unlit
      shader: unshaded
      map: [ "enum.DoorVisualLayers.BaseUnlit" ]
      visible: false
    - state: welded
      map: [ "enum.WeldableLayers.BaseWelded" ]
    - state: bolted_unlit
      shader: unshaded
      map: [ "enum.DoorVisualLayers.BaseBolted" ]
    - state: emergency_unlit
      shader: unshaded
      map: [ "enum.DoorVisualLayers.BaseEmergencyAccess" ]
    - state: panel_open
      map: [ "enum.WiresVisualLayers.MaintenancePanel" ]
      visible: false
    - state: electrified_ai
      sprite: Interface/Misc/ai_hud.rsi
      shader: unshaded
      visible: false
      map: [ "enum.ElectrifiedLayers.HUD" ]
    - state: electrified
      sprite: Effects/electricity.rsi
      shader: unshaded
      visible: false
      map: [ "enum.ElectrifiedLayers.Sparks" ]
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 480
      behaviors:
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
    - trigger:
        !type:DamageTrigger
        damage: 240
      behaviors:
      - !type:SpawnEntitiesBehavior
        spawn:
          ShardGlassPlasma:
            min: 1
            max: 2
          SheetSteel1:
            min: 1
            max: 2
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  - type: Construction
    graph: Windoor
    node: pwindoor
  - type: StaticPrice
    price: 500
  - type: RadiationBlocker
    resistance: 2

- type: entity
  id: ScpBaseSecurePlasmaWindoor
  parent: ScpBaseSecureWindoor
  abstract: true
  components:
  - type: Sprite
    sprite: _Scp/Structures/Doors/Windoors/secure_plasma.rsi
    layers:
    - state: closed
      map: [ "enum.DoorVisualLayers.Base" ]
    - state: closed_unlit
      shader: unshaded
      map: [ "enum.DoorVisualLayers.BaseUnlit" ]
      visible: false
    - state: welded
      map: [ "enum.WeldableLayers.BaseWelded" ]
    - state: bolted_unlit
      shader: unshaded
      map: [ "enum.DoorVisualLayers.BaseBolted" ]
    - state: emergency_unlit
      shader: unshaded
      map: [ "enum.DoorVisualLayers.BaseEmergencyAccess" ]
    - state: panel_open
      map: [ "enum.WiresVisualLayers.MaintenancePanel" ]
      visible: false
    - state: electrified_ai
      sprite: Interface/Misc/ai_hud.rsi
      shader: unshaded
      visible: false
      map: [ "enum.ElectrifiedLayers.HUD" ]
    - state: electrified
      sprite: Effects/electricity.rsi
      shader: unshaded
      visible: false
      map: [ "enum.ElectrifiedLayers.Sparks" ]
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 800
      behaviors:
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
    - trigger:
        !type:DamageTrigger
        damage: 530
      behaviors:
      - !type:SpawnEntitiesBehavior
        spawn:
          ShardGlassPlasma:
            min: 1
            max: 2
          SheetPlasteel1:
            min: 1
            max: 2
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  - type: Construction
    graph: Windoor
    node: pwindoorSecure
  - type: StaticPrice
    price: 500
  - type: RadiationBlocker
    resistance: 4
  - type: Tag
    tags:
      - SecurePlasmaWindoor
      # This tag is used to nagivate the Airlock construction graph. It's needed because the construction graph is shared between Airlock, AirlockGlass, and HighSecDoor


#Uranium Windoors
- type: entity
  id: ScpBaseUraniumWindoor
  parent: ScpBaseWindoor
  abstract: true
  components:
  - type: Sprite
    sprite: _Scp/Structures/Doors/Windoors/uranium.rsi
    layers:
    - state: closed
      map: [ "enum.DoorVisualLayers.Base" ]
    - state: closed_unlit
      shader: unshaded
      map: [ "enum.DoorVisualLayers.BaseUnlit" ]
      visible: false
    - state: welded
      map: [ "enum.WeldableLayers.BaseWelded" ]
    - state: bolted_unlit
      shader: unshaded
      map: [ "enum.DoorVisualLayers.BaseBolted" ]
    - state: emergency_unlit
      shader: unshaded
      map: [ "enum.DoorVisualLayers.BaseEmergencyAccess" ]
    - state: panel_open
      map: [ "enum.WiresVisualLayers.MaintenancePanel" ]
      visible: false
    - state: electrified_ai
      sprite: Interface/Misc/ai_hud.rsi
      shader: unshaded
      visible: false
      map: [ "enum.ElectrifiedLayers.HUD" ]
    - state: electrified
      sprite: Effects/electricity.rsi
      shader: unshaded
      visible: false
      map: [ "enum.ElectrifiedLayers.Sparks" ]
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 400
      behaviors:
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
    - trigger:
        !type:DamageTrigger
        damage: 240
      behaviors:
      - !type:SpawnEntitiesBehavior
        spawn:
          ShardGlassUranium:
            min: 1
            max: 2
          SheetSteel1:
            min: 1
            max: 2
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  - type: Construction
    graph: Windoor
    node: uwindoor
  - type: StaticPrice
    price: 560
  - type: RadiationBlocker
    resistance: 3

- type: entity
  id: ScpBaseSecureUraniumWindoor
  parent: ScpBaseSecureWindoor
  abstract: true
  components:
  - type: Sprite
    sprite: _Scp/Structures/Doors/Windoors/secure_uranium.rsi
    layers:
    - state: closed
      map: [ "enum.DoorVisualLayers.Base" ]
    - state: closed_unlit
      shader: unshaded
      map: [ "enum.DoorVisualLayers.BaseUnlit" ]
      visible: false
    - state: welded
      map: [ "enum.WeldableLayers.BaseWelded" ]
    - state: bolted_unlit
      shader: unshaded
      map: [ "enum.DoorVisualLayers.BaseBolted" ]
    - state: emergency_unlit
      shader: unshaded
      map: [ "enum.DoorVisualLayers.BaseEmergencyAccess" ]
    - state: panel_open
      map: [ "enum.WiresVisualLayers.MaintenancePanel" ]
      visible: false
    - state: electrified_ai
      sprite: Interface/Misc/ai_hud.rsi
      shader: unshaded
      visible: false
      map: [ "enum.ElectrifiedLayers.HUD" ]
    - state: electrified
      sprite: Effects/electricity.rsi
      shader: unshaded
      visible: false
      map: [ "enum.ElectrifiedLayers.Sparks" ]
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 1200
      behaviors:
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
    - trigger:
        !type:DamageTrigger
        damage: 400
      behaviors:
      - !type:SpawnEntitiesBehavior
        spawn:
          ShardGlassUranium:
            min: 1
            max: 2
          SheetPlasteel1:
            min: 1
            max: 2
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  - type: Construction
    graph: Windoor
    node: uwindoorSecure
  - type: StaticPrice
    price: 750
  - type: RadiationBlocker
    resistance: 5
  - type: Tag
    tags:
      - SecureUraniumWindoor
      # This tag is used to nagivate the Airlock construction graph. It's needed because the construction graph is shared between Airlock, AirlockGlass, and HighSecDoor
