Adds new different reaction types. (#2114)

* Adds new different reaction types.
- Adds touch, injection and ingestion reactions for entities.
- Adds tile reactions.
- Removes GasSprayerComponent in favor of SprayComponent.
- Gives fire extinguishers a safety.
- Gives spray puffs a sprite.
- Improved spray and fire extinguisher in general.
- Fire extinguisher now ACTUALLY puts out fires. Amazing, eh?
- Fire extinguisher sprays three 'clouds' at once.
- Spraying flammable chemicals at fire makes them worse. Whoops!
- Gives spray and fire extinguisher their classic sounds.
- Most chemicals now don't make puddles. Too bad!
- Space lube now makes a very slippery puddle. Honk.
- Spraying water (or using a fire extinguisher) on existing puddles makes them bigger.

* Fix solution tests

* food base now has solution container with noexamine caps
This commit is contained in:
Víctor Aguilera Puerto
2020-09-21 17:51:07 +02:00
committed by GitHub
parent 37d6ca556f
commit 69059eac80
51 changed files with 1006 additions and 471 deletions

View File

@@ -5,6 +5,8 @@
components:
- type: Food
- type: LoopingSound
- type: SolutionContainer
caps: NoExamine
- type: Sprite
state: icon
netsync: false

View File

@@ -1,28 +0,0 @@
- type: entity
name: Extinguisher Spray
id: ExtinguisherSpray
description: Extinguisher Spray
components:
- type: Sprite
sprite: Effects/extinguisherSpray.rsi
layers:
- state: extinguish
- type: Icon
sprite: Effects/extinguisherSpray.rsi
state: extinguish
- type: GasVapor
dissipationInterval: 1
gas: WaterVapor
gasVolume: 200
gasTemperature: 293.15
gasAmount: 20
- type: Physics
- type: Collidable
shapes:
- !type:PhysShapeAabb
bounds: "-0.25,-0.25,0.25,0.25"
mask:
- Impassable
- type: Appearance
visuals:
- type: ExtinguisherVisualizer

View File

@@ -7,24 +7,63 @@
- type: Sprite
sprite: Objects/Misc/fire_extinguisher.rsi
layers:
- state: fire_extinguisher_open
- state: fire_extinguisher_closed
map: [ "enum.SprayVisualLayers.Base" ]
- type: Icon
sprite: Objects/Misc/fire_extinguisher.rsi
state: fire_extinguisher_open
state: fire_extinguisher_closed
- type: Item
sprite: Objects/Misc/fire_extinguisher.rsi
size: 10
- type: SolutionContainer
maxVol: 1000
maxVol: 100
caps: AddTo, RemoveFrom, NoExamine
contents:
reagents:
- ReagentId: chem.H2O
Quantity: 1000
- type: GasSprayer
spraySound: /Audio/Effects/spray.ogg
sprayType: ExtinguisherSpray
fuelType: chem.H2O
fuelName: water
fuelCost: 50
Quantity: 100
- type: ItemCooldown
- type: Spray
spraySound: /Audio/Effects/extinguish.ogg
sprayedPrototype: ExtinguisherSpray
hasSafety: true
vaporAmount: 3
vaporSpread: 90
sprayVelocity: 2.0
sprayTimeAlive: 1.5
transferAmount: 5
- type: FireExtinguisher
- type: Appearance
visuals:
- type: SprayVisualizer
safety_on_state: fire_extinguisher_closed
safety_off_state: fire_extinguisher_open
- type: entity
name: extinguisher spray
id: ExtinguisherSpray
parent: Vapor
abstract: true
components:
- type: Sprite
sprite: Effects/extinguisherSpray.rsi
layers:
- state: extinguish
map: [ "enum.VaporVisualLayers.Base" ]
- type: Icon
sprite: Effects/extinguisherSpray.rsi
state: extinguish
- type: Collidable
hard: false
shapes:
- !type:PhysShapeAabb
bounds: "-0.25,-0.25,0.25,0.25"
mask:
- Impassable
- MobImpassable
- SmallImpassable
- type: Appearance
visuals:
- type: VaporVisualizer
animation_delay: 0.8
animation_state: extinguish

View File

@@ -180,10 +180,44 @@
- type: Slippery
paralyzeTime: 7
- type: entity
id: Vapor
name: "vapor"
abstract: true
components:
- type: SnapGrid
offset: Center
- type: SolutionContainer
maxVol: 50
- type: Vapor
- type: AnimationPlayer
- type: Sprite
sprite: Effects/chempuff.rsi
layers:
- state: chempuff
map: [ "enum.VaporVisualLayers.Base" ]
- type: Icon
sprite: Effects/chempuff.rsi
state: chempuff
- type: Physics
- type: Collidable
hard: false
shapes:
- !type:PhysShapeAabb
bounds: "-0.25,-0.25,0.25,0.25"
mask:
- Impassable
- MobImpassable
- SmallImpassable
- type: Appearance
visuals:
- type: VaporVisualizer
- type: entity
name: spray bottle
id: SprayBottle
parent: BaseItem
suffix: Empty
description: A spray bottle with an unscrewable top.
components:
- type: Sprite
@@ -196,7 +230,37 @@
- type: Pourable
transferAmount: 5.0
- type: Spillable
- type: ItemCooldown
- type: Spray
transferAmount: 10
sprayVelocity: 5
spraySound: /Audio/Effects/spray.ogg
sprayVelocity: 2
spraySound: /Audio/Effects/spray2.ogg
- type: entity
name: spray bottle
id: SprayBottleWater
suffix: Filled
parent: SprayBottle
components:
- type: SolutionContainer
maxVol: 100
caps: AddTo, RemoveFrom
contents:
reagents:
- ReagentId: chem.H2O
Quantity: 100
- type: entity
name: space cleaner
description: BLAM!-brand non-foaming space cleaner!
id: SprayBottleSpaceCleaner
parent: SprayBottle
suffix: ""
components:
- type: SolutionContainer
maxVol: 100
caps: AddTo, RemoveFrom
contents:
reagents:
- ReagentId: chem.SpaceCleaner
Quantity: 100

View File

@@ -6,21 +6,3 @@
components:
- type: SolutionContainer
maxVol: 5
- type: entity
id: Vapor
name: "vapor"
abstract: true
components:
- type: SnapGrid
offset: Center
- type: SolutionContainer
maxVol: 50
- type: Vapor
- type: Physics
- type: Collidable
shapes:
- !type:PhysShapeAabb
bounds: "-0.25,-0.25,0.25,0.25"
mask:
- Impassable

View File

@@ -28,6 +28,9 @@
metabolism:
- !type:DefaultDrink
rate: 1
tileReactions:
- !type:ExtinguishTileReaction {}
- !type:SpillIfPuddlePresentTileReaction {}
- type: reagent
id: chem.Ice
@@ -46,6 +49,9 @@
color: "#7e009e"
boilingPoint: -127.3 # Random values picked between the actual values for CO2 and O2
meltingPoint: -186.4
tileReactions:
- !type:FlammableTileReaction
temperatureMultiplier: 1.5
- type: reagent
id: chem.Ethanol
@@ -55,6 +61,9 @@
color: "#b05b3c"
boilingPoint: 78.2
meltingPoint: -114.1
tileReactions:
- !type:FlammableTileReaction
temperatureMultiplier: 1.35
- type: reagent
id: chem.Glucose
@@ -118,6 +127,7 @@
color: "#c8ff69"
boilingPoint: 147.0 # Made this up, loosely based on bleach
meltingPoint: -11.0
# You should probably add a tile reaction here that tries to clean the tile.
- type: reagent
id: chem.SpaceLube
@@ -127,6 +137,11 @@
color: "#77b58e"
boilingPoint: 290.0 # Glycerin
meltingPoint: 18.2
tileReactions:
- !type:SpillTileReaction
paralyzeTime: 3
launchForwardsMultiplier: 2
requiredSlipSpeed: 1
- type: reagent
id: chem.TableSalt
@@ -145,6 +160,9 @@
color: "#757245"
boilingPoint: 2977.0 # Aluminum oxide
meltingPoint: 2030.0
tileReactions:
- !type:FlammableTileReaction
temperatureMultiplier: 1.35
- type: reagent
id: chem.UnstableMutagen
@@ -163,3 +181,5 @@
color: "#a76b1c"
boilingPoint: -84.7 # Acetylene. Close enough.
meltingPoint: -80.7
tileReactions:
- !type:FlammableTileReaction