diff --git a/Resources/Prototypes/Entities/Markers/Spawners/Random/Salvage/tables_loot.yml b/Resources/Prototypes/Entities/Markers/Spawners/Random/Salvage/tables_loot.yml index b74a80c39d4a09..943b906560301f 100644 --- a/Resources/Prototypes/Entities/Markers/Spawners/Random/Salvage/tables_loot.yml +++ b/Resources/Prototypes/Entities/Markers/Spawners/Random/Salvage/tables_loot.yml @@ -49,6 +49,8 @@ - id: SheetSteel10 - id: SheetGlass10 - id: SheetPlastic10 + - id: ScrapGeneratorFuelTank + weight: 0.5 - id: PartRodMetal10 weight: 0.33 - id: MaterialWoodPlank10 @@ -64,6 +66,9 @@ id: SalvageScrapLarge table: !type:GroupSelector children: + - !type:NestedSelector + tableId: RandomGeneratorTable + weight: 2 - id: ScrapAirlock1 - id: ScrapCloset - id: ScrapFirelock1 @@ -250,3 +255,16 @@ 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 diff --git a/Resources/Prototypes/Entities/Objects/Materials/scrap.yml b/Resources/Prototypes/Entities/Objects/Materials/scrap.yml index 6530e3b17013d7..c63f0bdd37d157 100644 --- a/Resources/Prototypes/Entities/Objects/Materials/scrap.yml +++ b/Resources/Prototypes/Entities/Objects/Materials/scrap.yml @@ -26,6 +26,46 @@ tags: - Recyclable +- 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 @@ -404,5 +444,114 @@ 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: 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: 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 diff --git a/Resources/Textures/Objects/Materials/Scrap/generator.rsi/generator_frame.png b/Resources/Textures/Objects/Materials/Scrap/generator.rsi/generator_frame.png new file mode 100644 index 00000000000000..0914769086d51f Binary files /dev/null and b/Resources/Textures/Objects/Materials/Scrap/generator.rsi/generator_frame.png differ diff --git a/Resources/Textures/Objects/Materials/Scrap/generator.rsi/meta.json b/Resources/Textures/Objects/Materials/Scrap/generator.rsi/meta.json new file mode 100644 index 00000000000000..79f35b3cb27325 --- /dev/null +++ b/Resources/Textures/Objects/Materials/Scrap/generator.rsi/meta.json @@ -0,0 +1,57 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Made by Beck Thompson using assets from https://github.com/Baystation12/Baystation12/blob/caa635edb97c58301ccdc64757eba323b6673cf3/icons/obj/structures/portgen.dmi", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "old_generator_plasma" + }, + { + "name": "old_generator_plasma_fuel_leak" + }, + { + "name": "generator_frame" + }, + { + "name": "uranium_generator" + }, + { + "name": "uranium_generator_fuel_tank" + }, + { + "name": "red_x" + }, + { + "name": "nothing" + }, + { + "name": "rad_outline", + "delays": [ + [ + 0.3, + 0.3, + 0.3, + 0.3 + ] + ] + }, + { + "name": "rad_dripping", + "delays": [ + [ + 2.0, + 0.05, + 0.05, + 0.05, + 0.05, + 0.05, + 0.05 + ] + ] + } + ] + } diff --git a/Resources/Textures/Objects/Materials/Scrap/generator.rsi/nothing.png b/Resources/Textures/Objects/Materials/Scrap/generator.rsi/nothing.png new file mode 100644 index 00000000000000..54c77a6a0e9e7b Binary files /dev/null and b/Resources/Textures/Objects/Materials/Scrap/generator.rsi/nothing.png differ diff --git a/Resources/Textures/Objects/Materials/Scrap/generator.rsi/old_generator_plasma.png b/Resources/Textures/Objects/Materials/Scrap/generator.rsi/old_generator_plasma.png new file mode 100644 index 00000000000000..0a40e6d2c04800 Binary files /dev/null and b/Resources/Textures/Objects/Materials/Scrap/generator.rsi/old_generator_plasma.png differ diff --git a/Resources/Textures/Objects/Materials/Scrap/generator.rsi/old_generator_plasma_fuel_leak.png b/Resources/Textures/Objects/Materials/Scrap/generator.rsi/old_generator_plasma_fuel_leak.png new file mode 100644 index 00000000000000..3d8b28b3465684 Binary files /dev/null and b/Resources/Textures/Objects/Materials/Scrap/generator.rsi/old_generator_plasma_fuel_leak.png differ diff --git a/Resources/Textures/Objects/Materials/Scrap/generator.rsi/rad_dripping.png b/Resources/Textures/Objects/Materials/Scrap/generator.rsi/rad_dripping.png new file mode 100644 index 00000000000000..3b8f9eb2cd3055 Binary files /dev/null and b/Resources/Textures/Objects/Materials/Scrap/generator.rsi/rad_dripping.png differ diff --git a/Resources/Textures/Objects/Materials/Scrap/generator.rsi/rad_outline.png b/Resources/Textures/Objects/Materials/Scrap/generator.rsi/rad_outline.png new file mode 100644 index 00000000000000..09a4c0826ac078 Binary files /dev/null and b/Resources/Textures/Objects/Materials/Scrap/generator.rsi/rad_outline.png differ diff --git a/Resources/Textures/Objects/Materials/Scrap/generator.rsi/red_x.png b/Resources/Textures/Objects/Materials/Scrap/generator.rsi/red_x.png new file mode 100644 index 00000000000000..3ec4fd6268312a Binary files /dev/null and b/Resources/Textures/Objects/Materials/Scrap/generator.rsi/red_x.png differ diff --git a/Resources/Textures/Objects/Materials/Scrap/generator.rsi/uranium_generator.png b/Resources/Textures/Objects/Materials/Scrap/generator.rsi/uranium_generator.png new file mode 100644 index 00000000000000..76b11fa509e588 Binary files /dev/null and b/Resources/Textures/Objects/Materials/Scrap/generator.rsi/uranium_generator.png differ diff --git a/Resources/Textures/Objects/Materials/Scrap/generator.rsi/uranium_generator_fuel_tank.png b/Resources/Textures/Objects/Materials/Scrap/generator.rsi/uranium_generator_fuel_tank.png new file mode 100644 index 00000000000000..59cf3663bf3070 Binary files /dev/null and b/Resources/Textures/Objects/Materials/Scrap/generator.rsi/uranium_generator_fuel_tank.png differ