# SPDX-FileCopyrightText: 2021 Swept <sweptwastaken@protonmail.com>
# SPDX-FileCopyrightText: 2022 Jacob Tong <10494922+ShadowCommander@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
# SPDX-FileCopyrightText: 2022 hubismal <47284081+hubismal@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 metalgearsloth <comedian_vs_clown@hotmail.com>
# SPDX-FileCopyrightText: 2023 Arendian <137322659+Arendian@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Dawid Bla <46636558+DawBla@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Flareguy <78941145+Flareguy@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Psychpsyo <60073468+Psychpsyo@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 crazybrain23 <44417085+crazybrain23@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 deltanedas <@deltanedas:kde.org>
# SPDX-FileCopyrightText: 2023 deltanedas <deltanedas@laptop>
# SPDX-FileCopyrightText: 2023 deltanedas <user@zenith>
# SPDX-FileCopyrightText: 2023 keronshb <54602815+keronshb@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 leo <136020119+leonardo-dabepis@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 lzk <124214523+lzk228@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 themias <89101928+themias@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Adeinitas <147965189+adeinitas@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Aidenkrz <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2024 Danger Revolution! <142105406+DangerRevolution@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Doggo5852 <bombasticsideeye614@gmail.com>
# SPDX-FileCopyrightText: 2024 EmoGarbage404 <retron404@gmail.com>
# SPDX-FileCopyrightText: 2024 K-Dynamic <20566341+K-Dynamic@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Kara <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2024 Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Plykiya <58439124+Plykiya@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Timemaster99 <57200767+Timemaster99@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 VMSolidus <evilexecutive@gmail.com>
# SPDX-FileCopyrightText: 2024 brainfood1183 <113240905+brainfood1183@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 gluesniffler <159397573+gluesniffler@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 plykiya <plykiya@protonmail.com>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 BombasterDS <deniskaporoshok@gmail.com>
# SPDX-FileCopyrightText: 2025 BombasterDS2 <shvalovdenis.workmail@gmail.com>
# SPDX-FileCopyrightText: 2025 Ghagliiarghii <68826635+Ghagliiarghii@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 GoobBot <uristmchands@proton.me>
# SPDX-FileCopyrightText: 2025 Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 SolsticeOfTheWinter <solsticeofthewinter@gmail.com>
# SPDX-FileCopyrightText: 2025 deltanedas <39013340+deltanedas@users.noreply.github.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  name: soap
  id: Soap
  parent: BaseItem
  description: A cheap bar of soap. Doesn't smell.
  components:
  - type: Tag
    tags:
    - Soap
  - type: Sprite
    sprite: Objects/Specific/Janitorial/soap.rsi
    layers:
    - state: soap-4
      map: ["enum.SolutionContainerLayers.Fill"]
  - type: SolutionContainerVisuals
    maxFillLevels: 4
    fillBaseName: soap-
    changeColor: false
  - type: Appearance
  - type: Item
    sprite: Objects/Specific/Janitorial/soap.rsi
    storedRotation: -90
  - type: Slippery
  - type: StepTrigger
    intersectRatio: 0.2
    triggerGroups: # Goobstation
      types:
      - SlipEntity
  - type: CollisionWake
    enabled: false
  - type: Physics
    bodyType: Dynamic
  - type: Fixtures
    fixtures:
      slips:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.4,-0.3,0.4,0.3"
        layer:
        - SlipLayer
        hard: false
      fix1:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.4,-0.3,0.4,0.3"
        density: 10
        mask:
        - ItemMask
  - type: SolutionContainerManager
    solutions:
      soap:
        maxVol: 50
        reagents:
        - ReagentId: SoapReagent
          Quantity: 50
  - type: SolutionTransfer
    transferAmount: 10
    minTransferAmount: 1
    maxTransferAmount: 25
    canReceive: false
    canChangeTransferAmount: true
  - type: DrainableSolution
    solution: soap
  - type: DeleteOnSolutionEmpty
    solution: soap
  - type: FlavorProfile
    flavors:
      - clean
  - type: Food
    solution: soap
  - type: BadFood
  - type: CleansForensics
  - type: FloorCleaner # Goobstation
    cleanDelay: 12
  - type: Residue
    residueAdjective: residue-slippery
    residueColor: residue-green

- type: entity
  name: soap
  id: SoapNT
  parent: Soap
  description: A Nanotrasen brand bar of soap. Smells of plasma.
  components:
  - type: Sprite
    layers:
    - state: nt-4
      map: ["enum.SolutionContainerLayers.Fill"]
  - type: SolutionContainerVisuals
    fillBaseName: nt-
  - type: Item
    heldPrefix: nt
  - type: SolutionContainerManager
    solutions:
      soap:
        maxVol: 100
        reagents:
        - ReagentId: SoapReagent
          Quantity: 100
  - type: Residue
    residueAdjective: residue-slippery
    residueColor: residue-grey

