# 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: MarkerBase
  name: Salvage Material Crate Spawner
  id: SalvageMaterialCrateSpawner
  components:
  - type: Sprite
    layers:
    - 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
    offset: 0.0

- type: entityTable
  id: SalvageMobTable
  table: !type:GroupSelector
    children:
    - id: MobCarpSalvage
      weight: 5
    - id: MobTickSalvage
      weight: 3
    - id: MobSharkSalvage
      weight: 2.5
    - id: PlushieCarp
    - id: DehydratedSpaceCarp

- 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: MarkerBase
  suffix: 100
  components:
    - type: Sprite
      layers:
        - state: red
        - sprite: Mobs/Aliens/Xenos/spacetick.rsi
          state: icon
    - type: ConditionalSpawner
      prototypes:
        - MobTickSalvage

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

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

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

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

- type: entity
  parent: MarkerBase
  name: Salvage Flesh Spawner
  id: SalvageFleshSpawner
  suffix: 100
  components:
  - type: Sprite
    layers:
    - state: red
    - sprite: Mobs/Aliens/flesh.rsi
      state: jared
  - 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
