Puddle refactor 2: Spillastic boogaloo (#4784)

* Refactor PuddleComponent

* Move puddle effects into separate RSIs

Basically egg/tomato/powder puddle will be moved into separate
/Textures/Fluids RSIs

* Fix YAML for puddles

* Fix issues sloth pointed out.

* Ensure Puddle Component are properly added when spawned

* Remove unnecessary method init puddle with starting maxVolume

* Addressed ElectroSr comments

* Add Resolves

* Try fix error in ensureSolution

* Puddle unanchoring

* Address some issues with puddles

* Fix continue -> return
This commit is contained in:
Ygg01
2021-10-27 09:24:18 +01:00
committed by GitHub
parent 03b1fed47d
commit 14b401f9b3
30 changed files with 753 additions and 564 deletions

View File

@@ -9,7 +9,7 @@
drawdepth: FloorObjects
- type: SolutionContainerManager
- type: Puddle
spill_sound:
spillSound:
path: /Audio/Effects/Fluids/splat.ogg
recolor: true
- type: Clickable
@@ -24,6 +24,10 @@
mask:
- SmallImpassable
hard: false
- type: Appearance
visuals:
- type: PuddleVisualizer
recolor: true
- type: entity
name: puddle
@@ -39,9 +43,17 @@
- type: Sprite
sprite: Fluids/gibblet.rsi # Placeholder
state: gibblet-0
netsync: false
- type: Puddle
variants: 5
state: gibblet
- type: SolutionContainerManager
solutions:
puddle:
reagents:
- ReagentId: Water
Quantity: 10
- type: Appearance
visuals:
- type: PuddleVisualizer
- type: entity
name: puddle
@@ -52,9 +64,13 @@
- type: Sprite
sprite: Fluids/smear.rsi # Placeholder
state: smear-0
netsync: false
- type: Puddle
variants: 7
state: smear
- type: Evaporation
- type: Appearance
visuals:
- type: PuddleVisualizer
recolor: true
- type: entity
name: puddle
@@ -65,9 +81,12 @@
- type: Sprite
sprite: Fluids/splatter.rsi # Placeholder
state: splatter-0
netsync: false
- type: Puddle
variants: 6
state: splatter
- type: Evaporation
- type: Appearance
visuals:
- type: PuddleVisualizer
- type: entity
name: vomit
@@ -78,11 +97,19 @@
- type: Sprite
sprite: Fluids/vomit.rsi
state: vomit-0
netsync: false
- type: Puddle
variants: 4
recolor: false
evaporate_threshold: -1
state: vomit
- type: SolutionContainerManager
solutions:
puddle:
reagents:
- ReagentId: Nutriment
Quantity: 5
- ReagentId: Water
Quantity: 5
- type: Appearance
visuals:
- type: PuddleVisualizer
- type: entity
name: toxins vomit
@@ -93,10 +120,19 @@
- type: Sprite
sprite: Fluids/vomit_toxin.rsi
state: vomit_toxin-0
netsync: false
- type: Puddle
variants: 4
recolor: false
state: vomit_toxin
- type: SolutionContainerManager
solutions:
puddle:
reagents:
- ReagentId: Toxin
Quantity: 5
- ReagentId: Water
Quantity: 5
- type: Appearance
visuals:
- type: PuddleVisualizer
- type: entity
name: writing
@@ -107,6 +143,10 @@
- type: Sprite
sprite: Fluids/writing.rsi # Placeholder
state: writing-0
netsync: false
- type: Puddle
variants: 5
state: writing
- type: Evaporation
evaporateTime: 10
- type: Appearance
visuals:
- type: PuddleVisualizer

View File

@@ -70,11 +70,20 @@
description: If the floor was a little hotter this would fry.
components:
- type: Sprite
sprite: Objects/Consumable/Food/egg.rsi
sprite: Fluids/egg_splat.rsi
state: egg-0
netsync: false
- type: Puddle
variants: 4
state: egg
- type: SolutionContainerManager
solutions:
puddle:
reagents:
- ReagentId: Egg
Quantity: 2
- type: Evaporation
- type: Appearance
visuals:
- type: PuddleVisualizer
- type: entity
name: eggshells

View File

@@ -9,11 +9,21 @@
description: Call the janitor.
components:
- type: Sprite
sprite: Objects/Consumable/Food/ingredients.rsi
state: powder-0
color: white
- type: Puddle
sprite: Fluids/powder.rsi
state: powder
color: white
netsync: false
- type: Puddle
- type: SolutionContainerManager
solutions:
puddle:
reagents:
- ReagentId: Flour
Quantity: 10
- type: Evaporation
- type: Appearance
visuals:
- type: PuddleVisualizer
# Reagent Containers

View File

@@ -313,10 +313,21 @@
description: Splat.
components:
- type: Sprite
sprite: Objects/Specific/Hydroponics/tomato.rsi
sprite: Fluids/tomato_splat.rsi
state: puddle-0
netsync: false
- type: Puddle
variants: 3
- type: SolutionContainerManager
solutions:
puddle:
reagents:
- ReagentId: JuiceTomato
Quantity: 10
- type: Evaporation
lowerLimit: 2
- type: Appearance
visuals:
- type: PuddleVisualizer
- type: entity
name: eggplant

View File

Before

Width:  |  Height:  |  Size: 676 B

After

Width:  |  Height:  |  Size: 676 B

View File

Before

Width:  |  Height:  |  Size: 530 B

After

Width:  |  Height:  |  Size: 530 B

View File

Before

Width:  |  Height:  |  Size: 617 B

After

Width:  |  Height:  |  Size: 617 B

View File

Before

Width:  |  Height:  |  Size: 642 B

After

Width:  |  Height:  |  Size: 642 B

View File

@@ -0,0 +1,23 @@
{
"version": 1,
"license": "CC-BY-SA-3.0",
"copyright": "Taken from cev-eris at https://github.com/discordia-space/CEV-Eris/raw/9c980cb9bc84d07b1c210c5447798af525185f80/icons/obj/food.dmi",
"size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "egg-0"
},
{
"name": "egg-1"
},
{
"name": "egg-2"
},
{
"name": "egg-3"
}
]
}

