#These are intentionally all very mediocre as locational damage does not exist yet. Without it, armor values will stack in a way that makes it really god damn hard to determine how effective something is, along with making players extremely tanky.
#When it DOES exist, the values here should be totally reworked - probably just port them from SS13.

- type: entity
  parent: ClothingHeadBase
  id: ClothingHeadHelmetBase
  abstract: true
  components:
  - type: Tag
    tags:
    - WhitelistChameleon
  - type: HideLayerClothing
    layers:
      HeadTop : HEAD
      HeadSide : HEAD

- type: entity
  parent: ClothingHeadHelmetBase
  id: ClothingHeadHelmetArmoredBase
  abstract: true
  components:
  - type: Armor #Values seem to let the user survive one extra hit if attacked consistently.
    modifiers:
      coefficients:
        Blunt: 0.9
        Slash: 0.9
        Piercing: 0.9
        Heat: 0.9

#Basic Helmet (Security Helmet)
- type: entity
  parent: [ClothingHeadHelmetArmoredBase, BaseC1Contraband] # Frontier: BaseSecurityContraband<BaseC1Contraband
  id: ClothingHeadHelmetBasic
  name: helmet
  description: Standard security gear. Protects the head from impacts.
  components:
  - type: Sprite
    sprite: Clothing/Head/Helmets/security.rsi
  - type: Clothing
    sprite: Clothing/Head/Helmets/security.rsi
  - type: Tag
    tags:
    - WhitelistChameleon
    - SecurityHelmet
  - type: HideLayerClothing
    layers:
      Hair: HEAD

#Mercenary Helmet
- type: entity
  parent: [ ClothingHeadHelmetArmoredBase, BaseC1Contraband ] # Frontier: BaseMajorContraband<BaseC1Contraband
  id: ClothingHeadHelmetMercenary # Frontier: Merc<Mercenary
  name: mercenary helmet
  description: The combat helmet is commonly used by mercenaries, is strong, light and smells like gunpowder and the jungle.
  components:
  - type: Sprite
    sprite: Clothing/Head/Helmets/merc_helmet.rsi
  - type: Clothing
    sprite: Clothing/Head/Helmets/merc_helmet.rsi
  - type: HideLayerClothing
    layers:
      Hair: HEAD

#SWAT Helmet
- type: entity
  parent: [ClothingHeadHelmetBase, BaseC2ContrabandUnredeemable] # Frontier: BaseSecurityContraband<BaseC2ContrabandUnredeemable
  id: ClothingHeadHelmetSwat
  name: SWAT helmet
  description: An extremely robust helmet, commonly used by paramilitary forces. This one has the Nanotrasen logo emblazoned on the top.
  components:
  - type: Sprite
    sprite: Clothing/Head/Helmets/swat.rsi
  - type: Clothing
    sprite: Clothing/Head/Helmets/swat.rsi
  - type: Armor #This is intentionally not spaceproof, when the time comes to port the values from SS13 this should be buffed from what it was.
    modifiers:
      coefficients:
        Blunt: 0.80
        Slash: 0.80
        Piercing: 0.80
        Heat: 0.80
        Radiation: 0.80
        Caustic: 0.95
  - type: ExplosionResistance
    damageCoefficient: 0.75
  - type: HideLayerClothing
    layers:
      Hair: HEAD

#Syndicate SWAT Helmet
- type: entity
  parent: [BaseC3SyndicateContraband, ClothingHeadHelmetSwat, ContrabandClothing] # Frontier: added ContrabandClothing, BaseC3SyndicateContraband as parent
  id: ClothingHeadHelmetSwatSyndicate
  name: SWAT helmet
  suffix: Syndicate
  description: An extremely robust helmet, commonly used by paramilitary forces. It is adorned in a nefarious red and black stripe pattern.
  components:
  - type: Sprite
    sprite: Clothing/Head/Helmets/swat_syndicate.rsi
  - type: Clothing
    sprite: Clothing/Head/Helmets/swat_syndicate.rsi
  - type: HideLayerClothing
    layers:
      Hair: HEAD

