- type: entity
  parent: MarkerBase
  id: CrateEmptySpawner
  name: Empty Crate Spawner
  components:
  - type: Sprite
    layers:
    - state: red
    - sprite: Structures/Storage/Crates/generic.rsi
      state: icon
  - type: EntityTableSpawner
    table: !type:GroupSelector
      prob: 0.7
      children:
      - id: CrateGenericSteel
      - id: CratePlastic
      - id: CrateFreezer
      - id: CrateHydroponics
      - id: CrateMedical
      - id: CrateRadiation
      - id: CrateInternals
      - id: CrateElectrical
      - id: CrateEngineering
      - id: CrateScience
      - id: CrateSurgery
    offset: 0.0

- type: entityTable
  id: LowValueInstrumentCrateTable
  table: !type:GroupSelector
    children:
    - id: CrateFunInstrumentsVariety
    - id: CrateFunInstrumentsBrass
    - id: CrateFunInstrumentsString
    - id: CrateFunInstrumentsWoodwind
    - id: CrateFunInstrumentsKeyedPercussion
    - id: CrateFunInstrumentsSpecial
      weight: 0.01
    - id: CrateFunSadTromboneImplants
      weight: 0.01

- type: entityTable
  id: LowValueFunCrateTable
  table: !type:GroupSelector
    children:
    - id: CrateFunPlushie
      weight: 2
    - id: CrateFunLizardPlushieBulk
    - id: CrateFunSharkPlushieBulk
    - id: CrateCandles
    - id: CrateFunArtSupplies
    - id: CrateFunFoamGuns
      weight: 0.01

- type: entityTable
  id: LowValueMaterialCrateTable
  table: !type:GroupSelector
    children:
    - id: CrateMaterialGlass
    - id: CrateMaterialSteel
    - id: CrateMaterialPlastic
    - id: CrateMaterialWood
    - id: CrateMaterialPlasteel
    - id: CrateMaterialBasicResource
    - id: CrateMaterialRandom
      weight: 4

- type: entityTable
  id: LowValueEmergencyCrateTable
  table: !type:GroupSelector
    children:
    - id: CrateEmergencyFire
    - id: CrateEmergencyInternals
    - id: CrateEmergencyInflatablewall
      weight: 0.5

- type: entityTable
  id: LowValueServiceCrateTable
  table: !type:GroupSelector
    children:
    - id: CrateServiceColorfulLights
    - id: CrateServiceReplacementLights
    - id: CrateServiceBureaucracy
    - id: PetCarrier
    - id: CrateHydroponicsTools
    - id: CrateHydroponicsSeeds
    - id: CrateHydroponicsSeedsExotic
      weight: 0.5
    - id: CrateHydroponicsSeedsMedicinal
      weight: 0.5
    - id: CrateServiceJanitorialSupplies
    - id: JanitorialTrolley
      weight: 0.2

- type: entityTable
  id: LowValueEngineeringCrateTable
  table: !type:GroupSelector
    children:
    - id: CrateEngineeringCableLV
    - id: CrateEngineeringCableMV
    - id: CrateEngineeringCableHV
    - id: CrateEngineeringCableBulk
    - id: CrateTechBoardRandom
    - id: CrateEngineeringSpaceHeater
    - id: StorageCanister
      weight: 0.5

- type: entityTable
  id: LowValueMedicalCrateTable
  table: !type:GroupSelector
    children:
    - id: CrateEmergencyBurnKit
    - id: CrateEmergencyToxinKit
    - id: CrateEmergencyBruteKit
    - id: CrateEmergencyO2Kit
    - id: CrateEmergencyRadiationKit
    - id: CrateBodyBags
    - id: CrateChemistrySupplies
    - id: CrateChemistryP
      weight: 0.5
    - id: CrateChemistryS
      weight: 0.5
    - id: CrateChemistryD
      weight: 0.5

- type: entityTable
  id: LowValueScienceCrateTable
  table: !type:GroupSelector
    children:
    - id: CrateArtifactContainer
    - id: HandheldArtifactContainer
      weight: 0.2
    - id: CrateMaterialPlasma

