Skip to content

Commit

Permalink
Add generator scrap (Plasma / uranium scrap) (space-wizards#32198)
Browse files Browse the repository at this point in the history
* First commit

* Forgot the shading!

* tweaked  values

* sprite update

* Radiation
  • Loading branch information
beck-thompson authored Dec 16, 2024
1 parent 386e431 commit 1967827
Show file tree
Hide file tree
Showing 12 changed files with 228 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
- id: SheetSteel10
- id: SheetGlass10
- id: SheetPlastic10
- id: ScrapGeneratorFuelTank
weight: 0.5
- id: PartRodMetal10
weight: 0.33
- id: MaterialWoodPlank10
Expand All @@ -64,6 +66,9 @@
id: SalvageScrapLarge
table: !type:GroupSelector
children:
- !type:NestedSelector
tableId: RandomGeneratorTable
weight: 2
- id: ScrapAirlock1
- id: ScrapCloset
- id: ScrapFirelock1
Expand Down Expand Up @@ -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
153 changes: 153 additions & 0 deletions Resources/Prototypes/Entities/Objects/Materials/scrap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -404,5 +444,118 @@
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
57 changes: 57 additions & 0 deletions Resources/Textures/Objects/Materials/Scrap/generator.rsi/meta.json
Original file line number Diff line number Diff line change
@@ -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
]
]
}
]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1967827

Please sign in to comment.