#Light Riot Helmet
- type: entity
  parent: [ClothingHeadHelmetBase, BaseC2ContrabandUnredeemable] # Frontier: BaseSecurityContraband<BaseC2ContrabandUnredeemable
  id: ClothingHeadHelmetRiot
  name: light riot helmet
  description: It's a helmet specifically designed to protect against close range attacks.
  components:
  - type: Sprite
    sprite: Clothing/Head/Helmets/light_riot.rsi
  - type: Clothing
    sprite: Clothing/Head/Helmets/light_riot.rsi
  - type: IngestionBlocker
  - type: Armor
    modifiers:
      coefficients:
        Blunt: 0.8
        Slash: 0.8
        Piercing: 0.95
  - type: HideLayerClothing
    layers:
      Hair: HEAD

#Bombsuit Helmet
- type: entity
  parent: ClothingHeadBase
  id: ClothingHeadHelmetBombSuit
  name: bombsuit helmet
  description: A heavy helmet designed to withstand the pressure generated by a bomb and any fragments the bomb may produce.
  components:
  - type: Sprite
    sprite: Clothing/Head/Helmets/bombsuit.rsi
  - type: Clothing
    sprite: Clothing/Head/Helmets/bombsuit.rsi
  - type: IngestionBlocker
  - type: ExplosionResistance
    damageCoefficient: 0.9
  - type: Armor
    modifiers:
      coefficients:
        Blunt: 0.95
        Slash: 0.95
        Piercing: 0.95
  - type: HideLayerClothing
    layers:
      Hair: HEAD
      Snout: HEAD

#Janitorial Bombsuit Helmet
- type: entity
  parent: ClothingHeadHelmetBombSuit
  id: ClothingHeadHelmetJanitorBombSuit
  name: janitorial bombsuit helmet
  description: A heavy helmet designed to withstand explosions formed from reactions between chemicals.
  categories: [ DoNotMap ]
  components:
  - type: Sprite
    sprite: Clothing/Head/Helmets/janitor_bombsuit.rsi
  - type: Clothing
    sprite: Clothing/Head/Helmets/janitor_bombsuit.rsi
  - type: HideLayerClothing
    layers:
      Hair: HEAD

#Cult Helmet
- type: entity
  parent: [ClothingHeadHelmetBase, BaseC3CultContrabandNoValue, ContrabandClothing] # Frontier: BaseMajorContraband<BaseC3CultContrabandNoValue, ContrabandClothing as parent
  id: ClothingHeadHelmetCult
  name: cult helmet
  description: A robust, evil-looking cult helmet.
  components:
  - type: Sprite
    sprite: Clothing/Head/Helmets/cult.rsi
  - type: Clothing
    sprite: Clothing/Head/Helmets/cult.rsi
  - type: IngestionBlocker
  - type: Armor
    modifiers:
      coefficients:
        Blunt: 0.9
        Slash: 0.8
        Piercing: 0.9
        Heat: 0.9
  - type: HideLayerClothing
    layers:
      Hair: HEAD

#Space Ninja Helmet
- type: entity
  parent: [ClothingHeadEVAHelmetBase, BaseC3ContrabandNoValue, ContrabandClothing] # Frontier: BaseMajorContraband<BaseC3ContrabandNoValue, add ContrabandClothing
  id: ClothingHeadHelmetSpaceNinja
  name: space ninja helmet
  description: What may appear to be a simple black garment is in fact a highly sophisticated nano-weave helmet. Standard issue ninja gear.
  components:
  - type: Sprite
    sprite: Clothing/Head/Helmets/spaceninja.rsi
  - type: Clothing
    sprite: Clothing/Head/Helmets/spaceninja.rsi
  - type: Tag
    tags:
    - WhitelistChameleon
  - type: IngestionBlocker
  - type: IdentityBlocker
  - type: HideLayerClothing
    layers:
      Hair: HEAD
      Snout: HEAD

