# SPDX-FileCopyrightText: 2021 Peptide90 <78795277+Peptide90@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 Swept <sweptwastaken@protonmail.com>
# SPDX-FileCopyrightText: 2022 Kara <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2022 Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
# SPDX-FileCopyrightText: 2022 wrexbe <81056464+wrexbe@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 DrSmugleaf <DrSmugleaf@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 LankLTE <135308300+LankLTE@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 metalgearsloth <comedian_vs_clown@hotmail.com>
# SPDX-FileCopyrightText: 2024 Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Piras314 <p1r4s@proton.me>
# SPDX-FileCopyrightText: 2024 themias <89101928+themias@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 Armok <155400926+ARMOKS@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aviu00 <aviu00@protonmail.com>
# SPDX-FileCopyrightText: 2025 GoobBot <uristmchands@proton.me>
# SPDX-FileCopyrightText: 2025 Ted Lukin <66275205+pheenty@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: ClothingMaskBase
  components:
  - type: Sprite
    state: icon
  - type: Item
    size: Small
  - type: Clothing
    slots: [mask]
  # Goobstation edit start
    equipSound:
      collection: GenericEquip
  - type: EmitSoundOnPickup
    sound:
      path: /Audio/_Goobstation/Items/handling/generic_small_pickup.ogg
  - type: EmitSoundOnDrop
    sound:
      path: /Audio/_Goobstation/Items/handling/generic_small_drop.ogg
  # Goobstation edit end
  - type: StaticPrice
    price: 25
  - type: AltClothingLayer # Goobstation
    defaultLayer: mask
    altLayer: maskalt
    changeToAltMessage: alt-clothing-component-mask-alt
    changeToDefaultMessage: alt-clothing-component-mask-default
  - type: Armor # provide minimal covering to your head
    coverage:
    - Head
    modifiers:
      coefficients:
        Blunt: 0.95
        Slash: 0.95
        Piercing: 0.95
    traumaDeductions:
      Dismemberment: 0
      OrganDamage: 0.05
      BoneDamage: 0.05
      VeinsDamage: 0
      NerveDamage: 0
  # Goobstation
  - type: DiseaseProtection # light protection for all masks
    incoming:
      chanceMultipliers:
        Aerial: 0.8
    outgoing:
      chanceMultipliers:
        Aerial: 0.6
  - type: Tag # goob edit
    tags:
    - Mask

- type: entity
  abstract: true
  parent: ClothingMaskBase
  id: ClothingMaskPullableBase
  components:
  - type: Mask

- type: entity
  parent: BaseAction
  id: ActionToggleMask
  name: Toggle Mask
  description: Handy, but prevents insertion of pie into your pie hole.
  components:
  - type: Action
    icon: { sprite: Clothing/Mask/gas.rsi, state: icon }
    iconOn: Interface/Default/blocked.png
  - type: InstantAction
    event: !type:ToggleMaskEvent

- type: entity
  id: ClothingMaskBaseButcherable
  parent: ClothingMaskBase
  abstract: true
  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: Food
    requiresSpecialDigestion: true
  - type: SolutionContainerManager
    solutions:
      food:
        maxVol: 10
        reagents:
        - ReagentId: Fiber
          Quantity: 10
  - type: Tag
    tags:
    - ClothMade
    - Recyclable
