# SPDX-FileCopyrightText: 2021 Metal Gear Sloth <metalgearsloth@gmail.com>
# SPDX-FileCopyrightText: 2021 Paul <ritter.paul1+git@googlemail.com>
# SPDX-FileCopyrightText: 2021 Paul Ritter <ritter.paul1@gmail.com>
# SPDX-FileCopyrightText: 2021 Swept <sweptwastaken@protonmail.com>
# SPDX-FileCopyrightText: 2021 Vera Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 Vera Aguilera Puerto <gradientvera@outlook.com>
# SPDX-FileCopyrightText: 2021 Vera Aguilera Puerto <zddm@outlook.es>
# SPDX-FileCopyrightText: 2022 DrSmugleaf <DrSmugleaf@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 EmoGarbage404 <98561806+EmoGarbage404@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Flipp Syder <76629141+vulppine@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Javier Guardia Fernández <DrSmugleaf@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Jezithyr <Jezithyr@gmail.com>
# SPDX-FileCopyrightText: 2022 Moony <moonheart08@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Paul Ritter <ritter.paul1@googlemail.com>
# SPDX-FileCopyrightText: 2022 Peptide90 <78795277+Peptide90@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Rane <60792108+Elijahrane@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 T-Stalker <43253663+DogZeroX@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 metalgearsloth <comedian_vs_clown@hotmail.com>
# SPDX-FileCopyrightText: 2022 mirrorcult <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2022 och-och <80923370+och-och@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 DrSmugleaf <drsmugleaf@gmail.com>
# SPDX-FileCopyrightText: 2023 Emisse <99158783+Emisse@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Whisper <121047731+QuietlyWhisper@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 justproggramer <68664576+Klaypexx@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 liltenhead <104418166+liltenhead@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 lzk <124214523+lzk228@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Aiden <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2024 Aidenkrz <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2024 BombasterDS <115770678+BombasterDS@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 CaasGit <87243814+CaasGit@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ed <96445749+TheShuEd@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Jezithyr <jezithyr@gmail.com>
# SPDX-FileCopyrightText: 2024 Just-a-Unity-Dev <67359748+Just-a-Unity-Dev@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Kara <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2024 Kira Bridgeton <161087999+Verbalase@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Morb <14136326+Morb0@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Mr. 27 <45323883+Dutch-VanDerLinde@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
# SPDX-FileCopyrightText: 2024 Piras314 <p1r4s@proton.me>
# SPDX-FileCopyrightText: 2024 Plykiya <58439124+Plykiya@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Spatison <137375981+Spatison@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Tayrtahn <tayrtahn@gmail.com>
# SPDX-FileCopyrightText: 2024 Tyzemol <85772526+Tyzemol@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ubaser <134914314+UbaserB@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 beck-thompson <107373427+beck-thompson@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 plykiya <plykiya@protonmail.com>
# SPDX-FileCopyrightText: 2024 slarticodefast <161409025+slarticodefast@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 BombasterDS <deniskaporoshok@gmail.com>
# SPDX-FileCopyrightText: 2025 BombasterDS2 <shvalovdenis.workmail@gmail.com>
# SPDX-FileCopyrightText: 2025 Froffy025 <scotttaco025@gmail.com>
# SPDX-FileCopyrightText: 2025 GoobBot <uristmchands@proton.me>
# SPDX-FileCopyrightText: 2025 John Willis <143434770+CerberusWolfie@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Kittygyat <202250949+Kittygyat@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Ted Lukin <66275205+pheenty@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 deltanedas <39013340+deltanedas@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 deltanedas <@deltanedas:kde.org>
# 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
  name: Urist McSlime
  parent: BaseMobSpeciesOrganic
  id: BaseMobSlimePerson
  abstract: true
  components:
  - type: Hunger
  - type: Thirst
  - type: Icon
    sprite: Mobs/Species/Slime/parts.rsi
    state: full
  - type: Body
    prototype: Slime
    requiredLegs: 2
  # they like eat it idk lol
  - type: Storage
    clickInsert: false
    grid:
    - 0,0,1,2
    maxItemSize: Large
    storageInsertSound:
      path: /Audio/Voice/Slime/slime_squish.ogg
  - type: ContainerContainer
    containers:
      storagebase: !type:Container
        ents: []
  - type: UserInterface
    interfaces:
      enum.VoiceMaskUIKey.Key:
        type: VoiceMaskBoundUserInterface
      enum.StorageUiKey.Key:
        type: StorageBoundUserInterface
      enum.HumanoidMarkingModifierKey.Key:
        type: HumanoidMarkingModifierBoundUserInterface
      enum.StrippingUiKey.Key:
        type: StrippableBoundUserInterface
      # Goobstation - changelings
      enum.StoreUiKey.Key:
        type: StoreBoundUserInterface
      enum.HereticLivingHeartKey.Key: # goob edit - heretics
        type: LivingHeartMenuBoundUserInterface
  # to prevent bag open/honk spam
  - type: UseDelay
    delay: 0.5
  - type: HumanoidAppearance
    species: SlimePerson
  - type: Speech
    speechVerb: Slime
    speechSounds: Slime
    allowedEmotes: ['Squish', 'Bubble', 'Pop'] # Imp: add Bubble, Pop
  - type: TypingIndicator
    proto: slime
  - type: Vocal
    sounds:
      Male: MaleSlime
      Female: FemaleSlime
      Unsexed: MaleSlime
  - type: LanguageKnowledge # Einstein Engines - Languages
    speaks:
    - TauCetiBasic
    - Bubblish
    understands:
    - TauCetiBasic
    - Bubblish
  - type: Damageable
    damageContainer: Biological
    damageModifierSet: Slime