#Knight Helmet
- type: entity
  parent: ClothingHeadHelmetBase
  id: ClothingHeadHelmetTemplar
  name: knight helmet
  description: Decorative helmet fashioned to resemble the knights of old.
  components:
  - type: Sprite
    sprite: Clothing/Head/Helmets/templar.rsi
  - type: Clothing
    sprite: Clothing/Head/Helmets/templar.rsi
  - type: IngestionBlocker
  - type: IdentityBlocker
  - type: HideLayerClothing
    layers:
      Hair: HEAD

#Thunderdome Helmet
- type: entity
  parent: ClothingHeadHelmetBase
  id: ClothingHeadHelmetThunderdome
  name: thunderdome helmet
  description: Let the battle commence!
  components:
  - type: Sprite
    sprite: Clothing/Head/Helmets/thunderdome.rsi
  - type: Clothing
    sprite: Clothing/Head/Helmets/thunderdome.rsi
  - type: HideLayerClothing
    layers:
      Hair: HEAD

#Wizard Helmet
- type: entity
  parent: [ClothingHeadHelmetBase, ContrabandClothing] # Frontier: added ContrabandClothing as parent
  id: ClothingHeadHelmetWizardHelm
  name: wizard helm
  description: Strange-looking helmet that most certainly belongs to a real magic user.
  components:
  - type: Sprite
    sprite: Clothing/Head/Helmets/wizardhelm.rsi
  - type: Clothing
    sprite: Clothing/Head/Helmets/wizardhelm.rsi
  - type: IngestionBlocker
  - type: IdentityBlocker
  - type: HideLayerClothing
    layers:
      Hair: HEAD

#Fire Helmet
- type: entity
  parent: ClothingHeadLightBase
  id: ClothingHeadHelmetFire
  name: fire helmet
  description: An atmos tech's best friend. Provides some heat resistance and looks cool.
  components:
  - type: Sprite
    sprite: Clothing/Head/Helmets/firehelmet.rsi
  - type: Clothing
    sprite: Clothing/Head/Helmets/firehelmet.rsi
    quickEquip: true
  - type: IngestionBlocker
  - type: TemperatureProtection
    heatingCoefficient: 0.01
    coolingCoefficient: 0.2
  - type: FireProtection
    reduction: 0.15 # not fully sealed so less protection
  - type: IdentityBlocker
  - type: Tag
    tags:
    - WhitelistChameleon
    - FireHelmet
  - type: HideLayerClothing
    layers:
      Hair: HEAD
      Snout: HEAD

#Atmos Fire Helmet
- type: entity
  parent: ClothingHeadLightBase # Frontier: removed BaseEngineeringContraband
  id: ClothingHeadHelmetAtmosFire
  name: atmos fire helmet
  description: An atmos fire helmet, able to keep the user cool in any situation.
  components:
  - type: Sprite
    sprite: Clothing/Head/Helmets/atmos_firehelmet.rsi
  - type: Clothing
    sprite: Clothing/Head/Helmets/atmos_firehelmet.rsi
    quickEquip: true
  - type: IngestionBlocker
  - type: TemperatureProtection
    heatingCoefficient: 0.01
    coolingCoefficient: 0.2
  - type: FireProtection
    reduction: 0.2
  - type: PressureProtection
    highPressureMultiplier: 0.25
    lowPressureMultiplier: 1000
  - type: IdentityBlocker
  - type: Tag
    tags:
    - WhitelistChameleon
    - FireHelmet
    - CorgiWearable
  - type: HideLayerClothing
    layers:
      Hair: HEAD
      Snout: HEAD
  - type: BreathMask

#Chitinous Helmet
- type: entity
  parent: [ ClothingHeadHelmetBase, BaseC3ContrabandNoValue] # Frontier: BaseMajorContraband<BaseC3ContrabandNoValue
  id: ClothingHeadHelmetLing
  name: chitinous helmet
  description: An all-consuming chitinous mass of armor.
  components:
  - type: Sprite
    sprite: Clothing/Head/Helmets/linghelmet.rsi
  - type: Clothing
    sprite: Clothing/Head/Helmets/linghelmet.rsi
  - type: Armor #admeme item so it should be fine being overpowered while helmets are still intentionally kneecapped.
    modifiers:
      coefficients:
        Blunt: 0.5
        Slash: 0.5
        Piercing: 0.5
        Heat: 0.9
  - type: HideLayerClothing
    layers:
      Hair: HEAD

