]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Add chem barrels to salvage (#37204)
authorNemanja <98561806+EmoGarbage404@users.noreply.github.com>
Mon, 12 May 2025 10:55:11 +0000 (06:55 -0400)
committerGitHub <noreply@github.com>
Mon, 12 May 2025 10:55:11 +0000 (12:55 +0200)
* Add chem barrels to salvage

* Resprite and attribution before someone gets on my ass

* redo rad barrel too

Resources/Prototypes/Entities/Markers/Spawners/Random/Salvage/tables_loot.yml
Resources/Prototypes/Entities/Structures/Storage/barrels.yml [new file with mode: 0644]
Resources/Textures/Structures/Storage/barrels.rsi/flamingmetalbarrel.png [new file with mode: 0644]
Resources/Textures/Structures/Storage/barrels.rsi/iedweldbarrel.png [new file with mode: 0644]
Resources/Textures/Structures/Storage/barrels.rsi/meta.json [new file with mode: 0644]
Resources/Textures/Structures/Storage/barrels.rsi/metalbarrel.png [new file with mode: 0644]
Resources/Textures/Structures/Storage/barrels.rsi/radbarrel.png [new file with mode: 0644]
Resources/Textures/Structures/Storage/barrels.rsi/silicatebarrel.png [new file with mode: 0644]
Resources/Textures/Structures/Storage/barrels.rsi/waterbarrel.png [new file with mode: 0644]
Resources/Textures/Structures/Storage/barrels.rsi/weldbarrel.png [new file with mode: 0644]
Resources/Textures/Structures/Storage/barrels.rsi/woodenbarrel.png [new file with mode: 0644]

index dba4ec6789a8ae2eed87599503808a1abd41609d..65f8f66106cab6293dccdb34e2334cdb3ac0a317 100644 (file)
       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.
 
diff --git a/Resources/Prototypes/Entities/Structures/Storage/barrels.yml b/Resources/Prototypes/Entities/Structures/Storage/barrels.yml
new file mode 100644 (file)
index 0000000..cbc71ba
--- /dev/null
@@ -0,0 +1,233 @@
+- type: entity
+  parent: [ StorageTank ]
+  id: BaseBarrelChem
+  abstract: true
+  name: chemical barrel
+  description: A small metal drum. How tropical.
+  components:
+  - type: Sprite
+    sprite: Structures/Storage/barrels.rsi
+    state: metalbarrel
+    noRot: true
+  - type: Fixtures
+    fixtures:
+      fix1:
+        shape:
+          !type:PhysShapeAabb
+          bounds: "-0.18,-0.48,0.18,0.28"
+        density: 200
+        mask:
+        - MachineMask
+        layer:
+        - MachineLayer
+  - type: Destructible
+    thresholds:
+    - trigger:
+        !type:DamageTrigger
+        damage: 100
+      behaviors:
+      - !type:DoActsBehavior
+        acts: [ "Destruction" ]
+    - trigger:
+        !type:DamageTrigger
+        damage: 25
+      behaviors:
+      - !type:SpillBehavior
+        solution: tank
+      - !type:PlaySoundBehavior
+        sound:
+          collection: MetalBreak
+      - !type:DoActsBehavior
+        acts: ["Destruction"]
+  - type: SolutionContainerManager
+    solutions:
+      tank:
+        maxVol: 500
+  - type: PhysicalComposition
+    materialComposition:
+      Steel: 3000 # 30 sheets, 1 stack
+  - type: ExaminableSolution
+    solution: tank
+  - type: StaticPrice
+    price: 500
+
+- type: entity
+  parent: BaseBarrelChem
+  id: BaseBarrelChemRadioactive
+  abstract: true
+  name: radioactive barrel
+  description: It seems to be leaking a bit. I don't think you'd want to be around this for long.
+  components:
+  - type: Sprite
+    state: radbarrel
+  - type: RadiationSource
+    intensity: 1.0
+    slope: 0.25
+
+- type: entityTable
+  id: RandomChemicalBarrel
+  table: !type:GroupSelector
+    children:
+    - id: BarrelChemFilledIodine
+    - id: BarrelChemFilledFluorine
+    - id: BarrelChemFilledChlorine
+    - id: BarrelChemFilledEthanol
+    - id: BarrelChemFilledPhosphorus
+    - id: BarrelChemFilledSilicon
+    - id: BarrelChemFilledMercury
+    - id: BarrelChemFilledLube # oiled up...
+      weight: 0.1
+
+- type: entityTable
+  id: RandomChemicalBarrelRadioactive
+  table: !type:GroupSelector
+    children:
+    - id: BaseBarrelChemRadioactiveEmpty
+      weight: 2
+    - id: BaseBarrelChemRadioactiveFilledRadium
+    - id: BaseBarrelChemRadioactiveFilledUranium
+
+- type: entity
+  parent: BaseBarrelChem
+  id: BarrelChemEmpty
+  suffix: Empty
+
+- type: entity
+  parent: BaseBarrelChem
+  id: BarrelChemFilledIodine
+  suffix: Iodine
+  components:
+  - type: SolutionContainerManager
+    solutions:
+      tank:
+        maxVol: 500
+        reagents:
+        - ReagentId: Iodine
+          Quantity: 500
+
+- type: entity
+  parent: BaseBarrelChem
+  id: BarrelChemFilledFluorine
+  suffix: Fluorine
+  components:
+  - type: SolutionContainerManager
+    solutions:
+      tank:
+        maxVol: 500
+        reagents:
+        - ReagentId: Fluorine
+          Quantity: 500
+
+- type: entity
+  parent: BaseBarrelChem
+  id: BarrelChemFilledChlorine
+  suffix: Chlorine
+  components:
+  - type: SolutionContainerManager
+    solutions:
+      tank:
+        maxVol: 500
+        reagents:
+        - ReagentId: Chlorine
+          Quantity: 500
+
+- type: entity
+  parent: BaseBarrelChem
+  id: BarrelChemFilledEthanol
+  suffix: Ethanol
+  components:
+  - type: SolutionContainerManager
+    solutions:
+      tank:
+        maxVol: 500
+        reagents:
+        - ReagentId: Ethanol
+          Quantity: 500
+
+- type: entity
+  parent: BaseBarrelChem
+  id: BarrelChemFilledPhosphorus
+  suffix: Phosphorus
+  components:
+  - type: SolutionContainerManager
+    solutions:
+      tank:
+        maxVol: 500
+        reagents:
+        - ReagentId: Phosphorus
+          Quantity: 500
+
+- type: entity
+  parent: BaseBarrelChem
+  id: BarrelChemFilledMercury
+  suffix: Mercury
+  components:
+  - type: SolutionContainerManager
+    solutions:
+      tank:
+        maxVol: 500
+        reagents:
+        - ReagentId: Mercury
+          Quantity: 500
+
+- type: entity
+  parent: BaseBarrelChem
+  id: BarrelChemFilledSilicon
+  suffix: Silicon
+  components:
+  - type: Sprite
+    state: silicatebarrel
+  - type: SolutionContainerManager
+    solutions:
+      tank:
+        maxVol: 500
+        reagents:
+        - ReagentId: Silicon
+          Quantity: 500
+
+- type: entity
+  parent: BaseBarrelChem
+  id: BarrelChemFilledLube
+  suffix: Lube
+  description: Slippery...
+  components:
+  - type: Sprite
+    state: silicatebarrel
+  - type: SolutionContainerManager
+    solutions:
+      tank:
+        maxVol: 500
+        reagents:
+        - ReagentId: SpaceLube
+          Quantity: 500
+
+- type: entity
+  parent: BaseBarrelChemRadioactive
+  id: BaseBarrelChemRadioactiveEmpty
+  suffix: Empty
+
+- type: entity
+  parent: BaseBarrelChemRadioactive
+  id: BaseBarrelChemRadioactiveFilledRadium
+  suffix: Radium
+  components:
+  - type: SolutionContainerManager
+    solutions:
+      tank:
+        maxVol: 500
+        reagents:
+        - ReagentId: Radium
+          Quantity: 500
+
+- type: entity
+  parent: BaseBarrelChemRadioactive
+  id: BaseBarrelChemRadioactiveFilledUranium
+  suffix: Uranium
+  components:
+  - type: SolutionContainerManager
+    solutions:
+      tank:
+        maxVol: 500
+        reagents:
+        - ReagentId: Uranium
+          Quantity: 500
diff --git a/Resources/Textures/Structures/Storage/barrels.rsi/flamingmetalbarrel.png b/Resources/Textures/Structures/Storage/barrels.rsi/flamingmetalbarrel.png
new file mode 100644 (file)
index 0000000..12d583f
Binary files /dev/null and b/Resources/Textures/Structures/Storage/barrels.rsi/flamingmetalbarrel.png differ
diff --git a/Resources/Textures/Structures/Storage/barrels.rsi/iedweldbarrel.png b/Resources/Textures/Structures/Storage/barrels.rsi/iedweldbarrel.png
new file mode 100644 (file)
index 0000000..b1df05a
Binary files /dev/null and b/Resources/Textures/Structures/Storage/barrels.rsi/iedweldbarrel.png differ
diff --git a/Resources/Textures/Structures/Storage/barrels.rsi/meta.json b/Resources/Textures/Structures/Storage/barrels.rsi/meta.json
new file mode 100644 (file)
index 0000000..cd84395
--- /dev/null
@@ -0,0 +1,42 @@
+{
+  "version": 1,
+  "license": "CC-BY-SA-3.0",
+  "copyright": "Taken from vgstation13 at https://github.com/vgstation-coders/vgstation13/blob/4d150fd98a7b067305c157ad79431fa150f2c145/icons/obj/objects.dmi, modified and adapted by EmoGarbage404 (github)",
+  "size": {
+    "x": 32,
+    "y": 32
+  },
+  "states": [
+    {
+      "name": "waterbarrel"
+    },
+    {
+      "name": "weldbarrel"
+    },
+    {
+      "name": "silicatebarrel"
+    },
+    {
+      "name": "woodenbarrel"
+    },
+    {
+      "name": "metalbarrel"
+    },
+    {
+      "name": "flamingmetalbarrel",
+      "delays": [
+        [
+          0.1,
+          0.1,
+          0.1
+        ]
+      ]
+    },
+    {
+      "name": "iedweldbarrel"
+    },
+    {
+      "name": "radbarrel"
+    }
+  ]
+}
diff --git a/Resources/Textures/Structures/Storage/barrels.rsi/metalbarrel.png b/Resources/Textures/Structures/Storage/barrels.rsi/metalbarrel.png
new file mode 100644 (file)
index 0000000..2955014
Binary files /dev/null and b/Resources/Textures/Structures/Storage/barrels.rsi/metalbarrel.png differ
diff --git a/Resources/Textures/Structures/Storage/barrels.rsi/radbarrel.png b/Resources/Textures/Structures/Storage/barrels.rsi/radbarrel.png
new file mode 100644 (file)
index 0000000..02af552
Binary files /dev/null and b/Resources/Textures/Structures/Storage/barrels.rsi/radbarrel.png differ
diff --git a/Resources/Textures/Structures/Storage/barrels.rsi/silicatebarrel.png b/Resources/Textures/Structures/Storage/barrels.rsi/silicatebarrel.png
new file mode 100644 (file)
index 0000000..9eb12b5
Binary files /dev/null and b/Resources/Textures/Structures/Storage/barrels.rsi/silicatebarrel.png differ
diff --git a/Resources/Textures/Structures/Storage/barrels.rsi/waterbarrel.png b/Resources/Textures/Structures/Storage/barrels.rsi/waterbarrel.png
new file mode 100644 (file)
index 0000000..41d81ba
Binary files /dev/null and b/Resources/Textures/Structures/Storage/barrels.rsi/waterbarrel.png differ
diff --git a/Resources/Textures/Structures/Storage/barrels.rsi/weldbarrel.png b/Resources/Textures/Structures/Storage/barrels.rsi/weldbarrel.png
new file mode 100644 (file)
index 0000000..3508523
Binary files /dev/null and b/Resources/Textures/Structures/Storage/barrels.rsi/weldbarrel.png differ
diff --git a/Resources/Textures/Structures/Storage/barrels.rsi/woodenbarrel.png b/Resources/Textures/Structures/Storage/barrels.rsi/woodenbarrel.png
new file mode 100644 (file)
index 0000000..5cb2cee
Binary files /dev/null and b/Resources/Textures/Structures/Storage/barrels.rsi/woodenbarrel.png differ