# NOTE! All mobs that come out of this should have Salvage rulesets.
# These rulesets exist because Salvage mobs kept harassing the station and going out of control.

- type: entity
  parent: MarkerBaseStarcup # starcup
  name: Salvage Material Crate Spawner
  id: SalvageMaterialCrateSpawner
  components:
  - type: Sprite
    layers:
    - state: shadowred # starcup
    - state: red
    - sprite: Structures/Storage/Crates/generic.rsi
      state: icon
  - type: EntityTableSpawner
    table: !type:GroupSelector
      prob: 0.9
      children:
      - id: CrateSalvageAssortedGoodies
        weight: 0.6
      - !type:GroupSelector
        weight: 0.4
        children:
        - id: SalvageHumanCorpse
        - id: CrateMaterialPlasteel
        - id: CrateMaterialWood
        - id: CrateMaterialPlastic
        - id: CrateSalvageEquipment
        - id: CrateMaterialSteel
        - id: CrateMaterialGlass
        - id: CrateServiceJanitorialSupplies
        - id: CrateHydroponicsSeedsMedicinal
        - id: CrateEmergencyInternals
        - id: CrateFoodMRE
        - id: CrateMaterialTextiles
        - id: CrateMedicalSupplies
        - id: CrateEngineeringCableBulk
        - id: CrateMaterialCardboard
        - id: CrateServiceBooks
        - id: CrateServiceSmokeables
        - id: CrateTrashCartFilled
        - id: ClosetMaintenanceFilledRandom
        - id: ClosetEmergencyFilledRandom
      offset: 0.0

- type: entity
  parent: MarkerBase
  name: salvage loot spawner
  id: SalvageLootSpawner
  components:
  - type: Sprite
    layers:
    - state: red
    - sprite: Objects/Weapons/Melee/crusher.rsi
      state: icon
  - type: EntityTableSpawner
    table: !type:GroupSelector
      children:
      - id: WeaponCrusher
      - id: WeaponCrusherDagger
      - id: WeaponCrusherGlaive
      - id: MiningDrill
      # begin starcup
      - id: SalvageHarpoon
      - id: SalvageHarpoonPlasteel
      - id: SalvageHarpoonPlasma
      - id: SalvageHarpoonUranium
      - id: WeaponHarpoonGun
      # end starcup
    offset: 0.0

- type: entityTable
  id: SalvageMobTable
  table: !type:GroupSelector
    children:
    - id: MobCarpSalvage
      weight: 5
    - id: MobTickSalvage
      weight: 3
    # begin starcup: use shark table
    # - id: MobSharkSalvage
    - !type:NestedSelector
      tableId: SCSalvageSharkTable
    # end starcup
      weight: 2.5
    - id: PlushieCarp
    - id: DehydratedSpaceCarp
    # begin starcup
    - id: MobCarpSalvageSplitfin
      weight: 5
    - id: MobCarpSalvageVampire
      weight: 5
    - id: MobCarpSalvageQueen
      weight: 5
    # end starcup

# begin starcup: alternate sharks
- type: entityTable
  id: SCSalvageSharkTable
  table: !type:GroupSelector
    children:
    - id: MobSharkSalvage
    - id: MobSharkSalvageBlue
    - id: MobSharkSalvageBrown
    - id: MobSharkSalvageGreen
    - id: MobSharkSalvageShelled
    - id: MobSharkSalvageShelledBlue
    - id: MobSharkSalvageShelledBrown
    - id: MobSharkSalvageShelledGreen
    - id: MobSharkSalvageAbyssal
    - id: MobSharkSalvageVampire
# end starcup


- type: entity
  parent: MarkerBase
  name: Salvage Mob Spawner
  id: SalvageMobSpawner
  suffix: 25
  components:
  - type: Sprite
    layers:
    - state: red
    - sprite: Mobs/Aliens/Carps/space.rsi
      state: icon
  - type: EntityTableSpawner
    table: !type:NestedSelector
      prob: 0.25
      tableId: SalvageMobTable

