# SPDX-FileCopyrightText: 2021 Paul Ritter <ritter.paul1@gmail.com>
# SPDX-FileCopyrightText: 2021 Paul Ritter <ritter.paul1@googlemail.com>
# SPDX-FileCopyrightText: 2021 Swept <sweptwastaken@protonmail.com>
# SPDX-FileCopyrightText: 2021 Vera Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 xRiriq <94037592+xRiriq@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 xRiriq <xRiriq.git@gmail.com>
# SPDX-FileCopyrightText: 2022 CommieFlowers <rasmus.cedergren@hotmail.com>
# SPDX-FileCopyrightText: 2022 DrSmugleaf <DrSmugleaf@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Fishfish458 <47410468+Fishfish458@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 Rane <60792108+Elijahrane@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 ShadowCommander <10494922+ShadowCommander@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 fishfish458 <fishfish458>
# SPDX-FileCopyrightText: 2022 mirrorcult <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2022 rolfero <45628623+rolfero@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Cody ~ Aexxie <125095677+Aexxie@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Doru991 <75124791+Doru991@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Gotimanga <127038462+Gotimanga@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 LankLTE <135308300+LankLTE@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Puro <103608145+PuroSlavKing@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 cOrigin <96662984+c0rigin@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 potato1234_x <79580518+potato1234x@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 AJCM <AJCM@tutanota.com>
# SPDX-FileCopyrightText: 2024 Aiden <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2024 Alex Evgrashin <aevgrashin@yandex.ru>
# SPDX-FileCopyrightText: 2024 Alex Pavlenko <diraven@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Alice "Arimah" Heurlin <30327355+arimah@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 ArkiveDev <95712736+ArkiveDev@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Boaz1111 <149967078+Boaz1111@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Brandon Hu <103440971+Brandon-Huu@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Chief-Engineer <119664036+Chief-Engineer@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Cojoke <83733158+Cojoke-dot@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Debug <49997488+DebugOk@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Doomsdrayk <robotdoughnut@comcast.net>
# SPDX-FileCopyrightText: 2024 DrEnzyme <DrEnzyme@gmail.com>
# SPDX-FileCopyrightText: 2024 DrSmugleaf <10968691+DrSmugleaf@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ed <96445749+TheShuEd@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Elysium206 <151651971+Elysium206@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Emisse <99158783+Emisse@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Eoin Mcloughlin <helloworld@eoinrul.es>
# SPDX-FileCopyrightText: 2024 Errant <35878406+Errant-4@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Flareguy <78941145+Flareguy@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Floofi <126319569+Shadowtheprotogen546@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ghagliiarghii <68826635+Ghagliiarghii@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 HS <81934438+HolySSSS@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 IProduceWidgets <107586145+IProduceWidgets@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 K-Dynamic <20566341+K-Dynamic@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Kevin Zheng <kevinz5000@gmail.com>
# SPDX-FileCopyrightText: 2024 Killerqu00 <47712032+Killerqu00@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ko4ergaPunk <62609550+Ko4ergaPunk@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 MetalSage <74924875+MetalSage@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 MetalSage <metalsage.official@gmail.com>
# SPDX-FileCopyrightText: 2024 MilenVolf <63782763+MilenVolf@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Mr. 27 <45323883+Dutch-VanDerLinde@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 MureixloI <132683811+MureixloI@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 PJBot <pieterjan.briers+bot@gmail.com>
# SPDX-FileCopyrightText: 2024 Partmedia <kevinz5000@gmail.com>
# SPDX-FileCopyrightText: 2024 Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
# SPDX-FileCopyrightText: 2024 Plykiya <58439124+Plykiya@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Redfire1331 <125223432+Redfire1331@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Rouge2t7 <81053047+Sarahon@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 SlamBamActionman <83650252+SlamBamActionman@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Tayrtahn <tayrtahn@gmail.com>
# SPDX-FileCopyrightText: 2024 Truoizys <153248924+Truoizys@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 TsjipTsjip <19798667+TsjipTsjip@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ubaser <134914314+UbaserB@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Vasilis <vasilis@pikachu.systems>
# SPDX-FileCopyrightText: 2024 WarMechanic <69510347+WarMechanic@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 beck-thompson <107373427+beck-thompson@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 deathride58 <deathride58@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 deltanedas <39013340+deltanedas@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 deltanedas <@deltanedas:kde.org>
# SPDX-FileCopyrightText: 2024 eoineoineoin <github@eoinrul.es>
# SPDX-FileCopyrightText: 2024 github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 lzk <124214523+lzk228@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 marbow <152051971+marboww@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 metalgearsloth <comedian_vs_clown@hotmail.com>
# SPDX-FileCopyrightText: 2024 mhamster <81412348+mhamsterr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 neutrino <67447925+neutrino-laser@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 nikthechampiongr <32041239+nikthechampiongr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 osjarw <62134478+osjarw@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 plykiya <plykiya@protonmail.com>
# SPDX-FileCopyrightText: 2024 redfire1331 <Redfire1331@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 slarticodefast <161409025+slarticodefast@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Арт <123451459+JustArt1m@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Fishbait <Fishbait@git.ml>
# SPDX-FileCopyrightText: 2025 GoobBot <uristmchands@proton.me>
# SPDX-FileCopyrightText: 2025 Velken <8467292+Velken@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 fishbait <gnesse@gmail.com>
# SPDX-FileCopyrightText: 2025 gluesniffler <159397573+gluesniffler@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 pheenty <fedorlukin2006@gmail.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  abstract: true
  parent: Clothing
  id: ClothingHeadBase
  components:
  - type: Clothing
    slots:
    - HEAD
  # Goobstation edit start
    equipSound:
      collection: GenericEquip
  # Goobstation edit end
  - type: Sprite
    state: icon
  - type: Item
    size: Small
    storedRotation: -90
  - type: Edible
    requiresSpecialDigestion: true
  - type: SolutionContainerManager
    solutions:
      food:
        maxVol: 10
        reagents:
        - ReagentId: Fiber
          Quantity: 10
  - type: Tag
    tags:
    - ClothMade
    - WhitelistChameleon
    - DroneUsable # Goobstation

