# SPDX-FileCopyrightText: 2021 ShadowCommander <10494922+ShadowCommander@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 Swept <sweptwastaken@protonmail.com>
# SPDX-FileCopyrightText: 2021 Vera Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 Vera Aguilera Puerto <gradientvera@outlook.com>
# SPDX-FileCopyrightText: 2022 Chris V <HoofedEar@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Martin Petkovski <63034378+martin69420@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Moony <moonheart08@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Morber <14136326+Morb0@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Peptide90 <78795277+Peptide90@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Rane <60792108+Elijahrane@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Visne <39844191+Visne@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 AsikKEsel <115815982+AsikKEsel@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Flareguy <78941145+Flareguy@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Kara <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2023 Nairod <110078045+Nairodian@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 TemporalOroboros <TemporalOroboros@gmail.com>
# SPDX-FileCopyrightText: 2023 deltanedas <39013340+deltanedas@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 deltanedas <@deltanedas:kde.org>
# SPDX-FileCopyrightText: 2023 metalgearsloth <comedian_vs_clown@hotmail.com>
# SPDX-FileCopyrightText: 2024 Boaz1111 <149967078+Boaz1111@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Debug <49997488+DebugOk@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 FungiFellow <151778459+FungiFellow@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 MACMAN2003 <macman2003c@gmail.com>
# SPDX-FileCopyrightText: 2024 Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Piras314 <p1r4s@proton.me>
# SPDX-FileCopyrightText: 2024 brainfood1183 <113240905+brainfood1183@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 gluesniffler <159397573+gluesniffler@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 username <113782077+whateverusername0@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 whateverusername0 <whateveremail>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aiden <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2025 Fishbait <Fishbait@git.ml>
# SPDX-FileCopyrightText: 2025 Ilya246 <57039557+Ilya246@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 fishbait <gnesse@gmail.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  abstract: true
  parent: BaseItem
  id: SheetGlassBase
  name: glass
  description: A sheet of glass, used often on the station in various applications.
  components:
  - type: Sprite
    sprite: Objects/Materials/Sheets/glass.rsi
  - type: Item
    sprite: Objects/Materials/Sheets/glass.rsi
    size: Normal
  - type: StaticPrice
    price: 0
  - type: Tag
    tags:
    - Sheet
    - SheetGlass # Goobstation
    - DroneUsable # Goobstation
  - type: Material
  - type: Damageable
    damageContainer: Inorganic
    damageModifierSet: Glass
  - type: Appearance
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 100
      behaviors:
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
    - trigger:
        !type:DamageTrigger
        damage: 50
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: GlassBreak
          params:
            volume: -4
      - !type:SpawnEntitiesBehavior
        spawn:
          ShardGlass:
            min: 1
            max: 1
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  - type: SolutionContainerManager
    solutions:
      glass:
        canReact: false
  # EE - IPC Healing
  - type: BlindHealing
    damageContainers:
      - Silicon
      - SiliconRadiation # Goobstation - Make IPCs take radiation
  - type: StackPrice
    price: 2

- type: entity
  parent: SheetGlassBase
  id: SheetGlass
  suffix: Full
  components:
  - type: PhysicalComposition
    materialComposition:
      Glass: 100
  - type: Stack
    stackType: Glass
    baseLayer: base
    layerStates:
    - glass
    - glass_2
    - glass_3
  - type: Sprite
    state: glass_3
    layers:
    - state: glass_3
      map: ["base"]
  - type: Item
    heldPrefix: glass
  - type: FloorTile
    outputs:
    - FloorGlass
  - type: Construction
    graph: Glass
    node: SheetGlass
  - type: Extractable
    grindableSolutionName: glass
  - type: SolutionContainerManager
    solutions:
      glass:
        reagents:
        - ReagentId: Silicon
          Quantity: 10

- type: entity
  parent: SheetGlass
  id: SheetGlass10
  suffix: 10
  components:
  - type: Sprite
    state: glass
  - type: Stack
    stackType: Glass
    count: 10

- type: entity
  parent: SheetGlass
  id: SheetGlass1
  suffix: Single
  components:
  - type: Sprite
    state: glass
  - type: Stack
    stackType: Glass
    count: 1

- type: entity
  parent: SheetGlass
  id: SheetGlassLingering0
  suffix: Lingering, 0
  components:
  - type: Stack
    lingering: true
    count: 0