- type: entity
  name: soap
  id: SoapDeluxe
  parent: Soap
  description: A deluxe Waffle Co. brand bar of soap. Smells of strawberries.
  components:
  - type: Sprite
    layers:
    - state: deluxe-4
      map: ["enum.SolutionContainerLayers.Fill"]
  - type: SolutionContainerVisuals
    fillBaseName: deluxe-
  - type: Item
    heldPrefix: deluxe
  - type: Residue
    residueAdjective: residue-slippery
    residueColor: residue-brown

- type: entity
  name: soap
  id: SoapSyndie
  parent: [Soap, BaseSyndicateContraband]
  description: An untrustworthy bar of soap. Smells of fear.
  components:
  - type: Sprite
    layers:
    - state: syndie-4
      map: ["enum.SolutionContainerLayers.Fill"]
  - type: SolutionContainerVisuals
    fillBaseName: syndie-
  - type: Slippery
    slipData:
      paralyzeTime: 3
      launchForwardsMultiplier: 3
  - type: Item
    heldPrefix: syndie
  - type: FlavorProfile
    flavors:
      - clean
      - punishment
  - type: CleansForensics
    cleanDelay: 8.0
  - type: Residue
    residueAdjective: residue-slippery
    residueColor: residue-red
  - type: StaticPrice
    price: 500

- type: entity
  name: soaplet
  id: SoapletSyndie
  categories: [ HideSpawnMenu ]
  parent: Soap
  description: A tiny piece of syndicate soap.
  components:
  - type: Sprite
    layers:
    - state: syndie-soaplet
  - type: Slippery
    slipData:
      paralyzeTime: 1.5 # these things are tiny
      launchForwardsMultiplier: 1.5
  - type: StepTrigger
    intersectRatio: 0.04
    triggerGroups: # Goobstation
      types:
      - SlipEntity
  - type: Item
    heldPrefix: syndie
  - type: Fixtures
    fixtures:
      slips:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.08,-0.06,0.08,0.06"
        layer:
        - SlipLayer
        hard: false
      fix1:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.08,-0.06,0.08,0.06"
        density: 1
        mask:
        - ItemMask
  - type: DeleteOnTrigger
  - type: EmitSoundOnTrigger
    sound:
      path: "/Audio/Effects/Fluids/splat.ogg"
      params:
        volume: -20

- type: entity
  name: soap
  id: SoapHomemade
  parent: Soap
  description: A homemade bar of soap. Smells of... well....
  components:
  - type: Sprite
    layers:
    - state: gibs-4
      map: ["enum.SolutionContainerLayers.Fill"]
  - type: SolutionContainerVisuals
    fillBaseName: gibs-
  - type: Slippery
  - type: StepTrigger
    triggerGroups: # Goobstation
      types:
      - SlipEntity
  - type: Item
    heldPrefix: gibs
  - type: FlavorProfile
    flavors:
      - clean
      - meaty
  - type: Residue
    residueAdjective: residue-slippery
    residueColor: residue-red

- type: entity
  name: omega soap
  id: SoapOmega
  parent: Soap
  description: The most advanced soap known to mankind. Smells of bluespace.
  components:
  - type: Sprite
    layers:
    - state: omega-4
      map: ["enum.SolutionContainerLayers.Fill"]
  - type: SolutionContainerVisuals
    fillBaseName: omega-
  - type: Slippery
    slipData:
      paralyzeTime: 5.0
      launchForwardsMultiplier: 3.0
  - type: Item
    heldPrefix: omega
  - type: SolutionContainerManager
    solutions:
      soap:
        maxVol: 240 #In the Greek alphabet, Omega is the 24th letter
        reagents:
        - ReagentId: SoapReagent
          Quantity: 240
  - type: Residue
    residueAdjective: residue-slippery
    residueColor: residue-blue

- type: entity
  name: soap
  id: SoapBorg # Intended for borg internals, not slippery or food, not a container for soap reagent
  parent: BaseItem
  description: A Nanotrasen brand bar of soap. Smells of plasma and machines.
  components:
  - type: Sprite
    sprite: Objects/Specific/Janitorial/soap.rsi
    layers:
    - state: nt-4
  - type: Appearance
  - type: Item
    sprite: Objects/Specific/Janitorial/soap.rsi
    storedRotation: -90
  - type: CleansForensics
  - type: FloorCleaner # Goobstation
  - type: Residue
    residueAdjective: residue-slippery
    residueColor: residue-grey
  - type: Tag
    tags:
    - Soap
