# SPDX-FileCopyrightText: 2024 12rabbits <53499656+12rabbits@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Alzore <140123969+Blackern5000@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 ArtisticRoomba <145879011+ArtisticRoomba@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Brandon Hu <103440971+Brandon-Huu@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Dimastra <65184747+Dimastra@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Dimastra <dimastra@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ed <96445749+TheShuEd@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Emisse <99158783+Emisse@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Eoin Mcloughlin <helloworld@eoinrul.es>
# SPDX-FileCopyrightText: 2024 IProduceWidgets <107586145+IProduceWidgets@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 JIPDawg <51352440+JIPDawg@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 JIPDawg <JIPDawg93@gmail.com>
# SPDX-FileCopyrightText: 2024 JustCone <141039037+JustCone14@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Mervill <mervills.email@gmail.com>
# SPDX-FileCopyrightText: 2024 Moomoobeef <62638182+Moomoobeef@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 PJBot <pieterjan.briers+bot@gmail.com>
# SPDX-FileCopyrightText: 2024 Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
# SPDX-FileCopyrightText: 2024 Pieter-Jan Briers <pieterjan.briers@gmail.com>
# SPDX-FileCopyrightText: 2024 Piras314 <p1r4s@proton.me>
# SPDX-FileCopyrightText: 2024 PopGamer46 <yt1popgamer@gmail.com>
# SPDX-FileCopyrightText: 2024 PursuitInAshes <pursuitinashes@gmail.com>
# SPDX-FileCopyrightText: 2024 QueerNB <176353696+QueerNB@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Saphire Lattice <lattice@saphi.re>
# SPDX-FileCopyrightText: 2024 ShadowCommander <10494922+ShadowCommander@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Simon <63975668+Simyon264@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Spessmann <156740760+Spessmann@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Thomas <87614336+Aeshus@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Winkarst <74284083+Winkarst-cpu@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 beck-thompson <107373427+beck-thompson@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 deltanedas <39013340+deltanedas@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 deltanedas <@deltanedas:kde.org>
# SPDX-FileCopyrightText: 2024 eoineoineoin <github@eoinrul.es>
# SPDX-FileCopyrightText: 2024 github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 lunarcomets <140772713+lunarcomets@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 lzk <124214523+lzk228@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 slarticodefast <161409025+slarticodefast@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 stellar-novas <stellar_novas@riseup.net>
# SPDX-FileCopyrightText: 2024 themias <89101928+themias@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aiden <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2025 GoobBot <uristmchands@proton.me>
# SPDX-FileCopyrightText: 2025 Nim <128169402+Nimfar11@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Roudenn <romabond091@gmail.com>
# SPDX-FileCopyrightText: 2025 ScarKy0 <106310278+ScarKy0@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Solstice <solsticeofthewinter@gmail.com>
# SPDX-FileCopyrightText: 2025 Ted Lukin <66275205+pheenty@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 gluesniffler <159397573+gluesniffler@users.noreply.github.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# Scrap: Worthless items that can be recycled into materials

- type: entityTable
  id: SalvageScrapLowValue
  table: !type:GroupSelector
    children:
    - id: ScrapAirlock2
    - id: ScrapBucket
    - id: ScrapCamera
    - id: ScrapCanister1
    - id: ScrapCanister2
    - id: ScrapFaxMachine
    - id: ScrapFireExtinguisher
    - id: ScrapFirelock3
    - id: ScrapIntercom
    - id: ScrapMedkit
    - !type:GroupSelector
      children:
      - id: ScrapPAI
      - id: ScrapPAIGold
        weight: 0.1
    - id: ScrapTube
    - id: ShardGlass
      amount: !type:RangeNumberSelector
        range: 1, 3
    - id: SheetSteel1
      weight: 0.5
      amount: !type:RangeNumberSelector
        range: 1, 3
    - id: SheetPlastic1
      weight: 0.5
      amount: !type:RangeNumberSelector
        range: 1, 3
    - id: PartRodMetal1
      weight: 0.5
      amount: !type:RangeNumberSelector
        range: 1, 3

