Add Smoke and Foam chemical reaction effects. (#2913)
* Adds smoke reaction effect * smoke tweaks * address reviews * Smoke fix * Refactor smoke and add foam * Fix stuff * Remove thing * Little things * Address some comments * Address more things * More addressing * License stuff * Address refactor request * Small things * Add nullability * Update Content.Server/GameObjects/EntitySystems/SolutionAreaEffectSystem.cs Co-authored-by: Paul Ritter <ritter.paul1@googlemail.com>
@@ -1,2 +1,4 @@
|
||||
hit_kick.ogg is made by Taira Komori
|
||||
(https://taira-komori.jpn.org/freesounden.html)
|
||||
|
||||
smoke.ogg taken from https://github.com/tgstation/tgstation/blob/a5d362ce84e4f0c61026236d5ec84d3c81553664/sound/effects/smoke.ogg
|
||||
BIN
Resources/Audio/Effects/smoke.ogg
Normal file
@@ -21,6 +21,7 @@
|
||||
- chem.Water
|
||||
- chem.Ethanol
|
||||
- chem.Glucose
|
||||
- chem.Sugar
|
||||
- chem.Hydrogen
|
||||
- chem.Oxygen
|
||||
- chem.Sulfur
|
||||
|
||||
149
Resources/Prototypes/Entities/Effects/chemistry_effects.yml
Normal file
@@ -0,0 +1,149 @@
|
||||
- type: entity
|
||||
id: Smoke
|
||||
name: smoke
|
||||
abstract: true
|
||||
components:
|
||||
- type: Sprite
|
||||
drawdepth: Effects
|
||||
sprite: Effects/chemsmoke.rsi
|
||||
state: chemsmoke
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: SmokeVisualizer
|
||||
- type: Occluder
|
||||
sizeX: 32
|
||||
sizeY: 32
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: SmokeSolutionAreaEffect
|
||||
- type: SolutionContainer
|
||||
maxVol: 600
|
||||
|
||||
- type: entity
|
||||
id: Foam
|
||||
name: foam
|
||||
abstract: true
|
||||
components:
|
||||
- type: Sprite
|
||||
netsync: false
|
||||
drawdepth: Effects
|
||||
color: "#ffffffcc" #Add some transparency
|
||||
sprite: Effects/foam.rsi
|
||||
state: foam
|
||||
layers:
|
||||
- state: foam
|
||||
map: ["enum.FoamVisualLayers.Base"]
|
||||
- type: AnimationPlayer
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: FoamVisualizer
|
||||
animationTime: 0.6
|
||||
animationState: foam-dissolve
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: Physics
|
||||
shapes:
|
||||
- !type:PhysShapeAabb
|
||||
bounds: "-0.4,-0.4,0.4,0.4"
|
||||
layer:
|
||||
- MobImpassable
|
||||
- type: FoamSolutionAreaEffect
|
||||
- type: SolutionContainer
|
||||
maxVol: 600
|
||||
- type: Slippery
|
||||
|
||||
- type: entity
|
||||
id: IronMetalFoam
|
||||
name: iron metal foam
|
||||
abstract: true
|
||||
parent: Foam
|
||||
components:
|
||||
- type: Sprite
|
||||
state: mfoam
|
||||
layers:
|
||||
- state: mfoam
|
||||
map: ["enum.FoamVisualLayers.Base"]
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: FoamVisualizer
|
||||
animationTime: 0.6
|
||||
animationState: mfoam-dissolve
|
||||
- type: FoamSolutionAreaEffect
|
||||
foamedMetalPrototype: FoamedIronMetal
|
||||
|
||||
- type: entity
|
||||
id: AluminiumMetalFoam
|
||||
name: aluminium metal foam
|
||||
abstract: true
|
||||
parent: Foam
|
||||
components:
|
||||
- type: Sprite
|
||||
state: mfoam
|
||||
layers:
|
||||
- state: mfoam
|
||||
map: ["enum.FoamVisualLayers.Base"]
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: FoamVisualizer
|
||||
animationTime: 0.6
|
||||
animationState: mfoam-dissolve
|
||||
- type: FoamSolutionAreaEffect
|
||||
foamedMetalPrototype: FoamedAluminiumMetal
|
||||
|
||||
- type: entity
|
||||
id: BaseFoamedMetal
|
||||
name: base foamed metal
|
||||
description: Keeps the air in and the greytide out.
|
||||
abstract: true
|
||||
placement:
|
||||
mode: SnapgridCenter
|
||||
snap:
|
||||
- Wall
|
||||
components:
|
||||
- type: RCDDeconstructWhitelist
|
||||
- type: Clickable
|
||||
- type: InteractionOutline
|
||||
- type: Sprite
|
||||
netsync: false
|
||||
drawdepth: Walls
|
||||
- type: Physics
|
||||
shapes:
|
||||
- !type:PhysShapeAabb
|
||||
layer:
|
||||
- Opaque
|
||||
- Impassable
|
||||
- MobImpassable
|
||||
- VaultImpassable
|
||||
- SmallImpassable
|
||||
- type: Occluder
|
||||
sizeX: 32
|
||||
sizeY: 32
|
||||
- type: SnapGrid
|
||||
offset: Center
|
||||
- type: Airtight
|
||||
- type: Damageable
|
||||
resistances: metallicResistances
|
||||
- type: Destructible
|
||||
thresholds:
|
||||
50:
|
||||
behaviors:
|
||||
- !type:DoActsBehavior
|
||||
acts: [ "Destruction" ]
|
||||
|
||||
- type: entity
|
||||
id: FoamedIronMetal
|
||||
name: foamed iron metal
|
||||
parent: BaseFoamedMetal
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Effects/foam.rsi
|
||||
state: ironfoam
|
||||
|
||||
- type: entity
|
||||
id: FoamedAluminiumMetal
|
||||
name: foamed aluminium metal
|
||||
parent: BaseFoamedMetal
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Effects/foam.rsi
|
||||
state: metalfoam
|
||||
@@ -126,6 +126,15 @@
|
||||
- !type:AdjustHealth
|
||||
amount: -8
|
||||
|
||||
- type: reagent
|
||||
id: chem.FluorosulfuricAcid
|
||||
name: fluorosulfuric acid
|
||||
desc: An extremely corrosive chemical substance.
|
||||
physicalDecs: strong-smelling
|
||||
color: "#5050ff"
|
||||
boilingPoint: 165
|
||||
meltingPoint: -87
|
||||
|
||||
- type: reagent
|
||||
id: chem.TableSalt
|
||||
name: table salt
|
||||
@@ -241,3 +250,13 @@
|
||||
meltingPoint: -80.7
|
||||
tileReactions:
|
||||
- !type:FlammableTileReaction {}
|
||||
|
||||
- type: reagent
|
||||
id: chem.Fluorosurfactant
|
||||
name: fluorosurfactant
|
||||
desc: A perfluoronated sulfonic acid that forms a foam when mixed with water.
|
||||
physicalDesc: opaque
|
||||
color: "#9e6b38"
|
||||
boilingPoint: 190.0 # Perfluorooctanoic Acid.
|
||||
meltingPoint: 45.0
|
||||
|
||||
|
||||
@@ -40,6 +40,20 @@
|
||||
products:
|
||||
chem.PolytrinicAcid: 3
|
||||
|
||||
- type: reaction
|
||||
id: react.FluorosulfuricAcid
|
||||
reactants:
|
||||
chem.Fluorine:
|
||||
amount: 1
|
||||
chem.Hydrogen:
|
||||
amount: 1
|
||||
chem.Potassium:
|
||||
amount: 1
|
||||
chem.SulfuricAcid:
|
||||
amount: 1
|
||||
products:
|
||||
chem.FluorosulfuricAcid: 4
|
||||
|
||||
- type: reaction
|
||||
id: react.PotassiumExplosion
|
||||
reactants:
|
||||
@@ -57,6 +71,94 @@
|
||||
scaled: true #Scaled proportionally to amount of potassium and water
|
||||
maxScale: 30 #Explosion strength stops scaling at 30 potassium + 30 water
|
||||
|
||||
- type: reaction
|
||||
id: react.Smoke
|
||||
reactants:
|
||||
chem.Phosphorus:
|
||||
amount: 1
|
||||
chem.Potassium:
|
||||
amount: 1
|
||||
chem.Sugar:
|
||||
amount: 1
|
||||
effects:
|
||||
- !type:SmokeAreaReactionEffect
|
||||
rangeConstant: 0
|
||||
rangeMultiplier: 1.1 #Range formula: rangeConstant + rangeMultiplier*sqrt(ReactionUnits)
|
||||
maxRange: 10
|
||||
duration: 10
|
||||
spreadDelay: 0.5
|
||||
removeDelay: 0.5
|
||||
diluteReagents: false
|
||||
prototypeId: Smoke
|
||||
sound: /Audio/Effects/smoke.ogg
|
||||
|
||||
- type: reaction
|
||||
id: react.Foam
|
||||
reactants:
|
||||
chem.Fluorosurfactant:
|
||||
amount: 1
|
||||
chem.Water:
|
||||
amount: 1
|
||||
effects:
|
||||
- !type:FoamAreaReactionEffect
|
||||
rangeConstant: 0
|
||||
rangeMultiplier: 1.1 #Range formula: rangeConstant + rangeMultiplier*sqrt(ReactionUnits)
|
||||
maxRange: 10
|
||||
duration: 10
|
||||
spreadDelay: 1
|
||||
removeDelay: 0
|
||||
diluteReagents: true
|
||||
reagentDilutionStart: 4 #At what range should the reagents start diluting
|
||||
reagentDilutionFactor: 1
|
||||
reagentMaxConcentrationFactor: 2 #The reagents will get multiplied by this number if the range turns out to be 0
|
||||
prototypeId: Foam
|
||||
|
||||
- type: reaction
|
||||
id: react.IronMetalFoam
|
||||
reactants:
|
||||
chem.Iron:
|
||||
amount: 3
|
||||
chem.FoamingAgent:
|
||||
amount: 1
|
||||
chem.FluorosulfuricAcid:
|
||||
amount: 1
|
||||
effects:
|
||||
- !type:FoamAreaReactionEffect
|
||||
rangeConstant: 0
|
||||
rangeMultiplier: 1.1
|
||||
maxRange: 10
|
||||
duration: 10
|
||||
spreadDelay: 1
|
||||
removeDelay: 0
|
||||
diluteReagents: true
|
||||
reagentDilutionStart: 4
|
||||
reagentDilutionFactor: 1
|
||||
reagentMaxConcentrationFactor: 2
|
||||
prototypeId: IronMetalFoam
|
||||
|
||||
- type: reaction
|
||||
id: react.AluminiumMetalFoam
|
||||
reactants:
|
||||
chem.Aluminium:
|
||||
amount: 3
|
||||
chem.FoamingAgent:
|
||||
amount: 1
|
||||
chem.FluorosulfuricAcid:
|
||||
amount: 1
|
||||
effects:
|
||||
- !type:FoamAreaReactionEffect
|
||||
rangeConstant: 0
|
||||
rangeMultiplier: 1.1
|
||||
maxRange: 10
|
||||
duration: 10
|
||||
spreadDelay: 1
|
||||
removeDelay: 0
|
||||
diluteReagents: true
|
||||
reagentDilutionStart: 4
|
||||
reagentDilutionFactor: 1
|
||||
reagentMaxConcentrationFactor: 2
|
||||
prototypeId: AluminiumMetalFoam
|
||||
|
||||
- type: reaction
|
||||
id: react.TableSalt
|
||||
reactants:
|
||||
@@ -100,3 +202,15 @@
|
||||
amount: 1
|
||||
products:
|
||||
chem.Water: 2
|
||||
|
||||
- type: reaction
|
||||
id: react.Fluorosurfactant
|
||||
reactants:
|
||||
chem.Carbon:
|
||||
amount: 2
|
||||
chem.Fluorine:
|
||||
amount: 2
|
||||
chem.SulfuricAcid:
|
||||
amount: 1
|
||||
products:
|
||||
chem.Fluorosurfactant: 5
|
||||
|
||||
BIN
Resources/Textures/Effects/chemsmoke.rsi/chemsmoke.png
Normal file
|
After Width: | Height: | Size: 109 KiB |
1
Resources/Textures/Effects/chemsmoke.rsi/meta.json
Normal file
@@ -0,0 +1 @@
|
||||
{"version": 1, "size": {"x": 96, "y": 96}, "license": "CC-BY-SA-3.0", "copyright": "Taken from https://github.com/discordia-space/CEV-Eris/blob/81b3a082ccdfb425f36bbed6e5bc1f0faed346ec/icons/effects/chemsmoke.dmi", "states": [{"name": "chemsmoke", "directions": 4, "delays": [[0.2, 0.2, 0.2], [0.2, 0.2, 0.2], [0.2, 0.2, 0.2], [0.2, 0.2, 0.2]]}]}
|
||||
BIN
Resources/Textures/Effects/foam.rsi/foam-dissolve.png
Normal file
|
After Width: | Height: | Size: 6.2 KiB |
BIN
Resources/Textures/Effects/foam.rsi/foam.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
Resources/Textures/Effects/foam.rsi/ironfoam.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
1
Resources/Textures/Effects/foam.rsi/meta.json
Normal file
@@ -0,0 +1 @@
|
||||
{"version": 1, "size": {"x": 32, "y": 32}, "license": "CC-BY-SA-3.0", "copyright": "Taken from https://github.com/discordia-space/CEV-Eris/blob/81b3a082ccdfb425f36bbed6e5bc1f0faed346ec/icons/effects/effects.dmi", "states": [{"name": "foam", "directions": 1}, {"name": "foam-dissolve", "directions": 1, "delays": [[0.1, 0.1, 0.1, 0.1, 0.1, 0.1]]}, {"name": "ironfoam", "directions": 1}, {"name": "metalfoam", "directions": 1}, {"name": "mfoam", "directions": 1}, {"name": "mfoam-dissolve", "directions": 1, "delays": [[0.1, 0.1, 0.1, 0.1, 0.1, 0.1]]}]}
|
||||
BIN
Resources/Textures/Effects/foam.rsi/metalfoam.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
Resources/Textures/Effects/foam.rsi/mfoam-dissolve.png
Normal file
|
After Width: | Height: | Size: 5.4 KiB |
BIN
Resources/Textures/Effects/foam.rsi/mfoam.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |