# Glass

- type: material
  id: CMGlass
  stackEntity: CMSheetGlass
  name: materials-glass
  icon: { sprite: _RMC14/Objects/Materials/Sheets/glass.rsi, state: glass }
  color: "#a8ccd7"
  price: 0.002

- type: stack
  id: CMGlass
  name: glass
  icon: { sprite: /Textures/_RMC14/Objects/Materials/Sheets/glass.rsi, state: glass }
  spawn: CMSheetGlass
  maxCount: 50

- type: entity
  parent: BaseItem
  id: CMSheetGlassBase
  abstract: true
  components:
  - type: Material
    damageContainer: Inorganic
    damageModifierSet: Glass
  - 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
  - type: Stack
    count: 50
  - type: Sprite
    sprite: _RMC14/Objects/Materials/Sheets/glass.rsi
  - type: Item
    size: Normal
    sprite: _RMC14/Objects/Materials/Sheets/glass.rsi
    inhandVisuals:
      left:
      - state: inhand-left
      right:
      - state: inhand-right
  - type: Appearance
  - type: Tag
    tags:
    - Sheet
    - RMCGlass

- type: entity
  parent: CMSheetGlassBase
  id: CMSheetGlass
  name: glass
  description: Glass is a non-crystalline solid, made out of silicate, the primary constituent of sand. It is valued for its transparency, albeit it is not too resistant to damage.
  suffix: Filled
  components:
  - type: RMCConstructionItem
    buildable:
      - RMCWindowDirectionalBuild
      # Full window
  - type: Material
  - type: PhysicalComposition
    materialComposition:
      CMGlass: 3750
  - type: Stack
    stackType: CMGlass
    count: 50
    baseLayer: base
    layerStates:
      - glass
      - glass_2
      - glass_3
      - glass_4
  - type: Construction
    graph: CMGlass
    node: SheetGlass
  - type: Sprite
    layers:
      - state: glass_4
        map: ["base"]
  - type: UserInterface
    interfaces:
      enum.RMCConstructionUiKey.Key:
        type: RMCConstructionBui

- type: entity
  parent: CMSheetGlass
  id: CMSheetGlass10
  suffix: "10"
  components:
   - type: Sprite
     state: glass_2
   - type: Stack
     stackType: CMGlass
     count: 10

- type: entity
  parent: CMSheetGlass
  id: CMSheetGlass25
  suffix: "25"
  components:
   - type: Sprite
     state: glass_2
   - type: Stack
     stackType: CMGlass
     count: 25

- type: entity
  parent: CMSheetGlass
  id: CMSheetGlass30
  suffix: "30"
  components:
  - type: Sprite
    state: glass_3
  - type: Stack
    stackType: CMGlass
    count: 30

- type: entity
  parent: CMSheetGlass
  id: CMSheetGlass1
  suffix: Single
  components:
  - type: Sprite
    state: glass
  - type: Stack
    stackType: CMGlass
    count: 1


# Glass Reinforced

- type: material
  id: CMReinforcedGlass
  stackEntity: CMSheetGlassReinforced
  name: materials-reinforced-glass
  icon: { sprite: _RMC14/Objects/Materials/Sheets/reinf_glass.rsi, state: rglass }
  color: "#549bb0"
  price: 0.00284

- type: stack
  id: CMGlassReinforced
  name: reinforced glass
  icon: { sprite: /Textures/_RMC14/Objects/Materials/Sheets/reinf_glass.rsi, state: rglass }
  spawn: CMSheetGlassReinforced
  maxCount: 50

- type: entity
  parent: CMSheetGlassBase
  id: CMSheetGlassReinforced
  name: reinforced glass
  description: A sheet of reinforced glass.
  suffix: Filled
  components:
  - type: RMCConstructionItem
    buildable:
      - RMCWindowReinforcedDirectionalBuild
      # Full window
      - RMCWindoorBuild
  - type: Material
  - type: PhysicalComposition
    materialComposition:
      CMSteel: 1875
      CMGlass: 3750
  - type: Sprite
    sprite: _RMC14/Objects/Materials/Sheets/reinf_glass.rsi
    layers:
      - state: rglass_4
        map: ["base"]
  - type: Item
    sprite: _RMC14/Objects/Materials/Sheets/reinf_glass.rsi
    inhandVisuals:
      left:
      - state: inhand-left
      right:
      - state: inhand-right
    heldPrefix: rglass
  - type: Stack
    stackType: CMGlassReinforced
    count: 50
    baseLayer: base
    layerStates:
        - rglass
        - rglass_2
        - rglass_3
        - rglass_4
  - type: Construction
    graph: CMGlass
    node: SheetGlassReinforced
  - type: UserInterface
    interfaces:
      enum.RMCConstructionUiKey.Key:
        type: RMCConstructionBui


- type: entity
  parent: CMSheetGlassReinforced
  id: CMSheetGlassReinforced10
  suffix: "10"
  components:
  - type: Sprite
    state: rglass_2
  - type: Stack
    stackType: CMGlassReinforced
    count: 10

- type: entity
  parent: CMSheetGlassReinforced
  id: CMSheetGlassReinforced30
  suffix: "30"
  components:
  - type: Sprite
    state: rglass_3
  - type: Stack
    stackType: CMGlassReinforced
    count: 30

