# SPDX-FileCopyrightText: 2023 AJCM-git <60196617+AJCM-git@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Kara <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2023 lzk <124214523+lzk228@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Aiden <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2024 Ed <96445749+TheShuEd@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Froffy025 <78222136+Froffy025@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 justdie12 <125140938+justdie12@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 GoobBot <uristmchands@proton.me>
# SPDX-FileCopyrightText: 2025 Rouden <149893554+Roudenn@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Roudenn <romabond091@gmail.com>
# SPDX-FileCopyrightText: 2025 gluesniffler <linebarrelerenthusiast@gmail.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  id: FloorWaterEntity
  name: water
  description: A real thirst quencher.
  placement:
    mode: SnapgridCenter
    snap:
    - Wall
  components:
  - type: FloorOccluder
  - type: Transform
    anchored: true
  - type: SyncSprite
  - type: Clickable
  - type: Sprite
    sprite: Tiles/Planet/water.rsi
    drawdepth: BelowFloor
    layers:
      - state: shoreline_water
  - type: SolutionContainerManager
    solutions:
      pool:
        maxVol: 9999999 #.inf seems to break the whole yaml file, but would definitely be preferable.
        reagents:
        - ReagentId: Water
          Quantity: 9999999
  #- type: SolutionRegeneration Goobstation - laggy as shit
  #  solution: tank
  #  generated:
  #    reagents:
  #    - ReagentId: Water
  #      Quantity: 100
  - type: DrainableSolution
    solution: pool
  - type: SpeedModifierContacts
    walkSpeedModifier: 0.5
    sprintSpeedModifier: 0.5
  - type: Physics
    bodyType: Static
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.5,-0.5,0.5,0.5"
        layer:
          - SlipLayer
        mask:
          - ItemMask
        density: 1000
        hard: false
      # Goobstation - fishing
      fishing:
        shape:
          !type:PhysShapeCircle
          radius: 0.4
        layer:
        - ItemMask
        mask:
        - HighImpassable
        density: 1000
        hard: false
      # Goobstation - fishing
  - type: FootstepModifier
    footstepSoundCollection:
      collection: FootstepWater
      params:
        volume: 8
  - type: StepTrigger
    requiredTriggeredSpeed: 0
    intersectRatio: 0.1
    blacklist:
      tags:
        - Catwalk
  - type: TileEntityEffect
    effects:
    - !type:ExtinguishReaction
  # Goobstation - fishing
  - type: FishingSpot
    fishList: !type:NestedSelector
      tableId: WaterFishingLootTable
    fishDefaultTimer: 25.0
    fishTimerVariety: 15.0
  # Goobstation - fishing
  - type: CosmicCorruptible # DeltaV - Cosmic Cult
    convertTo: FloorCosmicDecay