#ERT HELMETS
#ERT Leader Helmet
- type: entity
  parent: [ BaseCentcommContraband, ClothingHeadHelmetArmoredBase ]
  id: ClothingHeadHelmetERTLeader
  name: ERT leader helmet
  description: An in-atmosphere helmet worn by the leader of a Nanotrasen Emergency Response Team. Has blue highlights.
  components:
  - type: Sprite
    sprite: Clothing/Head/Helmets/ert_leader.rsi
  - type: Clothing
    sprite: Clothing/Head/Helmets/ert_leader.rsi
  - type: HideLayerClothing
    layers:
      Hair: HEAD

#ERT Security Helmet
- type: entity
  parent: ClothingHeadHelmetERTLeader
  id: ClothingHeadHelmetERTSecurity
  name: ERT security helmet
  description: An in-atmosphere helmet worn by security members of the Nanotrasen Emergency Response Team. Has red highlights.
  components:
  - type: Sprite
    sprite: Clothing/Head/Helmets/ert_security.rsi
  - type: Clothing
    sprite: Clothing/Head/Helmets/ert_security.rsi
  - type: HideLayerClothing
    layers:
      Hair: HEAD

#ERT Medic Helmet
- type: entity
  parent: ClothingHeadHelmetERTLeader
  id: ClothingHeadHelmetERTMedic
  name: ERT medic helmet
  description: An in-atmosphere helmet worn by medical members of the Nanotrasen Emergency Response Team. Has white highlights.
  components:
  - type: Sprite
    sprite: Clothing/Head/Helmets/ert_medic.rsi
  - type: Clothing
    sprite: Clothing/Head/Helmets/ert_medic.rsi
  - type: HideLayerClothing
    layers:
      Hair: HEAD

#ERT Engineer Helmet
- type: entity
  parent: ClothingHeadHelmetERTLeader
  id: ClothingHeadHelmetERTEngineer
  name: ERT engineer helmet
  description: An in-atmosphere helmet worn by engineering members of the Nanotrasen Emergency Response Team. Has orange highlights.
  components:
  - type: Sprite
    sprite: Clothing/Head/Helmets/ert_engineer.rsi
  - type: Clothing
    sprite: Clothing/Head/Helmets/ert_engineer.rsi
  - type: HideLayerClothing
    layers:
      Hair: HEAD

#ERT Janitor Helmet
- type: entity
  parent: ClothingHeadHelmetERTLeader
  id: ClothingHeadHelmetERTJanitor
  name: ERT janitor helmet
  description: An in-atmosphere helmet worn by janitorial members of the Nanotrasen Emergency Response Team. Has dark purple highlights.
  components:
  - type: Sprite
    sprite: Clothing/Head/Helmets/ert_janitor.rsi
  - type: Clothing
    sprite: Clothing/Head/Helmets/ert_janitor.rsi
  - type: HideLayerClothing
    layers:
      Hair: HEAD

- type: entity
  parent: [ BaseC3SyndicateContraband, ClothingHeadHelmetBase ] # Frontier: BaseSyndicateContraband<BaseC3SyndicateContraband
  id: ClothingHeadHelmetRaid
  name: syndicate raid helmet
  description: An armored helmet for use with the syndicate raid suit. Very stylish.
  components:
  - type: Sprite
    sprite: Clothing/Head/Helmets/syndie-raid.rsi
  - type: Clothing
    sprite: Clothing/Head/Helmets/syndie-raid.rsi
  - type: Armor
    modifiers: #There's gotta be SOME reason to use this over other helmets.
      coefficients:
        Blunt: 0.85
        Slash: 0.85
        Piercing: 0.85
        Heat: 0.85
  - type: HideLayerClothing
    layers:
      Hair: HEAD

