# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aiden <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2025 Fishbait <Fishbait@git.ml>
# SPDX-FileCopyrightText: 2025 Piras314 <p1r4s@proton.me>
# SPDX-FileCopyrightText: 2025 Rinary <72972221+Rinary1@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 fishbait <gnesse@gmail.com>
# SPDX-FileCopyrightText: 2025 gluesniffler <159397573+gluesniffler@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 ss14-Starlight <ss14-Starlight@outlook.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entityTable
  id: DubiousOrgansTable
  table: !type:GroupSelector
    children:
    # Not-so Annoying Organs Group - 50% chance
    - !type:GroupSelector
      weight: 50
      children:
      - id: OrganDubiousHealth
      - id: OrganDubiousInvisible
      - id: OrganDubiousSpaceAdaptation
      - id: OrganDubiousScrambleDna
      - id: OrganDubiousScrambleLocation
      - id: OrganDubiousArtifact
      - id: OrganDubiousVentcrawler
      - id: OrganDubiousSteptriggerImmune
      - id: OrganDubiousRepairable
      
    # Annoying/Disruptive Organs Group - 35% chance
    - !type:GroupSelector
      weight: 35
      children:
      - id: OrganDubiousShock
      - id: OrganDubiousGoliath
      - id: OrganDubiousEMP
      - id: OrganDubiousGravityWell
      - id: OrganDubiousFlash
      - id: OrganDubiousSmoke
      - id: OrganDubiousGas
    # Very Disruptive Organs Group - 15% chance
    - !type:GroupSelector
      weight: 15
      children:
      - id: OrganDubiousAA
      - id: OrganDubiousSpiderEggs
      - id: OrganDubiousSlimeEggs

- type: entity
  name: Dubious Organ Spawner
  id: DubiousOrganSpawner
  parent: MarkerBase
  components:
  - type: Sprite
    layers:
      - state: red
      - sprite: _Shitmed/Mobs/Species/Misc/Dubious/organs.rsi
        state: gland
  - type: EntityTableSpawner
    table: !type:NestedSelector
      tableId: DubiousOrgansTable