- type: entity
  parent: SalvageMobSpawner
  id: SalvageMobSpawner75
  suffix: 75
  components:
  - type: EntityTableSpawner
    table: !type:NestedSelector
      prob: 0.75
      tableId: SalvageMobTable

- type: entity #I made this in case someone decided to make a terrifying space tick swarm for salvage. that someone may be me -EG404
  name: Salvage Space Tick Spawner
  id: SpaceTickSpawner
  parent: MarkerBaseStarcup # starcup
  suffix: 100
  components:
    - type: Sprite
      layers:
      # begin starcup: changed it from red, don't know why it was red when all other spawners of this type are green?
      - state: shadowgreen
      - state: green
      # end starcup
      - sprite: Mobs/Aliens/Xenos/spacetick.rsi
        state: icon
      - state: ai # starcup
    - type: ConditionalSpawner
      prototypes:
        - MobTickSalvage

- type: entity
  name: Salvage Space Bear Spawner
  id: SpawnMobBearSalvage
  parent: MarkerBaseStarcup # starcup
  components:
  - type: Sprite
    layers:
    - state: shadowgreen # starcup
    - state: green
    - state: bear
      sprite: Mobs/Animals/bear.rsi
    - state: ai # starcup
  - type: ConditionalSpawner
    prototypes:
    - MobBearSpaceSalvage

- type: entity
  name: Salvage Space Kangaroo Spawner
  id: SpawnMobKangarooSalvage
  parent: MarkerBaseStarcup # starcup
  components:
  - type: Sprite
    layers:
    - state: shadowgreen # starcup
    - state: green
    - state: kangaroo-space
      sprite: Mobs/Animals/kangaroo.rsi
    - state: ai # starcup
  - type: ConditionalSpawner
    prototypes:
    - MobKangarooSpaceSalvage

- type: entity
  name: Salvage Space Spider Spawner
  id: SpawnMobSpiderSalvage
  parent: MarkerBaseStarcup # starcup
  components:
  - type: Sprite
    layers:
    - state: shadowgreen # starcup
    - state: green
    - state: spacespider
      sprite: Mobs/Animals/spacespider.rsi
    - state: ai # starcup
  - type: ConditionalSpawner
    prototypes:
    - MobSpiderSpaceSalvage

- type: entity
  name: Salvage Space Cobra Spawner
  id: SpawnMobCobraSalvage
  parent: MarkerBaseStarcup # starcup
  components:
  - type: Sprite
    layers:
    - state: shadowgreen # starcup
    - state: green
    - state: spacecobra
      sprite: Mobs/Animals/spacecobra.rsi
    - state: ai # starcup
  - type: ConditionalSpawner
    prototypes:
    - MobCobraSpaceSalvage

- type: entity
  parent: MarkerBaseStarcup # starcup
  name: Salvage Flesh Spawner
  id: SalvageFleshSpawner
  suffix: 100
  components:
  - type: Sprite
    layers:
    # begin starcup: sprite changed
    - state: shadowred
    - state: red
    - sprite: _starcup/Markers/generic_salvage_spawners.rsi
      state: salvage_flesh
    - state: ai
    # end starcup
  - type: EntityTableSpawner
    table: !type:GroupSelector
      children:
      - id: MobFleshGolemSalvage
      - id: MobFleshClampSalvage
      - id: MobFleshLoverSalvage
      - id: MobFleshJaredSalvage
        weight: 0.5

- type: entity
  parent: MarkerBase
  name: Salvage Living Light Spawner
  id: SalvageLivingLightSpawner
  suffix: 100
  components:
  - type: Sprite
    layers:
    - state: red
    - sprite: Mobs/Elemental/living_light/luminous_person.rsi
      state: luminous_person
  - type: EntityTableSpawner
    table: !type:GroupSelector
      children:
      - id: MobLuminousPersonSalvage
      - id: MobLuminousEntitySalvage
      - id: MobLuminousObjectSalvage
        weight: 2