#  - type: PassiveDamage # Around 8 damage a minute healed
#    allowedStates:
#    - Alive
#    damageCap: 65
#    damage:
#      types:
#        Heat: -0.14
#      groups:
#        Brute: -0.14
  #  - type: DamageVisuals
  #    damageOverlayGroups:
  #      Brute:
  #        sprite: _Shitmed/Mobs/Effects/brute_damage.rsi
  #        color: "#2cf274"
  #      Burn:
  #        sprite: _Shitmed/Mobs/Effects/burn_damage.rsi
  - type: Bloodstream
    bloodReagent: Slime # TODO Color slime blood based on their slime color or smth
  - type: Barotrauma
    damage:
      types:
        Blunt: 0.50 #per second, scales with pressure and other constants.
        Heat: 0.2 # 0.1 more than humans, i feel like low pressure would make slime boil more than blunt stretch them so i decided on this instead.
  - type: Reactive
    groups:
      Flammable: [ Touch ]
      Extinguish: [ Touch ]
      Acidic: [Touch, Ingestion, Eyes] # Goobstation
    reactions:
    - reagents: [ Water, SpaceCleaner ]
      methods: [ Touch ]
      effects:
      - !type:WashCreamPieReaction
    - reagents: [ Water ]
      methods: [ Touch ]
      effects:
      - !type:HealthChange
        scaleByQuantity: true
        damage:
          types:
            Heat: 0.25 # goob edit
        conditions:
        - !type:HasComponentOnEquipmentCondition # goob edit - make suits protect slimes from water damage
          components:
          - type: PressureProtection
          invert: true
      - !type:PopupMessage
        type: Local
        visualType: Large
        messages: [ "slime-hurt-by-water-popup" ]
        probability: 0.25
        conditions:
        - !type:HasComponentOnEquipmentCondition # goob edit - make suits protect slimes from water damage
          components:
          - type: PressureProtection
          invert: true
  - type: Butcherable
    butcheringType: Spike
    spawned:
    - id: FoodMeatSlime
      amount: 5
  - type: Respirator
    damage:
      types:
        Asphyxiation: 0.2
    damageRecovery:
      types:
        Asphyxiation: -1.0
    maxSaturation: 15
  - type: Inventory
    femaleDisplacements:
      jumpsuit:
        sizeMaps:
          32:
            sprite: Mobs/Species/Human/displacement.rsi
            state: jumpsuit-female

- type: entity
  parent: MobHumanDummy
  id: MobSlimePersonDummy
  categories: [ HideSpawnMenu ]
  components:
  - type: HumanoidAppearance
    species: SlimePerson
  - type: Inventory
    femaleDisplacements:
      jumpsuit:
        sizeMaps:
          32:
            sprite: Mobs/Species/Human/displacement.rsi
            state: jumpsuit-female