#Bone Helmet
#No need to hide the hair on this one
- type: entity
  parent: [ ClothingHeadHelmetArmoredBase, BaseC1Contraband ] # Frontier: BaseMinorContraband<BaseC1Contraband
  id: ClothingHeadHelmetBone
  name: bone helmet
  description: Cool-looking helmet made of skull of your enemies.
  components:
  - type: Sprite
    sprite: Clothing/Head/Helmets/bone_helmet.rsi
  - type: Clothing
    sprite: Clothing/Head/Helmets/bone_helmet.rsi
  - type: Construction
    graph: BoneHelmet
    node: helmet

#Ironclad II Helmet
- type: entity
  parent: [ClothingHeadHelmetArmoredBase, BaseC1Contraband ] # Frontier: BaseMinorContraband<BaseC1Contraband
  id: ClothingHeadHelmetPodWars
  name: ironclad II helmet
  description: An ironclad II helmet, a relic of the pod wars.
  components:
  - type: Sprite
    sprite: Clothing/Head/Helmets/podwars_helmet.rsi
  - type: Clothing
    sprite: Clothing/Head/Helmets/podwars_helmet.rsi
  - type: HideLayerClothing
    layers:
      Hair: HEAD

#Justice Helmet
- type: entity
  parent: [ ClothingHeadHelmetBasic, BaseC2ContrabandUnredeemable ] # Frontier: BaseSecurityContraband<BaseC2ContrabandUnredeemable
  id: ClothingHeadHelmetJustice
  name: justice helm
  description: Advanced security gear. Protects the station from ne'er-do-wells.
  components:
  - type: Sprite
    sprite: Clothing/Head/Helmets/justice.rsi
    layers:
      - state: icon
      - state: icon-light
        visible: false
        shader: unshaded
        map: [ "light" ]
  - type: Appearance
  - type: Clothing
    sprite: Clothing/Head/Helmets/justice.rsi
    equippedPrefix: off
  - type: ItemToggle
    predictable: false # issues between ToggleCellDraw and ItemToggleActiveSound
    onUse: false
    soundActivate:
      path: /Audio/Items/flashlight_on.ogg
    soundDeactivate:
      path: /Audio/Items/flashlight_off.ogg
    soundFailToActivate:
      path: /Audio/Machines/button.ogg
  - type: ItemToggleActiveSound
    activeSound:
      path: /Audio/Effects/Vehicle/policesiren.ogg
      params:
        volume: -4
  - type: UseDelay
    delay: 1.0
  - type: ToggleClothing
    action: ActionToggleJusticeHelm
    mustEquip: false
  - type: ItemTogglePointLight
  - type: ToggleableVisuals
    spriteLayer: light
    clothingVisuals:
      head:
      - state: on-equipped-HELMET
        shader: unshaded
  - type: PointLight
    enabled: false
    radius: 1.4
    energy: 2.5
    color: red
    netsync: false
    mask: /Textures/Effects/LightMasks/double_cone.png
  - type: RotatingLight
    speed: 360
  - type: PowerCellSlot
    cellSlotId: cell_slot
  - type: ContainerContainer
    containers:
      cell_slot: !type:ContainerSlot
  - type: ItemSlots
    slots:
      cell_slot:
        name: power-cell-slot-component-slot-name-default
        startingItem: PowerCellSmall
  - type: PowerCellDraw
    drawRate: 2
  - type: ToggleCellDraw
  - type: Construction
    graph: HelmetJustice
    node: helmet
  - type: HideLayerClothing
    layers:
      Hair: HEAD

- type: entity
  parent: ClothingHeadHelmetJustice
  id: ClothingHeadHelmetJusticeEmpty
  suffix: Empty
  components:
  - type: ItemSlots
    slots:
      cell_slot:
        name: power-cell-slot-component-slot-name-default
  - type: HideLayerClothing
    layers:
      Hair: HEAD

- type: entity
  parent: BaseAction
  id: ActionToggleJusticeHelm
  name: Toggle Justice Helm
  description: Toggles the justice helm on and off.
  components:
  - type: Action
    useDelay: 1
    itemIconStyle: BigItem
  - type: InstantAction
    event: !type:ToggleActionEvent