- type: entity
  parent: SheetGlassBase
  id: SheetRGlass
  name: reinforced glass
  description: A reinforced sheet of glass.
  suffix: Full
  components:
  - type: PhysicalComposition
    materialComposition:
      ReinforcedGlass: 100
  - type: Stack
    stackType: ReinforcedGlass
    baseLayer: base
    layerStates:
    - rglass
    - rglass_2
    - rglass_3
  - type: Sprite
    state: rglass_3
    layers:
    - state: rglass_3
      map: ["base"]
  - type: Item
    heldPrefix: rglass
  - type: FloorTile
    outputs:
    - FloorRGlass
  - type: Construction
    graph: Glass
    node: SheetRGlass
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 100
      behaviors:
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
    - trigger:
        !type:DamageTrigger
        damage: 50
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: GlassBreak
          params:
            volume: -4
      - !type:SpawnEntitiesBehavior
        spawn:
          ShardGlassReinforced:
            min: 1
            max: 1
      - !type:DoActsBehavior
        acts: [ "Destruction" ]

- type: entity
  parent: SheetRGlass
  id: SheetRGlass1
  name: reinforced glass
  suffix: Single
  components:
  - type: Sprite
    state: rglass
  - type: Stack
    stackType: ReinforcedGlass
    count: 1
  - type: Extractable
    grindableSolutionName: rglass
  - type: SolutionContainerManager
    solutions:
      rglass:
        reagents:
        - ReagentId: Silicon
          Quantity: 10
        - ReagentId: Iron
          Quantity: 4.5
        - ReagentId: Carbon
          Quantity: 0.5
        canReact: false

- type: entity
  parent: SheetRGlass
  id: SheetRGlassLingering0
  suffix: Lingering, 0
  components:
  - type: Stack
    lingering: true
    count: 0

- type: entity
  parent: SheetGlassBase
  id: SheetPGlass
  name: plasma glass
  description: A sheet of translucent plasma.
  suffix: Full
  components:
  - type: PhysicalComposition
    materialComposition:
      PlasmaGlass: 100
  - type: Stack
    stackType: PlasmaGlass
    baseLayer: base
    layerStates:
    - pglass
    - pglass_2
    - pglass_3
  - type: Sprite
    state: pglass_3
    layers:
    - state: pglass_3
      map: ["base"]
  - type: Item
    heldPrefix: pglass
  - type: Construction
    graph: Glass
    node: SheetPGlass
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 100
      behaviors:
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
    - trigger:
        !type:DamageTrigger
        damage: 50
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: GlassBreak
          params:
            volume: -4
      - !type:SpawnEntitiesBehavior
        spawn:
          ShardGlassPlasma:
            min: 1
            max: 1
      - !type:DoActsBehavior
        acts: [ "Destruction" ]

- type: entity
  parent: SheetPGlass
  id: SheetPGlass1
  name: plasma glass
  suffix: Single
  components:
  - type: Sprite
    state: pglass
  - type: Stack
    stackType: PlasmaGlass
    count: 1
  - type: Extractable
    grindableSolutionName: pglass
  - type: SolutionContainerManager
    solutions:
      pglass:
        reagents:
        - ReagentId: Silicon
          Quantity: 10
        - ReagentId: Plasma
          Quantity: 10
        canReact: false

- type: entity
  parent: SheetPGlass
  id: SheetRPGlass
  name: reinforced plasma glass
  description: A reinforced sheet of translucent plasma.
  suffix: Full
  components:
  - type: PhysicalComposition
    materialComposition:
      ReinforcedPlasmaGlass: 100
  - type: Stack
    stackType: ReinforcedPlasmaGlass
    baseLayer: base
    layerStates:
    - rpglass
    - rpglass_2
    - rpglass_3
  - type: Sprite
    state: rpglass_3
    layers:
    - state: rpglass_3
      map: ["base"]
  - type: Item
    heldPrefix: rpglass
  - type: Construction
    graph: Glass
    node: SheetRPGlass
  - type: Extractable
    grindableSolutionName: rpglass
  - type: SolutionContainerManager
    solutions:
      rpglass:
        reagents:
        - ReagentId: Silicon
          Quantity: 10
        - ReagentId: Plasma
          Quantity: 10
        - ReagentId: Iron
          Quantity: 4.5
        - ReagentId: Carbon
          Quantity: 0.5
        canReact: false

- type: entity
  parent: SheetRPGlass
  id: SheetRPGlass1
  name: reinforced plasma glass
  suffix: Single
  components:
  - type: Sprite
    state: rpglass
  - type: Stack
    stackType: ReinforcedPlasmaGlass
    count: 1