- type: entityTable
  id: SalvageScrapHighValue
  table: !type:GroupSelector
    children:
    - id: ScrapSteel
      weight: 2
    - id: ScrapGlass
      weight: 2
    # - id: ScrapPlastic TODO: high-value plastic scrap.
    #  weight: 2
    - id: SheetSteel10
    - id: SheetGlass10
    - id: SheetPlastic10
    - id: ScrapGeneratorFuelTank
      weight: 0.5
    - id: PartRodMetal10
      weight: 0.33
    - id: MaterialWoodPlank10
      weight: 0.2
    - id: SheetPlasma10
      weight: 0.2
    - id: ArtifactFragment1
      weight: 0.05
    - id: SheetPlasteel10
      weight: 0.05

- type: entityTable
  id: SalvageScrapLarge
  table: !type:GroupSelector
    children:
    - !type:NestedSelector
      tableId: RandomGeneratorTable
      weight: 2
    - id: ScrapAirlock1
    - id: ScrapCloset
    - id: ScrapFirelock1
    - id: ScrapFirelock2
    - id: ScrapJetpack
      weight: 0.5
    - id: ScrapMopBucket
      weight: 0.5
    - !type:GroupSelector
      weight: 2
      children:
      - !type:NestedSelector
        weight: 3
        tableId: RandomChemicalBarrel
      - !type:NestedSelector
        weight: 1
        tableId: RandomChemicalBarrelRadioactive

# Treasure: High-value scatterables that don't do a ton.

- type: entityTable
  id: SalvageTreasureCommon
  table: !type:GroupSelector
    children:
    - id: SheetPlasma1
      amount: !type:RangeNumberSelector
        range: 3, 5
    - id: ResearchDisk
    - id: DrinkGoldenCup
    - id: TreasureSampleTube
    - !type:NestedSelector
      tableId: TreasureCoinPile
      rolls: !type:RangeNumberSelector
        range: 1, 2
    - !type:NestedSelector
      tableId: RandomInstrumentTable

- type: entityTable
  id: SalvageTreasureUncommon
  table: !type:GroupSelector
    children:
    - id: IngotSilver1
      amount: !type:RangeNumberSelector
        range: 1, 5
    - id: IngotGold1
      amount: !type:RangeNumberSelector
        range: 3, 5
    - id: TreasureDatadiskEncrypted
    - !type:GroupSelector
      children:
      - id: TreasureCDDrive
      - id: TreasureHardDiskDrive
      - id: TreasureFlopDiskDrive
    - !type:NestedSelector
      tableId: TreasureCoinPile
      rolls: !type:RangeNumberSelector
        range: 4, 7
    - id: SpaceCash1000
    - id: WristwatchGold
    - id: ExperimentalCircuitBoard
    - !type:NestedSelector
      tableId: RingTableCommon

- type: entityTable
  id: SalvageTreasureRare
  table: !type:GroupSelector
    children:
    - id: MaterialDiamond1
    - id: TreasureCPUSupercharged
    - id: TechnologyDiskRare
      weight: 0.5
    - id: ResearchDisk10000
      weight: 0.5
    - id: ArabianLamp
    - !type:NestedSelector
      tableId: TreasureCoinPileRare
      rolls: !type:RangeNumberSelector
        range: 2, 5
    - !type:AllSelector
      children:
      - id: BriefcaseBrown
      - !type:GroupSelector
        rolls: !type:RangeNumberSelector
          range: 3, 5
        children:
        - id: SpaceCash1000
          weight: 60
        - id: SpaceCash2500
          weight: 25
        - id: SpaceCash5000
          weight: 14
        - id: SpaceCash10000
          weight: 1
    - !type:NestedSelector
      tableId: RingTableRare

