# SPDX-FileCopyrightText: 2024 Aiden <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2024 Alzore <140123969+Blackern5000@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Brandon Hu <103440971+Brandon-Huu@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 CaasGit <87243814+CaasGit@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Chief-Engineer <119664036+Chief-Engineer@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Cojoke <83733158+Cojoke-dot@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 DrSmugleaf <10968691+DrSmugleaf@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 DrSmugleaf <DrSmugleaf@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 EmoGarbage404 <retron404@gmail.com>
# SPDX-FileCopyrightText: 2024 Eoin Mcloughlin <helloworld@eoinrul.es>
# SPDX-FileCopyrightText: 2024 Errant <35878406+Errant-4@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Flareguy <78941145+Flareguy@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Hrosts <35345601+Hrosts@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 IProduceWidgets <107586145+IProduceWidgets@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ian <ignaz.k@live.de>
# SPDX-FileCopyrightText: 2024 Ilya246 <57039557+Ilya246@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Joel Zimmerman <JoelZimmerman@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 JustCone <141039037+JustCone14@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Killerqu00 <47712032+Killerqu00@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ko4ergaPunk <62609550+Ko4ergaPunk@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Kukutis96513 <146854220+Kukutis96513@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Lye <128915833+Lyroth001@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 MerrytheManokit <167581110+MerrytheManokit@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Mervill <mervills.email@gmail.com>
# SPDX-FileCopyrightText: 2024 Mr. 27 <45323883+Dutch-VanDerLinde@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 MureixloI <132683811+MureixloI@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 NakataRin <45946146+NakataRin@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 OrangeMoronage9622 <whyteterry0092@gmail.com>
# SPDX-FileCopyrightText: 2024 PJBot <pieterjan.briers+bot@gmail.com>
# SPDX-FileCopyrightText: 2024 Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
# SPDX-FileCopyrightText: 2024 Piras314 <p1r4s@proton.me>
# SPDX-FileCopyrightText: 2024 Plykiya <58439124+Plykiya@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Preston Smith <92108534+thetolbean@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Psychpsyo <60073468+Psychpsyo@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Repo <47093363+Titian3@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 RiceMar1244 <138547931+RiceMar1244@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 ShadowCommander <10494922+ShadowCommander@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Simon <63975668+Simyon264@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 SlamBamActionman <83650252+SlamBamActionman@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Stalen <33173619+stalengd@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 TakoDragon <69509841+BackeTako@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Thomas <87614336+Aeshus@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 TsjipTsjip <19798667+TsjipTsjip@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ubaser <134914314+UbaserB@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Unkn0wn_Gh0st <shadowstalkermll@gmail.com>
# SPDX-FileCopyrightText: 2024 Vasilis <vasilis@pikachu.systems>
# SPDX-FileCopyrightText: 2024 Vigers Ray <60344369+VigersRay@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 beck-thompson <107373427+beck-thompson@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 deathride58 <deathride58@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 deltanedas <39013340+deltanedas@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 deltanedas <@deltanedas:kde.org>
# SPDX-FileCopyrightText: 2024 dffdff2423 <dffdff2423@gmail.com>
# SPDX-FileCopyrightText: 2024 eoineoineoin <github@eoinrul.es>
# SPDX-FileCopyrightText: 2024 foboscheshir <156405958+foboscheshir@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 github-actions[bot] <41898282+github-actions[bot]@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 metalgearsloth <comedian_vs_clown@hotmail.com>
# SPDX-FileCopyrightText: 2024 nikthechampiongr <32041239+nikthechampiongr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 plykiya <plykiya@protonmail.com>
# SPDX-FileCopyrightText: 2024 saintmuntzer <47153094+saintmuntzer@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 shamp <140359015+shampunj@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 slarticodefast <161409025+slarticodefast@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 strO0pwafel <153459934+strO0pwafel@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 stroopwafel <j.o.luijkx@student.tudelft.nl>
# SPDX-FileCopyrightText: 2024 themias <89101928+themias@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 to4no_fix <156101927+chavonadelal@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 username <113782077+whateverusername0@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 voidnull000 <18663194+voidnull000@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 whateverusername0 <whateveremail>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 SpaceRox1244 <138547931+SpaceRox1244@users.noreply.github.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  parent: BaseItem
  id: BaseScrap
  abstract: true
  name: scrap
  description: Worthless junk. You could probably get some materials out of it though.
  suffix: Scrap
  components:
  - type: Sprite
    sprite: Objects/Materials/Scrap/generic.rsi
  - type: Item
    sprite: Objects/Materials/Scrap/generic.rsi
    size: Normal
  - type: Damageable
    damageContainer: Inorganic
    damageModifierSet: FlimsyMetallic
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 150
      behaviors:
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  - type: Tag
    tags:
    - Recyclable
    - SalvageScrap