- type: entity
  abstract: true
  parent: ClothingHeadBase
  id: ClothingHeadBaseButcherable
  components:
  - type: Butcherable
    butcheringType: Knife
    spawned:
    - id: MaterialCloth1
      amount: 1
  - type: PhysicalComposition # 50% of the amount of cloth you'd obtain upon butchering
    materialComposition:
      Cloth: 50
  - type: Tag
    tags:
    - ClothMade
    - Recyclable
    - WhitelistChameleon

- type: entity
  abstract: true
  parent: ClothingHeadBase
  id: ClothingHeadLightBase
  name: base helmet with light
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    layers:
    - state: icon
    - state: icon-flash
      visible: false
      map: [ "light" ]
  - type: Clothing
    equippedPrefix: off
  - type: Item
    heldPrefix: off
    size: Normal
  - type: ToggleableVisuals
    spriteLayer: light
  - type: ItemTogglePointLight
  - type: PointLight
    enabled: false
    radius: 3
    energy: 1
    mask: /Textures/Effects/LightMasks/cone.png
    autoRot: true
    netsync: false
  - type: Appearance
  - type: HandheldLight
    addPrefix: true
    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: PowerCellSlot
    cellSlotId: cell_slot
  - type: ItemSlots
    slots:
      cell_slot:
        name: power-cell-slot-component-slot-name-default
        startingItem: PowerCellMedium
  - type: ContainerContainer
    containers:
      cell_slot: !type:ContainerSlot {}

- type: entity
  abstract: true
  parent: ClothingHeadBase
  id: ClothingHeadEVAHelmetBase
  name: base space helmet
  components:
# SlotBlocker blocked until UI change
#  - type: SlotBlock
#    slots: [ears, eyes, mask]
  - type: BreathMask
  - type: Item
    size: Normal
  - type: PressureProtection
    highPressureMultiplier: 0.6
    lowPressureMultiplier: 1000
  - type: TemperatureProtection
    heatingCoefficient: 0.2
    coolingCoefficient: 0.2
  - type: IgniteFromGasImmunity # EE Plasmeme Change
    parts:
    - Head
  - type: IngestionBlocker
  - type: Clothing
    #Copies ClothingHeadHardsuitBase behavior
    equipSound: /Audio/Mecha/mechmove03.ogg
    unequipSound: /Audio/Mecha/mechmove03.ogg
    equipDelay: 2
    unequipDelay: 2
  - type: Tag
    tags:
    - WhitelistChameleon
    - HelmetEVA
    - PlasmamanSafe # EE Plasmeme Change
  - type: IdentityBlocker
  - type: HideLayerClothing
    slots:
    - Hair
    - Snout
    - HeadTop
    - HeadSide