- type: entityTable
  id: SalvageTreasureLegendary
  table: !type:GroupSelector
    children:
    - id: ClothingMaskGoldenCursed
    - id: ClothingHeadHatFancyCrown
    - id: GoldenBikeHorn
    - id: ClothingHeadHatCatEars
    - id: GoldenPersonalAI
    - id: TreasureCoinDiamond
      amount: !type:RangeNumberSelector
        range: 2, 5
    - !type:NestedSelector
      tableId: RingTableRare
      rolls: !type:RangeNumberSelector
        range: 2, 3

# Equipment: Tools and things used by salvagers. Quote unquote "Gamer Loot"

- type: entityTable
  id: SalvageEquipmentCommon
  table: !type:GroupSelector
    children:
    - id: Flare
    - id: Crowbar
    - id: Pickaxe
    - id: ClothingMaskGas
    - !type:GroupSelector
      children:
      - id: Wirecutter
      - id: Screwdriver
      - id: Wrench
      - id: Welder
        weight: 0.5
    - id: Shovel
    - id: FlashlightLantern
    - id: FireExtinguisher
    - id: SurvivalKnife

- type: entityTable
  id: SalvageEquipmentUncommon
  table: !type:GroupSelector
    children:
    - id: OreBag
    - id: HandheldGPSBasic
    - id: PowerCellHighPrinted
    - id: RadioHandheld
    - id: ClothingBeltUtility
    - id: WeaponProtoKineticAccelerator
      weight: 0.5
    - id: OxygenTankFilled
    - id: WelderIndustrial
    - id: FoodSnackLollypopWrappedMystery # Goobstation
    - id: WeaponGrapplingGun
    - !type:GroupSelector
      children:
      - id: ClothingHeadHatWelding
      - id: ClothingHeadHatWeldingMaskFlame
        weight: 0.25
      - id: ClothingHeadHatWeldingMaskFlameBlue
        weight: 0.25
      - id: ClothingHeadHatWeldingMaskPainted
        weight: 0.1

- type: entityTable
  id: SalvageEquipmentRare
  table: !type:GroupSelector
    children:
    - id: BlueprintDoubleEmergencyTank
    - id: FultonBeacon
    - id: Fulton
      amount: !type:RangeNumberSelector
        range: 1, 3
    - id: HandHeldMassScanner
    - id: WeaponCrusherDagger
    - id: MiningDrill
    - id: ClothingEyesGlassesMeson
    - id: ClothingBeltSalvageWebbing
    - id: SeismicCharge
    - id: MineralScanner
    - id: FoodSnackLollypopWrappedMysteryEvil # Goobstation
    - id: FoodSnackLollypopWrappedOmnizine # Goobstation
      weight: 0.5
    - id: WeaponCrusher
      weight: 0.5
    - !type:GroupSelector
      children:
      - id: JetpackBlue
      - id: JetpackBlack

- type: entityTable
  id: SalvageEquipmentLegendary
  table: !type:GroupSelector
    children:
    - id: AdvancedMineralScanner
    # - id: BlueprintFulton # Goobstation - roundstart
    # - id: BlueprintSeismicCharge # Goobstation - emag locked
    - id: WeaponCrusherGlaive
    - id: ClothingOuterHardsuitSalvage
    - id: ChemistryBottleOmnizine
    - id: FoodSnackLollypopWrappedCarpEvil # Goobstation
    - !type:GroupSelector
      children:
      - id: JetpackBlueFilled
      - id: JetpackBlackFilled

- type: entityTable
  id: RandomGeneratorTable
  table: !type:GroupSelector
    children:
    - id: ScrapGeneratorPlasmaLeaking
    - id: ScrapGeneratorUraniumLeaking
    - id: ScrapGeneratorPlasma
      weight: 0.5
    - id: ScrapGeneratorUranium
      weight: 0.5
    - id: ScrapGeneratorFrame
      weight: 0.25
