]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Add generator scrap (Plasma / uranium scrap) (#32198)
authorbeck-thompson <107373427+beck-thompson@users.noreply.github.com>
Mon, 16 Dec 2024 12:33:34 +0000 (04:33 -0800)
committerGitHub <noreply@github.com>
Mon, 16 Dec 2024 12:33:34 +0000 (13:33 +0100)
* First commit

* Forgot the shading!

* tweaked  values

* sprite update

* Radiation

12 files changed:
Resources/Prototypes/Entities/Markers/Spawners/Random/Salvage/tables_loot.yml
Resources/Prototypes/Entities/Objects/Materials/scrap.yml
Resources/Textures/Objects/Materials/Scrap/generator.rsi/generator_frame.png [new file with mode: 0644]
Resources/Textures/Objects/Materials/Scrap/generator.rsi/meta.json [new file with mode: 0644]
Resources/Textures/Objects/Materials/Scrap/generator.rsi/nothing.png [new file with mode: 0644]
Resources/Textures/Objects/Materials/Scrap/generator.rsi/old_generator_plasma.png [new file with mode: 0644]
Resources/Textures/Objects/Materials/Scrap/generator.rsi/old_generator_plasma_fuel_leak.png [new file with mode: 0644]
Resources/Textures/Objects/Materials/Scrap/generator.rsi/rad_dripping.png [new file with mode: 0644]
Resources/Textures/Objects/Materials/Scrap/generator.rsi/rad_outline.png [new file with mode: 0644]
Resources/Textures/Objects/Materials/Scrap/generator.rsi/red_x.png [new file with mode: 0644]
Resources/Textures/Objects/Materials/Scrap/generator.rsi/uranium_generator.png [new file with mode: 0644]
Resources/Textures/Objects/Materials/Scrap/generator.rsi/uranium_generator_fuel_tank.png [new file with mode: 0644]

index b74a80c39d4a091dfc6c1b68fce7cb3e6bd4c357..943b906560301ff40b7e824dc544c2262fe2ba37 100644 (file)
@@ -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
       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
index 6530e3b17013d785f7d7cc5afa1b4d1f6e2b2968..734111af6dc88979cff5b31c566032115036222f 100644 (file)
     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
       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
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 (file)
index 0000000..0914769
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 (file)
index 0000000..79f35b3
--- /dev/null
@@ -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 (file)
index 0000000..54c77a6
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 (file)
index 0000000..0a40e6d
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 (file)
index 0000000..3d8b28b
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 (file)
index 0000000..3b8f9eb
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 (file)
index 0000000..09a4c08
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 (file)
index 0000000..3ec4fd6
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 (file)
index 0000000..76b11fa
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 (file)
index 0000000..59cf366
Binary files /dev/null and b/Resources/Textures/Objects/Materials/Scrap/generator.rsi/uranium_generator_fuel_tank.png differ