# SPDX-FileCopyrightText: 2020 Metal Gear Sloth <metalgearsloth@gmail.com>
# SPDX-FileCopyrightText: 2020 Swept <sweptwastaken@protonmail.com>
# SPDX-FileCopyrightText: 2020 chairbender <kwhipke1@gmail.com>
# SPDX-FileCopyrightText: 2021 Pancake <Pangogie@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 Paul Ritter <ritter.paul1@gmail.com>
# SPDX-FileCopyrightText: 2021 Paul Ritter <ritter.paul1@googlemail.com>
# SPDX-FileCopyrightText: 2021 Vera Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Alex Evgrashin <aevgrashin@yandex.ru>
# SPDX-FileCopyrightText: 2022 DrSmugleaf <DrSmugleaf@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Francesco <frafonia@gmail.com>
# SPDX-FileCopyrightText: 2022 Kara <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2022 Mervill <mervills.email@gmail.com>
# SPDX-FileCopyrightText: 2022 Moony <moonheart08@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Peptide90 <78795277+Peptide90@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 ShadowCommander <10494922+ShadowCommander@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 mirrorcult <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2022 themias <89101928+themias@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Cody ~ Aexxie <125095677+Aexxie@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Flareguy <78941145+Flareguy@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 liltenhead <104418166+liltenhead@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-FileCopyrightText: 2025 GoobBot <uristmchands@proton.me>
# SPDX-FileCopyrightText: 2025 Ted Lukin <66275205+pheenty@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Timfa <timfalken@hotmail.com>
# SPDX-FileCopyrightText: 2025 gluesniffler <159397573+gluesniffler@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 pheenty <fedorlukin2006@gmail.com>
#
# SPDX-License-Identifier: MIT

- type: entity
  parent: ClothingHeadBase
  id: ClothingHeadHatHardhatBase
  abstract: true
  components:
  - type: Sprite
    layers:
    - state: icon
    - state: light-icon
      shader: unshaded
      visible: false
      map: [ "light" ]
  - type: Clothing
    equippedPrefix: off
  - type: PointLight
    enabled: false
    mask: /Textures/Effects/LightMasks/cone.png
    autoRot: true
    radius: 7
    netsync: false
  - type: Appearance
  - type: HandheldLight
    addPrefix: false
    blinkingBehaviourId: blinking
    radiatingBehaviourId: radiating
  - type: LightBehaviour
    behaviours:
      - !type:FadeBehaviour
        id: radiating
        interpolate: Linear
        maxDuration: 2.0
        startValue: 3.0
        endValue: 2.0
        isLooped: true
        reverseWhenFinished: true
      - !type:PulseBehaviour
        id: blinking
        interpolate: Nearest
        maxDuration: 1.0
        startValue: 0.1
        endValue: 2.0
        isLooped: true
  - type: ToggleableVisuals
    spriteLayer: light
    inhandVisuals:
      left:
      - state: on-inhand-left
      right:
      - state: on-inhand-right
    clothingVisuals:
      head:
      - state: on-equipped-HELMET
  - type: ItemTogglePointLight
  - type: PowerCellSlot
    cellSlotId: cell_slot
  - type: ItemSlots
    slots:
      cell_slot:
        name: power-cell-slot-component-slot-name-default
        startingItem: PowerCellMedium
  - type: Item
    heldPrefix: off
  - type: ContainerContainer
    containers:
      cell_slot: !type:ContainerSlot
  - type: Tag
    tags:
    - WhitelistChameleon
    - HardHat # Einstein Engines
  - type: Armor
    coverage:
    - Head
    traumaDeductions:
      Dismemberment: 0.1
      OrganDamage: 0.1
      BoneDamage: 0.15
      VeinsDamage: 0
      NerveDamage: 0
    modifiers:
      coefficients:
        Blunt: 0.9
        Slash: 0.9
        Piercing: 0.9
        Heat: 0.9
  - type: HideLayerClothing
    layers:
      Hair: HEAD
      HeadTop: HEAD
      HeadSide: HEAD

- type: entity
  parent: ClothingHeadHatHardhatBase
  id: ClothingHeadHatHardhatBlue
  name: blue hard hat
  description: A hard hat, painted in blue, used in dangerous working conditions to protect the head. Comes with a built-in flashlight.
  components:
  - type: Sprite
    sprite: Clothing/Head/Hardhats/blue.rsi
  - type: Clothing
    sprite: Clothing/Head/Hardhats/blue.rsi

- type: entity
  parent: ClothingHeadHatHardhatBase
  id: ClothingHeadHatHardhatOrange
  name: orange hard hat
  description: A hard hat, painted in orange, used in dangerous working conditions to protect the head. Comes with a built-in flashlight.
  components:
  - type: Sprite
    sprite: Clothing/Head/Hardhats/orange.rsi
  - type: Clothing
    sprite: Clothing/Head/Hardhats/orange.rsi

- type: entity
  parent: ClothingHeadHatHardhatBase
  id: ClothingHeadHatHardhatRed
  name: red hard hat
  description: A hard hat, painted in red, used in dangerous working conditions to protect the head. Comes with a built-in flashlight.
  components:
  - type: Sprite
    sprite: Clothing/Head/Hardhats/red.rsi
  - type: Clothing
    sprite: Clothing/Head/Hardhats/red.rsi

- type: entity
  parent: ClothingHeadHatHardhatBase
  id: ClothingHeadHatHardhatWhite
  name: white hard hat
  description: A hard hat, painted in white, used in dangerous working conditions to protect the head. Comes with a built-in flashlight.
  components:
  - type: Sprite
    sprite: Clothing/Head/Hardhats/white.rsi
  - type: Clothing
    sprite: Clothing/Head/Hardhats/white.rsi

- type: entity
  parent: ClothingHeadHatHardhatBase
  id: ClothingHeadHatHardhatYellow
  name: yellow hard hat
  description: A hard hat, painted in yellow, used in dangerous working conditions to protect the head. Comes with a built-in flashlight.
  components:
  - type: Sprite
    sprite: Clothing/Head/Hardhats/yellow.rsi
  - type: Clothing
    sprite: Clothing/Head/Hardhats/yellow.rsi

- type: entity
  parent: ClothingHeadHatHardhatBase
  id: ClothingHeadHatHardhatYellowDark
  name: dark yellow hard hat
  description: A hard hat, painted in dark yellow, used in dangerous working conditions to protect the head. Comes with a built-in flashlight.
  components:
  - type: Sprite
    sprite: Clothing/Head/Hardhats/dark_yellow.rsi
  - type: Clothing
    sprite: Clothing/Head/Hardhats/dark_yellow.rsi

- type: entity
  parent: ClothingHeadHatHardhatBase
  id: ClothingHeadHatHardhatArmored
  name: armored hard hat
  description: An armored hard hat. Provides the best of both worlds in both protection & utility - perfect for the engineer on the frontlines.
  components:
  - type: Sprite
    sprite: Clothing/Head/Hardhats/armored.rsi
  - type: Clothing
    sprite: Clothing/Head/Hardhats/armored.rsi
  - type: Armor #Copied from the sec helmet, as it's hard to give these sane values without locational damage existing.
    coverage:
    - Head
    traumaDeductions:
      Dismemberment: 0.2
      OrganDamage: 0.2
      BoneDamage: 0.2
      VeinsDamage: 0
      NerveDamage: 0
    modifiers:
      coefficients:
        Blunt: 0.65
        Slash: 0.75
        Piercing: 0.75
        Heat: 0.7
