From 74d044a4a9a88cddeaec73b028732f6d2c0f3a19 Mon Sep 17 00:00:00 2001 From: Swept Date: Fri, 21 May 2021 00:19:18 +0000 Subject: [PATCH] Adds more splat and tweaks PuddleComponent.cs (#3942) Co-authored-by: Paul Ritter --- .../Components/Fluids/PuddleComponent.cs | 8 +-- .../Prototypes/Entities/Effects/puddle.yml | 6 ++ .../Entities/Objects/Consumable/Food/egg.yml | 9 ++- .../Objects/Consumable/Food/ingredients.yml | 55 ++++++++++++++++++ .../Objects/Consumable/Food/produce.yml | 32 ++++++++++ .../Consumable/Food/ingredients.rsi/meta.json | 3 + .../Food/ingredients.rsi/powder-0.png | Bin 0 -> 1453 bytes .../Specific/Hydroponics/tomato.rsi/meta.json | 51 +++++++++++++++- .../Hydroponics/tomato.rsi/puddle-0.png | Bin 0 -> 1256 bytes .../Hydroponics/tomato.rsi/puddle-1.png | Bin 0 -> 1411 bytes .../Hydroponics/tomato.rsi/puddle-2.png | Bin 0 -> 1536 bytes 11 files changed, 158 insertions(+), 6 deletions(-) create mode 100644 Resources/Textures/Objects/Consumable/Food/ingredients.rsi/powder-0.png create mode 100644 Resources/Textures/Objects/Specific/Hydroponics/tomato.rsi/puddle-0.png create mode 100644 Resources/Textures/Objects/Specific/Hydroponics/tomato.rsi/puddle-1.png create mode 100644 Resources/Textures/Objects/Specific/Hydroponics/tomato.rsi/puddle-2.png diff --git a/Content.Server/GameObjects/Components/Fluids/PuddleComponent.cs b/Content.Server/GameObjects/Components/Fluids/PuddleComponent.cs index 435ee56ddc..9b8c8043bb 100644 --- a/Content.Server/GameObjects/Components/Fluids/PuddleComponent.cs +++ b/Content.Server/GameObjects/Components/Fluids/PuddleComponent.cs @@ -104,6 +104,9 @@ namespace Content.Server.GameObjects.Components.Fluids [DataField("recolor")] private bool _recolor = default; + [DataField("state")] + private string _spriteState = "puddle"; + private bool Slippery => Owner.TryGetComponent(out SlipperyComponent? slippery) && slippery.Slippery; public override void Initialize() @@ -122,10 +125,7 @@ namespace Content.Server.GameObjects.Components.Fluids if (_spriteComponent.BaseRSIPath != null) { - var baseName = new ResourcePath(_spriteComponent.BaseRSIPath).FilenameWithoutExtension; - - _spriteComponent.LayerSetState(0, $"{baseName}-{randomVariant}"); // TODO: Remove hardcode - + _spriteComponent.LayerSetState(0, $"{_spriteState}-{randomVariant}"); } // UpdateAppearance should get called soon after this so shouldn't need to call Dirty() here diff --git a/Resources/Prototypes/Entities/Effects/puddle.yml b/Resources/Prototypes/Entities/Effects/puddle.yml index 007a55daff..300ccbcf6e 100644 --- a/Resources/Prototypes/Entities/Effects/puddle.yml +++ b/Resources/Prototypes/Entities/Effects/puddle.yml @@ -41,6 +41,7 @@ state: gibblet-0 - type: Puddle variants: 5 + state: gibblet - type: entity name: puddle @@ -53,6 +54,7 @@ state: smear-0 - type: Puddle variants: 7 + state: smear - type: entity name: puddle @@ -65,6 +67,7 @@ state: splatter-0 - type: Puddle variants: 6 + state: splatter - type: entity name: vomit @@ -79,6 +82,7 @@ variants: 4 recolor: false evaporate_threshold: -1 + state: vomit - type: entity name: toxins vomit @@ -92,6 +96,7 @@ - type: Puddle variants: 4 recolor: false + state: vomit_toxin - type: entity name: writing @@ -104,3 +109,4 @@ state: writing-0 - type: Puddle variants: 5 + state: writing diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/egg.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/egg.yml index 1c9a7375eb..f2896a2ba0 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/egg.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/egg.yml @@ -65,7 +65,8 @@ state: egg-0 - type: Puddle variants: 4 - + state: egg + - type: entity name: eggshells parent: BaseItem @@ -79,6 +80,12 @@ netsync: false - type: Item size: 1 + - type: SolutionContainer + maxVol: 1 + contents: + reagents: + - ReagentId: Egg + Quantity: 1 # Egg diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/ingredients.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/ingredients.yml index c6188b6b4c..e3964dc17f 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/ingredients.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/ingredients.yml @@ -1,5 +1,20 @@ # Lots of misc stuff in here, hard to parent it. +# Powder (For when you throw stuff like flour and it explodes) + +- type: entity + name: flour + id: PuddleFlour + parent: PuddleBase + description: Call the janitor. + components: + - type: Sprite + sprite: Objects/Consumable/Food/ingredients.rsi + state: powder-0 + color: white + - type: Puddle + state: powder + # Reagent Containers - type: entity @@ -31,6 +46,26 @@ reagents: - ReagentId: Flour Quantity: 50 + - type: DamageOnLand + amount: 1 + - type: DamageOtherOnHit + amount: 1 + - type: Damageable + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 2 + behaviors: + - !type:PlaySoundCollectionBehavior + soundCollection: desecration + - !type:SpawnEntitiesBehavior + spawn: + PuddleFlour: + min: 1 + max: 1 + - !type:DoActsBehavior + acts: [ "Destruction" ] - type: entity parent: ReagentContainerBase @@ -46,6 +81,26 @@ reagents: - ReagentId: Flour Quantity: 20 + - type: DamageOnLand + amount: 1 + - type: DamageOtherOnHit + amount: 1 + - type: Damageable + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 2 + behaviors: + - !type:PlaySoundCollectionBehavior + soundCollection: desecration + - !type:SpawnEntitiesBehavior + spawn: + PuddleFlour: + min: 1 + max: 1 + - !type:DoActsBehavior + acts: [ "Destruction" ] - type: entity parent: ReagentContainerBase diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml index 998f004c5c..6106a54f69 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml @@ -243,6 +243,38 @@ reagents: - ReagentId: JuiceTomato Quantity: 10 + - type: DamageOnLand + amount: 1 + - type: DamageOtherOnHit + amount: 1 + - type: Damageable + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 1 + behaviors: + - !type:PlaySoundCollectionBehavior + soundCollection: desecration + - !type:SpawnEntitiesBehavior + spawn: + PuddleTomato: + min: 1 + max: 1 + - !type:DoActsBehavior + acts: [ "Destruction" ] + +- type: entity + name: tomato + id: PuddleTomato + parent: PuddleBase + description: Splat. + components: + - type: Sprite + sprite: Objects/Specific/Hydroponics/tomato.rsi + state: puddle-0 + - type: Puddle + variants: 3 - type: entity name: eggplant diff --git a/Resources/Textures/Objects/Consumable/Food/ingredients.rsi/meta.json b/Resources/Textures/Objects/Consumable/Food/ingredients.rsi/meta.json index cd099532ca..d85acfcd63 100644 --- a/Resources/Textures/Objects/Consumable/Food/ingredients.rsi/meta.json +++ b/Resources/Textures/Objects/Consumable/Food/ingredients.rsi/meta.json @@ -64,6 +64,9 @@ { "name": "pizzabread" }, + { + "name": "powder-0" + }, { "name": "rice-big" }, diff --git a/Resources/Textures/Objects/Consumable/Food/ingredients.rsi/powder-0.png b/Resources/Textures/Objects/Consumable/Food/ingredients.rsi/powder-0.png new file mode 100644 index 0000000000000000000000000000000000000000..218aa8d17615715173070d60e1d7acf9bf4bb316 GIT binary patch literal 1453 zcmV;e1ycHnP)Z z+iz4=6vn@~bUMAUN;^OSfkD9%5IF`CVoc-}{|o;`AN1AmWW)%^C>Nm?ioMfzx?5=H z))}+#x0_9ifd@}AnaP}e*80}>eQWJ~3jKax|HlvApn5t@?Dp7 zUecf^mei885JK<-1vBdc+Sl%7Syu4>B~3~CM$%H@+2{%J`cOFBYQ zmuXzm8RQxQe9q@LNe@$r((5e~h7e9lYLHX}{R$a2&@m>Qlk}Ksk4idAl4n#MnQ-|U zd7igF1i%eRn}7)X{fVRt39XmhXPEM5Nvlq;q>o_7f&L-sFG+2{?n-)juuJwSPp%Pk z?nzpatl>5aj%ht`T8PnalbLS8M*Zdk)`gKpz zFRTNx zR#F*!kkp`Wj0M+0zJca}hYUT7P=1V-n}>mI*f^IY>hOGnSZ7H7B!qCq%pR1@Y%PS~ zm43;BE0XRKtc}wv1U3K+5Xe37D`qVKY8;=mlW984{Wh#Eb8laQHc5_Po~tBzj4?-{ zF`9CKsu~#Y1ao1H{$J(U4)PeX?Gmp+&V2x$^mhVOl85>XriEk@UWU#VObPGA$|hlJ zi?}78-5_3rXZ-(8?1Etu)|hAosBBWv4(NT|*G$I^=6vdMp9MFO#*@$DjmXR^VzGi$NOze3A4 zK|T2mdcK7rn}Ga0Sr-j7|op*$lcBq1Cm0O7KB+A40B4*cvBhAZ}!=i-&e8Mnw*x zv6U{;LPP8eO8VCWO|uuY2tLmsnuT`b_m7gklk@}NOMF&{Rf^--8R&RBBm-rdppRHI zPVY}+yax1c0%9E&UL)Zu(rlvpFe5uM@S0q{GZu=;K`|c3FVM%OgqhD6)fuDuQX=0r zQ*Rk*o&l_j2`6A@9`K8Js$^#S$MU#U#@RoYoC_o30oIJu2?JDINh&qAM1B^lT++VDm(_=F95a0y)q`W#OVz>Ax_KZ0QSxA!J!io6>Q;b z?}BEO#^*tnWpe!zaCp$?HSB&|L^+y<-i8b%+2>wjCZE00000NkvXX Hu0mjf7m2N& literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Specific/Hydroponics/tomato.rsi/meta.json b/Resources/Textures/Objects/Specific/Hydroponics/tomato.rsi/meta.json index 140deb3229..cdfcdbacc5 100644 --- a/Resources/Textures/Objects/Specific/Hydroponics/tomato.rsi/meta.json +++ b/Resources/Textures/Objects/Specific/Hydroponics/tomato.rsi/meta.json @@ -1 +1,50 @@ -{"version": 1, "size": {"x": 32, "y": 32}, "license": "CC-BY-SA-3.0", "copyright": "Taken from https://github.com/vgstation-coders/vgstation13 at 1dbcf389b0ec6b2c51b002df5fef8dd1519f8068", "states": [{"name": "dead", "delays": [[1.0]]}, {"name": "harvest", "delays": [[1.0]]}, {"name": "produce", "delays": [[1.0]]}, {"name": "seed", "delays": [[1.0]]}, {"name": "stage-1", "delays": [[1.0]]}, {"name": "stage-2", "delays": [[1.0]]}, {"name": "stage-3", "delays": [[1.0]]}, {"name": "stage-4", "delays": [[1.0]]}, {"name": "stage-5", "delays": [[1.0]]}, {"name": "stage-6", "delays": [[1.0]]}]} \ No newline at end of file +{ + "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": "dead" + }, + { + "name": "harvest" + }, + { + "name": "produce" + }, + { + "name": "seed" + }, + { + "name": "puddle-0" + }, + { + "name": "puddle-1" + }, + { + "name": "puddle-2" + }, + { + "name": "stage-1" + }, + { + "name": "stage-2" + }, + { + "name": "stage-3" + }, + { + "name": "stage-4" + }, + { + "name": "stage-5" + }, + { + "name": "stage-6" + } + ] +} \ No newline at end of file diff --git a/Resources/Textures/Objects/Specific/Hydroponics/tomato.rsi/puddle-0.png b/Resources/Textures/Objects/Specific/Hydroponics/tomato.rsi/puddle-0.png new file mode 100644 index 0000000000000000000000000000000000000000..3743f674ac563f2449e141b3b54069e184cb042c GIT binary patch literal 1256 zcmVP)2%^jig=*z4+4N{YiU~lIp?9<0>)}G-fxriRc{KQ8*sYrB{*X>Rb?9! z?d?042_|a|v*sAv3xISja8dIkDs$+|z6_rmwza*!Kq`QN0PEd-~9! z@1k1mmjLSX^rgL+9)Gt`r2Lz`74S^TWyOUT2Ezb0m;+gg&|tF->IR&yk(BuOjpifW z0O0O<`vd?i7L^;QJnheuZ@j)l)>bnB+5l9>msj2^c)qbG`P?%X0if{0-~j-TS}cM` zaZ8;rBGdLQN!5-}*YPvEWqW*~uH$C_K%$Vl6La(IvRK?$y06BkQ>zY(#N^AqanC{D zxaVNZZa>G@(iD}P5sJO#PB`~b*D?RKu@Ca~#p9v*kXFfZS}uR*d5J>qR-{sIMZ-aH zKDX=*81o+u*qN`_rVY#3XvM0SnlRXGgWJx)nwYYK`+JFavP@H6HbIn^eFgwZzxQLQ z_b;l5jmE`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zirM@V0PJ?T`U>L?65{MCAW?D<3B#j#4ebDCRw#s$$}N^C58ETT{6JQ(dr()S{H02z z(3#t)Xs%uRd(%60BxS5U;Q`$A($f38U9P_3>DR?^y|brJk5yDaus|oV3q=0qagtVG z6aaW-%`QoL`TD9-)vQP-{2M+wKaE*ti1Q2*;@n|2-xLN=DU)y)01c!7*LgpO94PRa4#Wa0MN*Bb<7awQlt~Z0A`pW z&b83ekplofjadLQig@Ic;`JGtzTg!(UkJnQrM?9v9X3ozQ>k$~ed<)udhw#@NlKK! zn>d1d32_#;AW)(U%7K?UxQfYKXky^NCJ&{rYhucloC9y-f1#MN|EmIG_8-$LbSUqT RwbK9q002ovPDHLkV1fZklv4lz literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Specific/Hydroponics/tomato.rsi/puddle-2.png b/Resources/Textures/Objects/Specific/Hydroponics/tomato.rsi/puddle-2.png new file mode 100644 index 0000000000000000000000000000000000000000..c55d6eabdddbcf1916168a94ab18ff435292da7d GIT binary patch literal 1536 zcmV+b2LJhqP)GZ3vasheoBk?5~&F>xf@k7dh9 zm{~T>zG;GPicU0+Wy5TrmyC;YD>$quP_TvCLMik@>4p8kx`J&f#>Ds6cRBBQ-t(O2 zeb0NsSeC`}wD9MO9xMR8Qd#s|0}wGx!(z^%1SumVXGsAp=HP3K1t}vWr<-LvgN+GW ziU>oQaH;kL1A3+Mh`)iS30eI#;1nSR!Tv9afu&feY=r|rYh~rUeSg{vkP(t2Bc#j= z-n(;0{bD{LGtjP36s@bR^(#6~?eSdScbDRWwvPA8e|UXp^lJ;t_WASCE0skehG}>l zKx<`XQC>|=P*tl5seTtY+0C+@-fZc8f7i0Kp7w0*jB|sH6XlumxSHaotSLP8klMns z=NAGleD=!#MM$-UWe@rbLRVfsl2Tk)>|JTb#|IQ6gSrFZLcZ4QoC(*=%;rlRu5Nu8 zUJ;!-Cwv6xE9{%T>Fc);Sy=WUMM$;xyjnUWaU#iX zoyq0e>>8cLc-YIByQHKZz%~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