- type: entity
  parent: SheetRPGlass
  id: SheetRPGlassLingering0
  suffix: Lingering, 0
  components:
  - type: Stack
    lingering: true
    count: 0

- type: entity
  parent: SheetGlassBase
  id: SheetUGlass
  name: uranium glass
  description: A sheet of uranium glass.
  suffix: Full
  components:
  - type: PhysicalComposition
    materialComposition:
      UraniumGlass: 100
  - type: Stack
    stackType: UraniumGlass
    baseLayer: base
    layerStates:
    - uglass
    - uglass_2
    - uglass_3
  - type: Sprite
    state: uglass_3
    layers:
    - state: uglass_3
      map: ["base"]
  - type: Item
    heldPrefix: uglass
  - type: Construction
    graph: Glass
    node: SheetUGlass
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 100
      behaviors:
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
    - trigger:
        !type:DamageTrigger
        damage: 50
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: GlassBreak
          params:
            volume: -4
      - !type:SpawnEntitiesBehavior
        spawn:
          ShardGlassUranium:
            min: 1
            max: 1
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  - type: Extractable
    grindableSolutionName: uglass
  - type: SolutionContainerManager
    solutions:
      uglass:
        reagents:
        - ReagentId: Silicon
          Quantity: 10
        - ReagentId: Uranium
          Quantity: 10
        canReact: false

- type: entity
  parent: SheetUGlass
  id: SheetUGlass1
  name: uranium glass
  suffix: Single
  components:
  - type: Sprite
    state: uglass
  - type: Stack
    stackType: UraniumGlass
    count: 1

- type: entity
  parent: SheetUGlass
  id: SheetRUGlass
  name: reinforced uranium glass
  description: A reinforced sheet of uranium.
  components:
  - type: PhysicalComposition
    materialComposition:
      ReinforcedUraniumGlass: 100
  - type: Stack
    stackType: ReinforcedUraniumGlass
    baseLayer: base
    layerStates:
    - ruglass
    - ruglass_2
    - ruglass_3
  - type: Sprite
    state: ruglass_3
    layers:
    - state: ruglass_3
      map: ["base"]
  - type: Item
    heldPrefix: ruglass
  - type: Construction
    graph: Glass
    node: SheetRUGlass
  - type: Extractable
    grindableSolutionName: ruglass
  - type: SolutionContainerManager
    solutions:
      ruglass:
        reagents:
        - ReagentId: Silicon
          Quantity: 10
        - ReagentId: Uranium
          Quantity: 10
        - ReagentId: Iron
          Quantity: 4.5
        - ReagentId: Carbon
          Quantity: 0.5
        canReact: false

- type: entity
  parent: SheetRUGlass
  id: SheetRUGlass1
  name: reinforced uranium glass
  suffix: Single
  components:
  - type: Sprite
    state: ruglass
  - type: Stack
    stackType: ReinforcedUraniumGlass
    count: 1

- type: entity
  parent: SheetGlassBase
  id: SheetClockworkGlass
  name: clockwork glass
  description: A sheet of brass-hardened glass, primarily used by clockwork enthusiasts and remnants of Ratvarian cults.
  suffix: Full
  components:
  - type: PhysicalComposition
    materialComposition:
      BrassGlass: 100
  - type: Stack
    stackType: ClockworkGlass
    baseLayer: base
    layerStates:
    - cglass
    - cglass_2
    - cglass_3
  - type: Sprite
    state: cglass_3
    layers:
    - state: cglass_3
      map: ["base"]
  - type: Item
    heldPrefix: cglass
  - type: Construction
    graph: Glass
    node: SheetClockworkGlass
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 100
      behaviors:
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
    - trigger:
        !type:DamageTrigger
        damage: 50
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: GlassBreak
          params:
            volume: -4
      - !type:SpawnEntitiesBehavior
        spawn:
          ShardGlassClockwork:
            min: 1
            max: 1
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  - type: Extractable
    grindableSolutionName: brassglass
  - type: SolutionContainerManager
    solutions:
      cglass:
        reagents:
        - ReagentId: Silicon
          Quantity: 10
        - ReagentId: Zinc
          Quantity: 3.3
        - ReagentId: Copper
          Quantity: 6.7
        canReact: false

- type: entity
  parent: SheetClockworkGlass
  id: SheetClockworkGlass1
  name: clockwork glass
  suffix: Single
  components:
  - type: Sprite
    state: cglass
  - type: Stack
    stackType: ClockworkGlass
    count: 1
