# 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
  name: Salvage Material Crate Spawner
  id: SalvageMaterialCrateSpawner
  parent: MarkerBaseStarcup # starcup
  components:
    - type: Sprite
      layers:
      - state: shadowred # starcup
      - state: red
      - sprite: Structures/Storage/Crates/generic.rsi
        state: icon
    - type: RandomSpawner
      rarePrototypes:
        - SalvageHumanCorpse
        - CrateMaterialPlasteel
        - CrateMaterialWood
        - CrateMaterialPlastic
        - CrateSalvageEquipment
        - CrateMaterialSteel
        - CrateMaterialGlass
        - CrateServiceJanitorialSupplies
        - CrateHydroponicsSeedsMedicinal
        - CrateEmergencyInternals
        - CrateFoodMRE
        - CrateMaterialTextiles
        - CrateMedicalSupplies
        - CrateEngineeringCableBulk
        - CrateMaterialCardboard
        - CrateServiceBooks
        - CrateServiceSmokeables
        - CrateTrashCartFilled
        - ClosetMaintenanceFilledRandom
        - ClosetEmergencyFilledRandom
      rareChance: 0.4
      prototypes:
        - CrateSalvageAssortedGoodies
      chance: 0.9
      offset: 0.0

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

- type: entity
  name: Salvage Mob Spawner
  id: SalvageMobSpawner
  parent: MarkerBaseStarcup # starcup
  suffix: 25
  components:
    - type: Sprite
      layers:
      - state: shadowred # starcup
      - state: red
      # begin starcup
      - sprite: _starcup/Markers/generic_salvage_spawners.rsi
        state: salvage_sharkminnow
      - state: ai
      # end starcup
    - type: RandomSpawner
      rarePrototypes:
      - MobSharkSalvage
      # begin starcup
      - MobSharkSalvageBlue
      - MobSharkSalvageBrown
      - MobSharkSalvageGreen
      - MobSharkSalvageShelled
      - MobSharkSalvageShelledBlue
      - MobSharkSalvageShelledBrown
      - MobSharkSalvageShelledGreen
      - MobSharkSalvageAbyssal
      - MobSharkSalvageVampire
      # end starcup
      rareChance: 0.1 # starcup: Used to be 0.2. Having more minnows seems to stack spawn odds in their favor?
      prototypes:
      - MobCarpSalvage
      - MobCarpSalvage
      - MobCarpSalvage
      - MobCarpSalvage
      - MobCarpSalvage
      # begin starcup
      - MobCarpSalvageSplitfin
      - MobCarpSalvageSplitfin
      - MobCarpSalvageSplitfin
      - MobCarpSalvageSplitfin
      - MobCarpSalvageSplitfin
      - MobCarpSalvageVampire
      - MobCarpSalvageVampire
      - MobCarpSalvageVampire
      - MobCarpSalvageVampire
      - MobCarpSalvageVampire
      - MobCarpSalvageQueen
      - MobCarpSalvageQueen
      - MobCarpSalvageQueen
      - MobCarpSalvageQueen
      - MobCarpSalvageQueen
      # end starcup
      - MobTickSalvage
      - MobTickSalvage
      - MobTickSalvage
      - PlushieCarp
      - DehydratedSpaceCarp
      chance: 0.25
      offset: 0.2

- 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
  id: SalvageMobSpawner75
  parent: SalvageMobSpawner
  suffix: 75
  components:
  - type: RandomSpawner
    rarePrototypes:
    - MobSharkSalvage
    # begin starcup
    - MobSharkSalvageBlue
    - MobSharkSalvageBrown
    - MobSharkSalvageGreen
    - MobSharkSalvageShelled
    - MobSharkSalvageShelledBlue
    - MobSharkSalvageShelledBrown
    - MobSharkSalvageShelledGreen
    - MobSharkSalvageAbyssal
    - MobSharkSalvageVampire
    # end starcup
    rareChance: 0.1 # starcup: Used to be 0.2. Having more minnows seems to stack spawn odds in their favor?
    prototypes:
    - MobCarpSalvage
    - MobCarpSalvage
    - MobCarpSalvage
    - MobCarpSalvage
    - MobCarpSalvage
    # begin starcup
    - MobCarpSalvageSplitfin
    - MobCarpSalvageSplitfin
    - MobCarpSalvageSplitfin
    - MobCarpSalvageSplitfin
    - MobCarpSalvageSplitfin
    - MobCarpSalvageVampire
    - MobCarpSalvageVampire
    - MobCarpSalvageVampire
    - MobCarpSalvageVampire
    - MobCarpSalvageVampire
    - MobCarpSalvageQueen
    - MobCarpSalvageQueen
    - MobCarpSalvageQueen
    - MobCarpSalvageQueen
    - MobCarpSalvageQueen
    # end starcup
    - MobTickSalvage
    - MobTickSalvage
    - MobTickSalvage
    - PlushieCarp
    - DehydratedSpaceCarp
    chance: 0.75
    offset: 0.2

- 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
  name: Salvage Flesh Spawner
  id: SalvageFleshSpawner
  parent: SalvageMobSpawner
  suffix: 100
  components:
    - type: Sprite
      layers:
      # begin starcup
      - state: shadowred
      - state: red
      - sprite: _starcup/Markers/generic_salvage_spawners.rsi
        state: salvage_flesh
      - state: ai
      # end starcup
    - type: RandomSpawner
      rarePrototypes:
      - MobSharkSalvage
      rareChance: 0
      prototypes:
      - MobFleshJaredSalvage
      - MobFleshGolemSalvage
      - MobFleshGolemSalvage
      - MobFleshClampSalvage
      - MobFleshClampSalvage
      - MobFleshLoverSalvage
      - MobFleshLoverSalvage
      chance: 1
      offset: 0.2
