# SPDX-FileCopyrightText: 2021 Kara D <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2021 Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 metalgearsloth <comedian_vs_clown@hotmail.com>
# SPDX-FileCopyrightText: 2021 mirrorcult <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2022 Jacob Tong <10494922+ShadowCommander@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Peptide90 <78795277+Peptide90@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ilya246 <57039557+Ilya246@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 MACMAN2003 <macman2003c@gmail.com>
# SPDX-FileCopyrightText: 2024 Sphiral <145869023+SphiraI@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 chromiumboy <50505512+chromiumboy@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 lzk <124214523+lzk228@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  id: WindoorAssembly
  name: windoor assembly
  description: It opens, it closes, and you can see through it!
  parent: BaseStructure
  components:
  - type: InteractionOutline
  - type: Sprite
    sprite: Structures/Doors/Windoors/windoor.rsi
    layers:
    - state: assembly
  - type: Physics
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.49,-0.49,0.49,-0.2"
        density: 40
        mask:
        - Impassable
        - HighImpassable
  - type: Anchorable
  - type: Pullable
  - type: Rotatable
  - type: Damageable
    damageContainer: StructuralInorganic
    damageModifierSet: Metallic
  - type: RCDDeconstructable
    cost: 6
    delay: 8
    fx: EffectRCDDeconstruct8
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 300
      behaviors:
      - !type:DoActsBehavior
        acts: ["Destruction"]
      - !type:SpawnEntitiesBehavior
        spawn:
          SheetSteel1:
            min: 1
            max: 3
  - type: Construction
    graph: Windoor
    node: assembly
  placement:
    mode: SnapgridCenter

- type: entity
  id: WindoorAssemblySecure
  name: secure windoor assembly
  description: It opens, it closes, and you can see through it! This one looks tough.
  parent: WindoorAssembly
  components:
  - type: Sprite
    sprite: Structures/Doors/Windoors/windoor.rsi
    layers:
    - state: secure_underlay
    - state: assembly
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 600
      behaviors:
      - !type:DoActsBehavior
        acts: ["Destruction"]
      - !type:SpawnEntitiesBehavior
        spawn:
          SheetPlasteel1:
            min: 1
            max: 2
  - type: Construction
    graph: Windoor
    node: assemblySecure

- type: entity
  id: WindoorAssemblyClockwork
  name: clockwork windoor assembly
  description: It opens, it closes, and you can see through it! This one looks tough.
  parent: WindoorAssembly
  components:
  - type: Sprite
    sprite: Structures/Doors/Windoors/clockwork_windoor.rsi
    layers:
    - state: open
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 450
      behaviors:
      - !type:DoActsBehavior
        acts: ["Destruction"]
      - !type:SpawnEntitiesBehavior
        spawn:
          SheetBrass1:
            min: 1
            max: 2
  - type: Construction
    graph: Windoor
    node: assemblyClockwork

#plasma windoor assemblies
- type: entity
  id: WindoorAssemblyPlasma
  name: plasma windoor assembly
  description: It opens, it closes, and you can see through it! This one looks purp-, no, pink. Wait...
  parent: WindoorAssembly
  components:
  - type: Sprite
    sprite: Structures/Doors/Windoors/plasma.rsi
    layers:
    - state: assembly
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 360
      behaviors:
      - !type:DoActsBehavior
        acts: ["Destruction"]
      - !type:SpawnEntitiesBehavior
        spawn:
          SheetSteel1:
            min: 1
            max: 2
          SheetPGlass1:
            min: 1
            max: 3
  - type: Construction
    graph: Windoor
    node: pglass

- type: entity
  id: WindoorAssemblySecurePlasma
  name: secure plasma windoor assembly
  description: It opens, it closes, and you can see through it! This one looks strong and pin-, no, purple. Hold on...
  parent: WindoorAssembly
  components:
  - type: Sprite
    sprite: Structures/Doors/Windoors/plasma.rsi
    layers:
    - state: secure_underlay
    - state: assembly
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 1200
      behaviors:
      - !type:DoActsBehavior
        acts: ["Destruction"]
      - !type:SpawnEntitiesBehavior
        spawn:
          SheetPlasteel1:
            min: 1
            max: 2
          SheetRPGlass1:
            min: 1
            max: 3
  - type: Construction
    graph: Windoor
    node: pglassSecure

#uranium windoor assemblies
- type: entity
  id: WindoorAssemblyUranium
  name: uranium windoor assembly
  description: It opens, it closes, and you can see through it! This one looks sickly green...
  parent: WindoorAssembly
  components:
  - type: Sprite
    sprite: Structures/Doors/Windoors/uranium.rsi
    layers:
    - state: assembly
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 300
      behaviors:
      - !type:DoActsBehavior
        acts: ["Destruction"]
      - !type:SpawnEntitiesBehavior
        spawn:
          SheetSteel1:
            min: 1
            max: 2
          SheetUGlass1:
            min: 1
            max: 3
  - type: Construction
    graph: Windoor
    node: uglass

- type: entity
  id: WindoorAssemblySecureUranium
  name: secure uranium windoor assembly
  description: It opens, it closes, and you can see through it! This one looks strong and radioactive-lime-green!
  parent: WindoorAssembly
  components:
  - type: Sprite
    sprite: Structures/Doors/Windoors/uranium.rsi
    layers:
    - state: secure_underlay
    - state: assembly
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 1200
      behaviors:
      - !type:DoActsBehavior
        acts: ["Destruction"]
      - !type:SpawnEntitiesBehavior
        spawn:
          SheetPlasteel1:
            min: 1
            max: 2
          SheetRUGlass1:
            min: 1
            max: 3
  - type: Construction
    graph: Windoor
    node: uglassSecure
