Add ability to shake fizzy drinks so they spray in peoples' faces (#25574)

* Implemented Shakeable

* Prevent shaking open Openables

* Prevent shaking empty drinks. Moved part of DrinkSystem to Shared.

* DrinkSystem can have a little more prediction, as a treat

* Cleanup

* Overhauled PressurizedDrink

* Make soda cans/bottles and champagne shakeable. The drink shaker too, for fun.

* We do a little refactoring.
PressurizedDrink is now PressurizedSolution, and fizziness now only works on solutions containing a reagent marked as fizzy.

* Documentation, cleanup, and tweaks.

* Changed fizziness calculation to use a cubic-out easing curve.

* Removed broken YAML that has avoid the linter's wrath for far too long

* Changed reagent fizzy bool to fizziness float.
Solution fizzability now scales with reagent proportion.

* Rename file to match changed class name

* DoAfter improvements. Cancel if the user moves away; block if no hands.

* Match these filenames too

* And this one

* guh

* Updated to use Shared puddle methods

* Various fixes and improvements.

* Made AttemptShakeEvent a struct

* AttemptAddFizzinessEvent too
This commit is contained in:
Tayrtahn
2024-04-17 21:49:58 -04:00
committed by GitHub
parent 8d64d2bc1e
commit cfa94be4c2
25 changed files with 807 additions and 146 deletions

View File

@@ -39,6 +39,7 @@
metamorphicMaxFillLevels: 5
metamorphicFillBaseName: fill-
metamorphicChangeColor: false
fizziness: 0.6
- type: reagent
id: Beer
@@ -55,6 +56,7 @@
metamorphicMaxFillLevels: 6
metamorphicFillBaseName: fill-
metamorphicChangeColor: true
fizziness: 0.6
- type: reagent
id: BlueCuracao
@@ -458,6 +460,7 @@
- !type:AdjustReagent
reagent: Ethanol
amount: 0.3
fizziness: 0.8
# Mixed Alcohol
@@ -675,6 +678,7 @@
- !type:AdjustReagent
reagent: Ethanol
amount: 0.15
fizziness: 0.3
- type: reagent
id: BlackRussian
@@ -814,6 +818,7 @@
- !type:AdjustReagent
reagent: Ethanol
amount: 0.07
fizziness: 0.2
- type: reagent
id: DemonsBlood
@@ -829,6 +834,7 @@
metamorphicMaxFillLevels: 4
metamorphicFillBaseName: fill-
metamorphicChangeColor: true
fizziness: 0.3
- type: reagent
id: DevilsKiss
@@ -916,6 +922,7 @@
metamorphicMaxFillLevels: 5
metamorphicFillBaseName: fill-
metamorphicChangeColor: true
fizziness: 0.15
- type: reagent
id: GargleBlaster
@@ -962,6 +969,7 @@
- !type:AdjustReagent
reagent: Ethanol
amount: 0.07
fizziness: 0.4 # A little high, but it has fizz in the name
- type: reagent
id: GinTonic
@@ -985,6 +993,7 @@
- !type:AdjustReagent
reagent: Ethanol
amount: 0.07
fizziness: 0.4
- type: reagent
id: Gildlager
@@ -1062,6 +1071,7 @@
metamorphicMaxFillLevels: 6
metamorphicFillBaseName: fill-
metamorphicChangeColor: false
fizziness: 0.6
- type: reagent
id: IrishCarBomb
@@ -1199,6 +1209,7 @@
metamorphicMaxFillLevels: 2
metamorphicFillBaseName: fill-
metamorphicChangeColor: false
fizziness: 0.7
- type: reagent
id: Margarita
@@ -1252,6 +1263,7 @@
metamorphicMaxFillLevels: 5
metamorphicFillBaseName: fill-
metamorphicChangeColor: true
fizziness: 0.4
- type: reagent
id: Mojito
@@ -1267,6 +1279,7 @@
metamorphicMaxFillLevels: 6
metamorphicFillBaseName: fill-
metamorphicChangeColor: false
fizziness: 0.3
- type: reagent
id: Moonshine
@@ -1371,6 +1384,7 @@
metamorphicMaxFillLevels: 5
metamorphicFillBaseName: fill-
metamorphicChangeColor: true
fizziness: 0.4
- type: reagent
id: PinaColada
@@ -1500,6 +1514,7 @@
metamorphicMaxFillLevels: 6
metamorphicFillBaseName: fill-
metamorphicChangeColor: true
fizziness: 0.3
- type: reagent
id: SuiDream
@@ -1515,6 +1530,7 @@
metamorphicMaxFillLevels: 5
metamorphicFillBaseName: fill-
metamorphicChangeColor: false
fizziness: 0.2
- type: reagent
id: SyndicateBomb
@@ -1530,6 +1546,7 @@
metamorphicMaxFillLevels: 6
metamorphicFillBaseName: fill-
metamorphicChangeColor: true
fizziness: 0.6
- type: reagent
id: TequilaSunrise
@@ -1568,6 +1585,7 @@
metamorphicMaxFillLevels: 3
metamorphicFillBaseName: fill-
metamorphicChangeColor: false
fizziness: 0.2
- type: reagent
id: ThreeMileIsland
@@ -1655,6 +1673,7 @@
- !type:AdjustReagent
reagent: Ethanol
amount: 0.07
fizziness: 0.4
- type: reagent
id: WhiskeyCola
@@ -1678,6 +1697,7 @@
- !type:AdjustReagent
reagent: Ethanol
amount: 0.07
fizziness: 0.3
- type: reagent
id: WhiskeySoda
@@ -1701,6 +1721,7 @@
- !type:AdjustReagent
reagent: Ethanol
amount: 0.07
fizziness: 0.4
- type: reagent
id: WhiteGilgamesh
@@ -1718,6 +1739,7 @@
- !type:AdjustReagent
reagent: Ethanol
amount: 0.15
fizziness: 0.5
- type: reagent
id: WhiteRussian