- type: entity
  parent: BaseStructure
  id: BaseScrapLarge
  abstract: true
  name: scrap
  description: Worthless junk. You could probably get some materials out of it though.
  suffix: Scrap
  components:
  - type: InteractionOutline
  - type: Damageable
    damageContainer: Inorganic
    damageModifierSet: FlimsyMetallic
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 150
      behaviors:
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  - type: Tag
    tags:
    - Recyclable
  - type: Transform
    anchored: False
    noRot: true
  - type: Physics
    bodyType: Dynamic
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.40,-0.40,0.40,0.40"
        density: 200
        mask:
          - MachineMask
        layer:
          - MachineLayer

- type: entity
  parent: BaseScrap
  id: ScrapSteel
  name: blasted steel pile
  description: An pile of steel welded together in extreme heat. It's of a decent size overall; you could probably get a fair amount of sheets out of it.
  components:
  - type: Sprite
    layers:
      - state: metal-1
        map: [ "base" ]
  - type: Item
    size: Large
    shape:
    - 0,0,4,4 # 5x5
    heldPrefix: metal
  - type: MultiHandedItem
  - type: RandomSprite
    available:
    - base:
        metal-1: ""
        metal-2: ""
        metal-3: ""
  - type: PhysicalComposition
    materialComposition:
      Steel: 3000 # 30 sheets

- type: entity
  parent: BaseScrap
  id: ScrapGlass
  name: scrap circuitry
  description: A huge lump of various circuits, strangely fused together. You could likely extract some materials out of this.
  components:
  - type: Sprite
    layers:
    - state: glass-1
      map: [ "base" ]
  - type: Item
    heldPrefix: "glass"
    size: Large
    shape:
    - 0,0,2,2 # 3x3
  - type: RandomSprite
    available:
    - base:
        glass-1: ""
        glass-2: ""
        glass-3: ""
        glass-4: ""
        glass-5: ""
        glass-6: ""
  - type: PhysicalComposition
    materialComposition:
      Glass: 1500 # 15 sheets
      Steel: 500 # 5 sheets

- type: entity
  parent: BaseScrap
  id: ScrapAirlock1
  name: airlock door
  description: This used to keep air in. Now it doesn't seem to be doing anything at all.
  components:
  - type: Sprite
    layers:
    - state: junk-airlock-1
      map: [ "base" ]
  - type: RandomSprite
    available:
    - base:
        junk-airlock-1: ""
        junk-airlock-2: ""
  - type: Item
    size: Large
    shape:
    - 0,0,4,4 # 5x5
    heldPrefix: "airlock"
  - type: MultiHandedItem
  - type: PhysicalComposition
    materialComposition:
      Steel: 1500 # 15 sheets

- type: entity
  parent: BaseScrap
  id: ScrapAirlock2
  name: airlock light
  description: Serves it right for flashing red all those times.
  components:
  - type: Sprite
    layers:
    - state: junk-airlock-3
  - type: Item
    size: Normal
    shape:
    - 0,0,3,0
  - type: PhysicalComposition
    materialComposition:
      Steel: 200 # 2 sheets
      Glass: 500 # 5 sheets

- type: entity
  parent: BaseScrap
  id: ScrapBucket
  name: busted bucket
  description: Dear god...
  components:
  - type: Sprite
    layers:
    - state: junk-bucket
  - type: PhysicalComposition
    materialComposition:
      Plastic: 300 # 3 sheets

- type: entity
  parent: BaseScrap
  id: ScrapCamera
  name: broken camera
  description: It might still be watching.
  components:
  - type: Sprite
    layers:
    - state: junk-camera
  - type: PhysicalComposition
    materialComposition:
      Steel: 500 # 5 sheets
      Glass: 100 # 1 sheet

- type: entity
  parent: BaseScrap
  id: ScrapCanister1
  name: canister handle
  description: Helpful for holding a canister. Now you just need the actual canister part.
  components:
  - type: Sprite
    layers:
    - state: junk-canister-1
  - type: PhysicalComposition
    materialComposition:
      Steel: 300 # 3 sheets

- type: entity
  parent: BaseScrap
  id: ScrapCanister2
  name: canister valve
  description: A valve from a gas canister.
  components:
  - type: Sprite
    layers:
    - state: junk-canister-2
  - type: Item
    size: Small
  - type: PhysicalComposition
    materialComposition:
      Steel: 200 # 2 sheets

- type: entity
  parent: BaseScrap
  id: ScrapCloset
  name: closet door
  description: A blown off door from a maintenance closet. Looks like a nice piece of wall decor.
  components:
  - type: Sprite
    layers:
    - state: junk-closet
  - type: MultiHandedItem
  - type: Item
    heldPrefix: closet
    size: Huge
    shape:
    - 0,0,5,2
  - type: PhysicalComposition
    materialComposition:
      Steel: 1500 # 15 sheets