- type: entity
  parent: CMSheetGlassReinforced
  id: CMSheetGlassReinforced1
  suffix: "1"
  components:
  - type: Sprite
    state: rglass
  - type: Stack
    stackType: CMGlassReinforced
    count: 1


# Phoron glass

- type: material
  id: CMPhoronGlass
  stackEntity: CMSheetGlassPhoron
  name: materials-phoron-glass
  icon: { sprite: _RMC14/Objects/Materials/Sheets/phoron_glass.rsi, state: phoronglass }
  color: "#b35989"
  price: 0.004

- type: stack
  id: CMGlassPhoron
  name: phoron glass
  icon: { sprite: /Textures/_RMC14/Objects/Materials/Sheets/phoron_glass.rsi, state: phoronglass }
  spawn: CMSheetGlassPhoron
  maxCount: 50

- type: entity
  parent: CMSheetGlassBase
  id: CMSheetGlassPhoron
  name: phoron glass
  description: Phoron glass is a silicate-phoron alloy turned into a non-crystalline solid. It is transparent just like glass, even if visibly tainted pink, and very resistant to damage and heat.
  suffix: Filled
  components:
  - type: Material
  - type: PhysicalComposition
    materialComposition:
      CMGlass: 7500
  - type: Sprite
    sprite: _RMC14/Objects/Materials/Sheets/phoron_glass.rsi
    layers:
      - state: phoronglass_4
        map: ["base"]
  - type: Item
    sprite: _RMC14/Objects/Materials/Sheets/phoron_glass.rsi
    inhandVisuals:
      left:
      - state: inhand-left
      right:
      - state: inhand-right
    heldPrefix: phoronglass
  - type: Stack
    stackType: CMGlassPhoron
    count: 50
    baseLayer: base
    layerStates:
        - phoronglass
        - phoronglass_2
        - phoronglass_3
        - phoronglass_4

- type: entity
  parent: CMSheetGlassPhoron
  id: CMSheetGlassPhoron10
  suffix: "10"
  components:
  - type: Sprite
    state: phoronglass_2
  - type: Stack
    stackType: CMGlassPhoron
    count: 10

- type: entity
  parent: CMSheetGlassPhoron
  id: CMSheetGlassPhoron30
  suffix: "30"
  components:
  - type: Sprite
    state: phoronglass_3
  - type: Stack
    stackType: CMGlassPhoron
    count: 30

- type: entity
  parent: CMSheetGlassPhoron
  id: CMSheetGlassPhoron1
  suffix: "1"
  components:
  - type: Sprite
    state: phoronglass
  - type: Stack
    stackType: CMGlassPhoron
    count: 1


# Phoron Reinforced Glass

- type: material
  id: CMPhoronGlassReinforced
  stackEntity: CMSheetGlassPhoronReinforced
  name: materials-reinforced-phoron-glass
  icon: { sprite: _RMC14/Objects/Materials/Sheets/phoron_reinf_glass.rsi, state: phoronrglass }
  color: "#8c4069"
  price: 0.00426

- type: stack
  id: CMGlassPhoronReinforced
  name: reinforced phoron glass
  icon: { sprite: /Textures/_RMC14/Objects/Materials/Sheets/phoron_reinf_glass.rsi, state: phoronrglass }
  spawn: CMSheetGlassPhoronReinforced
  maxCount: 50

- type: entity
  parent: CMSheetGlassBase
  id: CMSheetGlassPhoronReinforced
  name: reinforced phoron glass
  description: A sheet of reinforced phoron glass.
  suffix: Filled
  components:
  - type: Material
  - type: PhysicalComposition
    materialComposition:
      CMSteel: 1875
      CMGlass: 7500
  - type: Sprite
    sprite: _RMC14/Objects/Materials/Sheets/phoron_reinf_glass.rsi
    layers:
      - state: phoronrglass_4
        map: ["base"]
  - type: Item
    sprite: _RMC14/Objects/Materials/Sheets/phoron_reinf_glass.rsi
    inhandVisuals:
      left:
      - state: inhand-left
      right:
      - state: inhand-right
    heldPrefix: phoronrglass
  - type: Stack
    stackType: CMGlassPhoronReinforced
    count: 50
    baseLayer: base
    layerStates:
        - phoronrglass
        - phoronrglass_2
        - phoronrglass_3
        - phoronrglass_4

- type: entity
  parent: CMSheetGlassPhoronReinforced
  id: CMSheetGlassPhoronReinforced10
  suffix: "10"
  components:
  - type: Sprite
    state: phoronrglass_2
  - type: Stack
    stackType: CMGlassPhoronReinforced
    count: 10

- type: entity
  parent: CMSheetGlassPhoronReinforced
  id: CMSheetGlassPhoronReinforced30
  suffix: "30"
  components:
  - type: Sprite
    state: phoronrglass_3
  - type: Stack
    stackType: CMGlassPhoronReinforced
    count: 30

- type: entity
  parent: CMSheetGlassPhoronReinforced
  id: CMSheetGlassPhoronReinforced1
  suffix: "1"
  components:
  - type: Sprite
    state: phoronrglass
  - type: Stack
    stackType: CMGlassPhoronReinforced
    count: 1
