# When adding new soaps, also add them to id: AllSoapsTable

- type: entity
  abstract: true
  parent: BaseItem
  id: BaseSoap
  name: soap
  components:
  - type: Tag
    tags:
    - Soap
  - type: Sprite
    sprite: Objects/Specific/Janitorial/soap.rsi
  - 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
  - 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: Edible
    solution: soap
  - type: BadFood
  - type: CleansForensics
  - type: Residue
    residueAdjective: residue-slippery

- type: entity
  parent: BaseSoap
  id: Soap
  description: A cheap bar of soap. Doesn't smell.
  components:
  - type: Sprite
    layers:
    - state: soap-4
      map: ["enum.SolutionContainerLayers.Fill"]
  - type: Residue
    residueColor: residue-green

- type: entity
  parent: BaseSoap
  id: SoapNT
  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
    residueColor: residue-grey

- type: entity
  parent: BaseSoap
  id: SoapDeluxe
  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
    residueColor: residue-brown

- type: entity
  parent: [BaseSoap, BaseSyndicateContraband]
  id: SoapSyndie
  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
    staminaDamage: 50
    slipData:
      knockdownTime: 3
      launchForwardsMultiplier: 3
  - type: Item
    heldPrefix: syndie
  - type: FlavorProfile
    flavors:
      - clean
      - punishment
  - type: CleansForensics
    cleanDelay: 8.0
  - type: Residue
    residueColor: residue-red
  - type: StaticPrice
    price: 500

- type: entity
  parent: BaseSoap
  id: SoapletSyndie
  name: soaplet
  description: A tiny piece of syndicate soap.
  categories: [ HideSpawnMenu ]
  components:
  - type: SolutionContainerManager
    solutions:
      soap:
        maxVol: 1.5 # 50 / 30 = 1.666
        reagents:
        - ReagentId: SoapReagent
          Quantity: 1.5
  - type: SolutionContainerVisuals
    maxFillLevels: 0
  - type: Sprite
    layers:
    - state: syndie-soaplet
  - type: Slippery
  - type: StepTrigger
    intersectRatio: 0.04
  - type: TriggerOnStepTrigger
  - 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
    predicted: true
    positional: true
    sound:
      path: "/Audio/Effects/Fluids/splat.ogg"
      params:
        volume: -8
  - type: Residue
    residueAdjective: residue-slippery
    residueColor: residue-red

- type: entity
  parent: BaseSoap
  id: SoapHomemade
  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: Item
    heldPrefix: gibs
  - type: FlavorProfile
    flavors:
      - clean
      - meaty
  - type: Residue
    residueColor: residue-red

- type: entity
  parent: BaseSoap
  id: SoapOmega
  name: omega 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
    staminaDamage: 50
    slipData:
      knockdownTime: 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
    residueColor: residue-blue