View File

@@ -40,6 +40,7 @@
collection: FootstepSticky
params:
volume: 6
fizziness: 0.5
- type: reagent
id: BaseAlcohol
@@ -75,4 +76,4 @@
footstepSound:
collection: FootstepSticky
params:
volume: 6
volume: 6

View File

@@ -322,6 +322,7 @@
damage:
types:
Poison: 1
fizziness: 0.5
- type: reagent
id: SodaWater
@@ -331,6 +332,7 @@
physicalDesc: reagent-physical-desc-fizzy
flavor: fizzy
color: "#619494"
fizziness: 0.8
- type: reagent
id: SoyLatte
@@ -373,6 +375,7 @@
physicalDesc: reagent-physical-desc-fizzy
flavor: tonicwater
color: "#0064C8"
fizziness: 0.4
- type: reagent
id: Water
@@ -467,6 +470,7 @@
effects:
- !type:SatiateThirst
factor: 1
fizziness: 0.3
- type: reagent
id: Posca
@@ -491,6 +495,7 @@
metamorphicMaxFillLevels: 3
metamorphicFillBaseName: fill-
metamorphicChangeColor: false
fizziness: 0.3
- type: reagent
id: Rewriter
@@ -506,6 +511,7 @@
metamorphicMaxFillLevels: 5
metamorphicFillBaseName: fill-
metamorphicChangeColor: true
fizziness: 0.3
- type: reagent
id: Mopwata

View File

@@ -59,6 +59,7 @@
- !type:AdjustReagent
reagent: Theobromine
amount: 0.05
fizziness: 0.4
- type: reagent
id: GrapeSoda
@@ -84,6 +85,7 @@
metamorphicMaxFillLevels: 5
metamorphicFillBaseName: fill-
metamorphicChangeColor: true
fizziness: 0
- type: reagent
id: LemonLime
@@ -102,6 +104,7 @@
physicalDesc: reagent-physical-desc-fizzy
flavor: pwrgamesoda
color: "#9385bf"
fizziness: 0.9 # gamers crave the fizz
- type: reagent
id: RootBeer
@@ -132,6 +135,7 @@
metamorphicMaxFillLevels: 7
metamorphicFillBaseName: fill-
metamorphicChangeColor: false
fizziness: 0.4
- type: reagent
id: SolDry