- type: entity
  abstract: true
  # No parent since we aren't actually an item.
  id: ClothingHeadHardsuitBase
  name: base hardsuit helmet
  categories: [ HideSpawnMenu ]
  components:
# SlotBlocker blocked until UI change
#  - type: SlotBlock
#    slots: [ears, eyes, mask]
  - type: BreathMask
  - type: Sprite
    state: icon # default state used by most inheritors
  - type: Clickable
  - type: InteractionOutline
  - type: Clothing
    #Apparently the hardsuit helmet equip sound is from a walking mech?
    equipSound: /Audio/Mecha/mechmove03.ogg
    unequipSound: /Audio/Mecha/mechmove03.ogg
    quickEquip: false
    slots: [ HEAD ]
  - type: PressureProtection
    highPressureMultiplier: 0.3
    lowPressureMultiplier: 1000
  - type: TemperatureProtection
    heatingCoefficient: 0.1
    coolingCoefficient: 0.1
  - type: FireProtection # EE Plasmeme Change
    reduction: 0.2
  - type: IgniteFromGasImmunity
    parts:
    - Head
  - type: Armor
    coverage:
    - Head
    modifiers:
      coefficients:
        Blunt: 0.90
        Slash: 0.90
        Piercing: 0.95
        Heat: 0.90
        Radiation: 0.25
    traumaDeductions:
      Dismemberment: 0.2
      OrganDamage: 0.2
      BoneDamage: 0.2
      VeinsDamage: 0
      NerveDamage: 0
  - type: GroupExamine
  - type: IngestionBlocker
  - type: Tag
    tags:
    - WhitelistChameleon
    - PlasmamanSafe # EE Plasmeme Change
  - type: IdentityBlocker
  - type: HideLayerClothing
    slots:
    - Hair
    - Snout
    - HeadTop
    - HeadSide
  - type: FaceHuggerBlocker # Goobstation

- type: entity
  abstract: true
  parent: ClothingHeadHardsuitBase
  id: ClothingHeadHardsuitWithLightBase
  name: base hardsuit helmet with light
  categories: [ HideSpawnMenu ]
  components:
# SlotBlocker blocked until UI change
#  - type: SlotBlock
#    slots: [ears, eyes, mask]
  - type: Sprite
    layers:
    - state: icon
    - state: icon-flash
      visible: false
      map: [ "light" ]
  - type: Clothing
    equippedPrefix: off
  - type: ToggleableVisuals
    spriteLayer: light
  - type: ItemTogglePointLight
  - type: PointLight
    enabled: false
    radius: 3
    energy: 2
    mask: /Textures/Effects/LightMasks/cone.png
    autoRot: true
    netsync: false
  - type: Appearance
  - type: HandheldLight
    addPrefix: true
    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: Battery
    maxCharge: 600 #lights drain 3/s but recharge of 2 makes this 1/s. Therefore 600 is 10 minutes of light.
    startingCharge: 600
  - type: BatterySelfRecharger
    autoRechargeRate: 2 #recharge of 2 makes total drain 1w / s so max charge is 1:1 with time. Time to fully charge should be 5 minutes. Having recharge gives light an extended flicker period which gives you some warning to return to light area.

- type: entity
  abstract: true
  id: ClothingHeadHatHoodWinterBase
  name: base winter coat hood
  description: A hood, made to keep your head warm.
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    state: icon
  - type: Clickable
  - type: Clothing
    equipSound: /Audio/Effects/rustle1.ogg
    unequipSound: /Audio/Effects/rustle2.ogg
    quickEquip: false
    slots: [ HEAD ]
  - type: TemperatureProtection
    heatingCoefficient: 1.05
    coolingCoefficient: 0.7
  - type: ZombificationResistance
    zombificationResistanceCoefficient: 0.90
  - type: Armor # so zombification resistance shows up
    modifiers:
      coefficients: { }
  - type: GroupExamine
  - type: HideLayerClothing
    slots:
    - Hair
    - HeadTop
    - HeadSide