- type: entity
  parent: BaseScrap
  id: ScrapFaxMachine
  name: fax machine
  description: The unfortunate result of one too many ASCII arts being sent to Central Command.
  components:
  - type: Sprite
    layers:
    - state: junk-fax
  - type: Item
    size: Huge
  - type: PhysicalComposition
    materialComposition:
      Plastic: 800 # 8 sheets
      Steel: 200 # 2 sheets

- type: entity
  parent: BaseScrap
  id: ScrapFireExtinguisher
  name: split fire extinguisher
  description: The large gash down the center makes you worry for the previous user.
  components:
  - type: Sprite
    layers:
    - state: junk-fireextinguisher
  - type: PhysicalComposition
    materialComposition:
      Steel: 600 # 6 sheets

- type: entity
  parent: BaseScrap
  id: ScrapFirelock1
  name: firelock door
  description: At least you still know what it's meant for.
  components:
  - type: Sprite
    layers:
    - state: junk-firelock-1
  - type: Item
    size: Large
    shape:
    - 0,0,4,4 # 5x5
    heldPrefix: firelock-1
  - type: MultiHandedItem
  - type: PhysicalComposition
    materialComposition:
      Steel: 2000 # 20 sheets

- type: entity
  parent: BaseScrap
  id: ScrapFirelock2
  name: firelock door
  description: OH! That's where the other half went!
  components:
  - type: Sprite
    layers:
    - state: junk-firelock-2
  - type: Item
    size: Large
    shape:
    - 0,0,4,4 # 5x5
    heldPrefix: firelock-2
  - type: MultiHandedItem
  - type: PhysicalComposition
    materialComposition:
      Steel: 2000 # 20 sheets

- type: entity
  parent: BaseScrap
  id: ScrapFirelock3
  name: firelock frame
  components:
  - type: Sprite
    layers:
    - state: junk-firelock-3
  - type: Item
    size: Large
  - type: PhysicalComposition
    materialComposition:
      Steel: 700 # 7 sheets

- type: entity
  parent: BaseScrap
  id: ScrapIntercom
  name: intercom scrap
  description: You wish it at least came with some encryption keys.
  components:
  - type: Sprite
    layers:
    - state: junk-intercom-1
      map: [ "base" ]
  - type: RandomSprite
    available:
    - base:
        junk-intercom-1: ""
        junk-intercom-2: ""
        junk-intercom-3: ""
  - type: Item
  - type: PhysicalComposition
    materialComposition:
      Steel: 400 # 4 sheets
      Plastic: 300 # 3 sheets

- type: entity
  parent: BaseScrap
  id: ScrapJetpack
  name: busted jetpack
  description: Looks like it won't be flying any more.
  components:
  - type: Sprite
    layers:
    - state: junk-jetpack
  - type: Item
    size: Huge
    heldPrefix: jetpack
  - type: PhysicalComposition
    materialComposition:
      Steel: 1000 # 10 sheets
      Plastic: 200 # 2 sheets

- type: entity
  parent: BaseScrap
  id: ScrapMedkit
  name: snapped medkit
  description: Hopefully they got some use out of it.
  components:
  - type: Sprite
    layers:
    - state: junk-medkit-1
      map: [ "base" ]
  - type: RandomSprite
    available:
    - base:
        junk-medkit-1: ""
        junk-medkit-2: ""
  - type: Item
    size: Large
  - type: PhysicalComposition
    materialComposition:
      Plastic: 500 # 5 sheets

- type: entity
  parent: BaseScrap
  id: ScrapMopBucket
  name: half a mop bucket
  description: Tiders die. Janitors survive.
  components:
  - type: Sprite
    layers:
    - state: junk-mop-bucket
  - type: Item
    size: Huge
  - type: PhysicalComposition
    materialComposition:
      Plastic: 1500 # 15 sheets

- type: entity
  parent: BaseScrap
  id: ScrapPAI
  name: personal ai device
  description: A buddy! You still in there? Hello? Buddy???
  components:
  - type: Sprite
    layers:
    - state: junk-pai
  - type: Item
    size: Small
  - type: PhysicalComposition
    materialComposition:
      Steel: 300 # 3 sheets
      Plastic: 200 # 2 sheets

- type: entity
  parent: BaseScrap
  id: ScrapPAIGold
  name: gilded personal ai device
  description: Wow! What a one-in-a-million find! This would be worth a fortune... if it was in good condition.
  components:
  - type: Sprite
    layers:
    - state: junk-pai-gold
  - type: Item
    size: Small
  - type: PhysicalComposition
    materialComposition:
      Gold: 100 # 1 sheet
      Plastic: 400 # 4 sheets