- type: entityTable
  id: LowValueCrateTable
  table: !type:GroupSelector
    children:
    - !type:NestedSelector
      tableId: LowValueFunCrateTable
    - !type:NestedSelector
      tableId: LowValueInstrumentCrateTable
      weight: 0.2
    - !type:NestedSelector
      tableId: LowValueMaterialCrateTable
      weight: 2
    - !type:NestedSelector
      tableId: LowValueEmergencyCrateTable
    - !type:NestedSelector
      tableId: LowValueServiceCrateTable
    - !type:NestedSelector
      tableId: LowValueEngineeringCrateTable
    - !type:NestedSelector
      tableId: LowValueMedicalCrateTable
      weight: 0.2
    - !type:NestedSelector
      tableId: LowValueScienceCrateTable
      weight: 0.2

- type: entity
  name: Filled Crate Spawner
  id: CrateFilledSpawner
  suffix: Low Value
  parent: MarkerBase
  components:
  - type: Sprite
    layers:
    - state: red
    - sprite: Structures/Storage/Crates/o2.rsi
      state: icon
  - type: EntityTableSpawner
    table: !type:NestedSelector
      tableId: LowValueCrateTable
      prob: 0.8
    offset: 0.0

- type: entity
  name: random engineering crate spawner
  id: LootSpawnerRandomCrateEngineering
  parent: MarkerBase
  components:
  - type: Sprite
    layers:
    - state: red
    - sprite: Structures/Storage/Crates/engineering.rsi
      state: icon
  - type: EntityTableSpawner
    table: !type:GroupSelector
      children:
      - !type:GroupSelector
        weight: 8
        prob: 0.9
        children:
        - id: CrateEngineering
        - id: CrateElectrical
        - id: CrateEngineeringElectricalSupplies
        - id: CrateRCDAmmo
        - id: CrateEngineeringCableLV
        - id: CrateEngineeringCableMV
        - id: CrateEngineeringCableHV
        - id: CrateEngineeringCableBulk
        - id: CrateEngineeringSingularityContainment
        - id: CrateEngineeringSingularityCollector
        - id: CrateEngineeringTeslaCoil
        - id: CrateEngineeringSingularityEmitter
        - id: CrateEngineeringGyroscope
        - id: CrateEngineeringThruster
        - id: CrateEngineeringToolbox
        - id: CrateEngineeringShuttle
        - id: CrateEngineeringSolar
        - id: CrateEngineeringJetpack
        - id: CrateEmergencyRadiation
        - id: CrateRadiation
      - !type:GroupSelector
        weight: 2
        children:
        - id: CrateEngineeringSingularityGenerator
        - id: CrateEngineeringTeslaGenerator
        - id: CrateEngineeringTeslaGroundingRod
        - id: CrateEngineeringParticleAccelerator
        - id: CrateRCD
        - id: CrateEngineeringGear
    offset: 0.0

- type: entity
  name: random security crate spawner
  id: LootSpawnerRandomCrateSecurity
  parent: MarkerBase
  components:
  - type: Sprite
    layers:
    - state: red
    - sprite: Structures/Storage/Crates/sec_gear.rsi
      state: icon
  - type: EntityTableSpawner
    table: !type:GroupSelector
      children:
      - !type:GroupSelector
        weight: 9
        prob: 0.9
        children:
        - id: CrateWeaponSecure
        - id: CrateArmoryLaser
        - id: CrateArmoryPistols
        - id: CrateTrainingBombs
        - id: CrateTrackingImplants
        - id: CrateSecurityTrackingMindshieldImplants
        - id: CrateSecurityHelmet
        - id: CrateSecurityArmor
        - id: CrateRestraints
        - id: CrateEmergencyExplosive
        - id: CrateSecurityBiosuit
      - !type:GroupSelector #Very useful stuff we probably don't want random people getting on space ruins often, even if there are hurdles to open it
        children:
        - id: CrateArmoryShotgun
        - id: CrateArmorySMG
        - id: CrateSecurityRiot
        - id: CrateSecurityNonlethal
    offset: 0.0

- type: entityTable
  id: LockboxTable
  table: !type:GroupSelector
    children:
    - id: CrateLockBoxEngineering
    - id: CrateLockBoxMedical
    - id: CrateLockBoxSecurity
    - id: CrateLockBoxScience
    - id: CrateLockBoxService

- type: entity
  name: random lockbox spawner
  id: LootSpawnerRandomLockbox
  parent: MarkerBase
  suffix: 90%
  components:
  - type: Sprite
    layers:
    - state: red
    - sprite: Structures/Storage/Crates/lockbox.rsi
      state: icon
  - type: EntityTableSpawner
    table: !type:NestedSelector
      tableId: LockboxTable
      prob: 0.9
    offset: 0.0