View File

@@ -0,0 +1,14 @@
{
"version": 1,
"license": "CC-BY-SA-3.0",
"copyright": "Taken from tgstation and baystation at commit https://github.com/tgstation/tgstation/commit/c6e3401f2e7e1e55c57060cdf956a98ef1fefc24 and https://github.com/Baystation12/Baystation12/commit/a6067826de7fd8f698793f6d84e6c2f1f9b1f188",
"size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "powder"
}
]
}

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -0,0 +1,20 @@
{
"version": 1,
"license": "CC-BY-SA-3.0",
"copyright": "Taken from https://github.com/vgstation-coders/vgstation13 at 1dbcf389b0ec6b2c51b002df5fef8dd1519f8068",
"size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "puddle-0"
},
{
"name": "puddle-1"
},
{
"name": "puddle-2"
}
]
}

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -140,18 +140,6 @@
"name": "red-inhand-left",
"directions": 4
},
{
"name": "egg-0"
},
{
"name": "egg-1"
},
{
"name": "egg-2"
},
{
"name": "egg-3"
},
{
"name": "yellow"
},

View File

@@ -64,9 +64,6 @@
{
"name": "pizzabread"
},
{
"name": "powder-0"
},
{
"name": "rice-big"
},

View File

@@ -19,15 +19,6 @@
{
"name": "seed"
},
{
"name": "puddle-0"
},
{
"name": "puddle-1"
},
{
"name": "puddle-2"
},
{
"name": "stage-1"
},
@@ -47,4 +38,4 @@
"name": "stage-6"
}
]
}
}