- type: entity
  parent: BaseScrap
  id: ScrapTube
  name: shattered sample tube
  description: A glass tube containing some kind of rare sample. Or at least, it used to contain it. Not much left in there now.
  components:
  - type: Sprite
    layers:
    - state: tube
      map: [ "base" ]
  - type: RandomSprite
    available:
    - base:
        tube: ""
        tube-bl: ""
        tube-bk: ""
        tube-g: ""
        tube-r: ""
        tube-y: ""
  - type: Item
    size: Small
  - type: PhysicalComposition
    materialComposition:
      Glass: 500 # 5 sheets
      Plastic: 100 # 1 sheet

- type: entity
  parent: BaseScrapLarge
  id: ScrapGeneratorPlasmaLeaking
  name: leaking P.A.C.M.A.N. generator
  description: An old looking P.A.C.M.A.N. generator whos plasma tanks started leaking.
  components:
  - type: Sprite
    sprite: Objects/Materials/Scrap/generator.rsi
    snapCardinals: true
    layers:
      - state: old_generator_plasma
      - state: old_generator_plasma_fuel_leak
  - type: PhysicalComposition
    materialComposition:
      Steel: 4000 # 40 sheets
      Plasma: 2500 # 25 sheets
      Plastic: 500 # 5 sheets

- type: entity
  parent: BaseScrapLarge
  id: ScrapGeneratorPlasma
  name: old P.A.C.M.A.N. generator
  description: An old looking P.A.C.M.A.N. generator. It's in very poor condition and non functional.
  components:
  - type: Sprite
    sprite: Objects/Materials/Scrap/generator.rsi
    layers:
      - state: old_generator_plasma
  - type: PhysicalComposition
    materialComposition:
      Steel: 4000 # 40 sheets
      Plasma: 1000 # 10 sheets
      Plastic: 500 # 5 sheets

- type: entity
  parent: BaseScrapLarge
  id: ScrapGeneratorUraniumLeaking
  name: leaking S.U.P.E.R.P.A.C.M.A.N. generator
  description: A S.U.P.E.R.P.A.C.M.A.N. generator that appears to have had some kind of catastrophic failure. Its leaking uranium.
  components:
  - type: Sprite
    sprite: Objects/Materials/Scrap/generator.rsi
    layers:
      - state: uranium_generator
      - map: [ "extra" ]
      - state: rad_dripping
        shader: unshaded
      - state: rad_outline
        shader: unshaded
  - type: RandomSprite
    available:
    - extra:
        red_x: ""
        nothing: ""
  - type: MultiHandedItem
  - type: PhysicalComposition
    materialComposition:
      Steel: 4000 # 40 sheets
      Uranium: 2500 # 25 sheets
      Plastic: 500 # 5 sheets
  - type: RadiationSource
    intensity: 1.0

- type: entity
  parent: BaseScrapLarge
  id: ScrapGeneratorUranium
  name: destroyed S.U.P.E.R.P.A.C.M.A.N. generator
  description: A S.U.P.E.R.P.A.C.M.A.N. generator that appears to have had some kind of catastrophic failure.
  components:
  - type: Sprite
    sprite: Objects/Materials/Scrap/generator.rsi
    layers:
      - state: uranium_generator
      - map: [ "extra" ]
  - type: RandomSprite
    available:
    - extra:
        red_x: ""
        nothing: ""
  - type: PhysicalComposition
    materialComposition:
      Steel: 4000 # 40 sheets
      Uranium: 1000 # 10 sheets
      Plastic: 500 # 5 sheets
  - type: RadiationSource
    intensity: 0.5

- type: entity
  parent: BaseScrapLarge
  id: ScrapGeneratorFrame
  name: generator frame
  description: A frame of a P.A.C.M.A.N. or S.U.P.E.R.P.A.C.M.A.N. type generator. Where is the rest of it?
  components:
  - type: Sprite
    sprite: Objects/Materials/Scrap/generator.rsi
    layers:
      - state: generator_frame
  - type: PhysicalComposition
    materialComposition:
      Steel: 1500 # 15 sheets

- type: entity
  parent: BaseScrap
  id: ScrapGeneratorFuelTank
  name: fuel tank
  description: A fuel tank from a S.U.P.E.R.P.A.C.M.A.N. type generator. The gauge indicates its got a little fuel left.
  components:
  - type: Sprite
    sprite: Objects/Materials/Scrap/generator.rsi
    layers:
      - state: uranium_generator_fuel_tank
  - type: PhysicalComposition
    materialComposition:
      Steel: 200 # 2 sheets
      Uranium: 500 # 5 sheets