From 426c06f6028c7cfc6910a4c230bbacb3ffc66b03 Mon Sep 17 00:00:00 2001 From: PuroSlavKing Date: Wed, 13 Nov 2024 20:59:25 +0300 Subject: [PATCH 1/2] [Tweak] Legacy Puddles --- Content.Client/Fluids/PuddleSystem.cs | 19 ++++++++ .../Prototypes/Entities/Effects/puddle.yml | 28 ++++++++--- .../_Everwood/Fluids/puddle.rsi/meta.json | 44 ++++++++++++++++++ .../_Everwood/Fluids/puddle.rsi/puddle-0.png | Bin 0 -> 343 bytes .../_Everwood/Fluids/puddle.rsi/puddle-1.png | Bin 0 -> 301 bytes .../_Everwood/Fluids/puddle.rsi/puddle-10.png | Bin 0 -> 267 bytes .../_Everwood/Fluids/puddle.rsi/puddle-2.png | Bin 0 -> 353 bytes .../_Everwood/Fluids/puddle.rsi/puddle-3.png | Bin 0 -> 367 bytes .../_Everwood/Fluids/puddle.rsi/puddle-4.png | Bin 0 -> 349 bytes .../_Everwood/Fluids/puddle.rsi/puddle-5.png | Bin 0 -> 392 bytes .../_Everwood/Fluids/puddle.rsi/puddle-6.png | Bin 0 -> 400 bytes .../_Everwood/Fluids/puddle.rsi/puddle-7.png | Bin 0 -> 440 bytes .../_Everwood/Fluids/puddle.rsi/puddle-8.png | Bin 0 -> 383 bytes .../_Everwood/Fluids/puddle.rsi/puddle-9.png | Bin 0 -> 279 bytes 14 files changed, 84 insertions(+), 7 deletions(-) create mode 100644 Resources/Textures/_Everwood/Fluids/puddle.rsi/meta.json create mode 100644 Resources/Textures/_Everwood/Fluids/puddle.rsi/puddle-0.png create mode 100644 Resources/Textures/_Everwood/Fluids/puddle.rsi/puddle-1.png create mode 100644 Resources/Textures/_Everwood/Fluids/puddle.rsi/puddle-10.png create mode 100644 Resources/Textures/_Everwood/Fluids/puddle.rsi/puddle-2.png create mode 100644 Resources/Textures/_Everwood/Fluids/puddle.rsi/puddle-3.png create mode 100644 Resources/Textures/_Everwood/Fluids/puddle.rsi/puddle-4.png create mode 100644 Resources/Textures/_Everwood/Fluids/puddle.rsi/puddle-5.png create mode 100644 Resources/Textures/_Everwood/Fluids/puddle.rsi/puddle-6.png create mode 100644 Resources/Textures/_Everwood/Fluids/puddle.rsi/puddle-7.png create mode 100644 Resources/Textures/_Everwood/Fluids/puddle.rsi/puddle-8.png create mode 100644 Resources/Textures/_Everwood/Fluids/puddle.rsi/puddle-9.png diff --git a/Content.Client/Fluids/PuddleSystem.cs b/Content.Client/Fluids/PuddleSystem.cs index 5dbffe0fd2..b1e160f8b4 100644 --- a/Content.Client/Fluids/PuddleSystem.cs +++ b/Content.Client/Fluids/PuddleSystem.cs @@ -4,12 +4,15 @@ using Content.Shared.Fluids.Components; using Robust.Client.GameObjects; using Robust.Shared.Map; +using Robust.Shared.Maths; // Everwood +using Robust.Shared.Random; // Everwood namespace Content.Client.Fluids; public sealed class PuddleSystem : SharedPuddleSystem { [Dependency] private readonly IconSmoothSystem _smooth = default!; + [Dependency] private readonly IRobustRandom _random = default!; // Everwood public override void Initialize() { @@ -30,6 +33,13 @@ private void OnPuddleAppearance(EntityUid uid, PuddleComponent component, ref Ap volume = (float) volumeObj; } + // Everwood + if (TryComp(uid, out var sprite)) + { + RandomizeRotation(sprite); + } + + /* Everwood REMOVE | Legacy Puddle // Update smoothing and sprite based on volume. if (TryComp(uid, out var smooth)) { @@ -53,6 +63,7 @@ private void OnPuddleAppearance(EntityUid uid, PuddleComponent component, ref Ap } } } + */ var baseColor = Color.White; @@ -100,4 +111,12 @@ public override bool TrySpillAt(TileRef tileRef, Solution solution, out EntityUi } #endregion Spill + + // Everwood Start + private void RandomizeRotation(SpriteComponent sprite) + { + float rotationDegrees = _random.Next(0, 359); // Randomly select a rotation for puddle sprite. + sprite.Rotation = Angle.FromDegrees(rotationDegrees); // Sets the sprite rotation to the one we randomly selected. + } + // Everwood End } diff --git a/Resources/Prototypes/Entities/Effects/puddle.yml b/Resources/Prototypes/Entities/Effects/puddle.yml index 0d2c49d5c9..4103f5184c 100644 --- a/Resources/Prototypes/Entities/Effects/puddle.yml +++ b/Resources/Prototypes/Entities/Effects/puddle.yml @@ -117,12 +117,26 @@ - type: Transform noRot: true anchored: true - - type: Sprite + - type: Sprite # Everwood-EDIT Start + sprite: _Everwood/Fluids/puddle.rsi layers: - - sprite: Fluids/puddle.rsi - state: splat0 + - state: puddle-0 drawdepth: FloorObjects color: "#FFFFFF80" + - type: RandomSprite + available: + - 0: + puddle-0: "" + puddle-1: "" + puddle-2: "" + puddle-3: "" + puddle-4: "" + puddle-5: "" + puddle-6: "" + puddle-7: "" + puddle-8: "" + puddle-9: "" + puddle-10: "" # Everwood-EDIT End - type: Physics bodyType: Static - type: Fixtures @@ -136,10 +150,10 @@ layer: - SlipLayer hard: false - - type: IconSmooth - key: puddles - base: splat - mode: CardinalFlags +# - type: IconSmooth # Everwood - Legacy Puddles +# key: puddles +# base: splat +# mode: CardinalFlags - type: SolutionContainerManager solutions: puddle: diff --git a/Resources/Textures/_Everwood/Fluids/puddle.rsi/meta.json b/Resources/Textures/_Everwood/Fluids/puddle.rsi/meta.json new file mode 100644 index 0000000000..fdbc60494c --- /dev/null +++ b/Resources/Textures/_Everwood/Fluids/puddle.rsi/meta.json @@ -0,0 +1,44 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC-BY-SA-3.0", + "copyright": "https://github.com/discordia-space/CEV-Eris/raw/aff0d780742ca3902d8b05f854c212c8cda32c4f/icons/effects/blood.dmi", + "states": [ + { + "name": "puddle-0" + }, + { + "name": "puddle-1" + }, + { + "name": "puddle-2" + }, + { + "name": "puddle-3" + }, + { + "name": "puddle-4" + }, + { + "name": "puddle-5" + }, + { + "name": "puddle-6" + }, + { + "name": "puddle-7" + }, + { + "name": "puddle-8" + }, + { + "name": "puddle-9" + }, + { + "name": "puddle-10" + } + ] +} diff --git a/Resources/Textures/_Everwood/Fluids/puddle.rsi/puddle-0.png b/Resources/Textures/_Everwood/Fluids/puddle.rsi/puddle-0.png new file mode 100644 index 0000000000000000000000000000000000000000..d43552e57f7d11091012add7c910974343b157c8 GIT binary patch literal 343 zcmV-d0jU0oP)bC5E14!PkyXU literal 0 HcmV?d00001 diff --git a/Resources/Textures/_Everwood/Fluids/puddle.rsi/puddle-1.png b/Resources/Textures/_Everwood/Fluids/puddle.rsi/puddle-1.png new file mode 100644 index 0000000000000000000000000000000000000000..601c6217bfe2d07a099f76129262a4b64e66b00b GIT binary patch literal 301 zcmV+|0n+}7P)qZfbz zPyl`c06?ANZ@zL80%$J-05FM&JquzNfClaK)9T)5GytF`*)QL7?Y<(+EiHgn^>Pg0 zNQoV^YQ>7`C6&ynlaOTZ1rPSK0M^sx=2ca7Ypsj| zxJ&>{ZlwL*JbCiu#*G`tKCE2{ z6l5$3@(X5gcy=QV$l2iO;us<^HMh@@?~nnH>s$@Dg~4rN2gL#=u9~N$&>~^HVam*A ziIu_2n*@w=WQ5;r@u~P2obzA2VdEA4Lmn5G%FSU-I&sk{e_ul)x6zf0f%}uSctwjW z@BT1bySqb^@$Q6m<)ws@Y_yUY5#woAIQ@cZ?Xcp}qh#o2w^_vWWg`w@}T04*6D@fdnhyb`TIe_t{0*u6nvyh)WJ+zYV764$h)e~_MQAc)nfNURVEcrO* zdA>(F5iTJU7UssT>%Q56EiqLAs@j|N6oH7y03h*ocJ%gd#j)vttr)<~uiozpD(UVB zlK&W~>O$nHL}VmZ&RQ&6rCbSMaxWtC&_xx(C1XW#XxrYVpAtmyn-7TNx zhxfpLqxp~M2>Y7^n9WC(^K&CO1)Ks-0Y~8%uWiYcjX^H^00000NkvXXu0mjfxtX5d literal 0 HcmV?d00001 diff --git a/Resources/Textures/_Everwood/Fluids/puddle.rsi/puddle-3.png b/Resources/Textures/_Everwood/Fluids/puddle.rsi/puddle-3.png new file mode 100644 index 0000000000000000000000000000000000000000..05ea5903a200f7c3c20c7c0977c3ec91ab4e5adb GIT binary patch literal 367 zcmV-#0g(QQP)#dyI-?Z!>e?>NK}S7%XQHLi?wX8 zc1>+t9ybR}+P(6?!Ynwe(Ad%37t&2aDT6R>8RwYipnY!$@V6VFuzw8H=WG5HE8#UC6T*Pw_?-Bthq N002ovPDHLkV1j`|p6~zw literal 0 HcmV?d00001 diff --git a/Resources/Textures/_Everwood/Fluids/puddle.rsi/puddle-4.png b/Resources/Textures/_Everwood/Fluids/puddle.rsi/puddle-4.png new file mode 100644 index 0000000000000000000000000000000000000000..2b952839d764425169bed1b6911444363bb8b041 GIT binary patch literal 349 zcmV-j0iyniP)aO|#Ars+$o8~t8$OAjkFs9^ zE&*RHfaLrZ0VL;EaFVl#+#~U(ksDDDvEft;UR9u%yh}i|r)BMf>lUnOGfoQo00000NkvXXu0mjft`(SZ literal 0 HcmV?d00001 diff --git a/Resources/Textures/_Everwood/Fluids/puddle.rsi/puddle-5.png b/Resources/Textures/_Everwood/Fluids/puddle.rsi/puddle-5.png new file mode 100644 index 0000000000000000000000000000000000000000..7c186e741c988157431d4b3c32143a1c25631d3f GIT binary patch literal 392 zcmV;30eAk1P)j@twYa#r&CSi*+uP62 z&*$go-{0R*ChAQ90004WQchCc1%2!n`K*lc>F?f-vk z!S3aw+q{&?cw%!%0z}T4ejVq-@7glv=p?nd;Y3w5w;3(ep9w{+Dah|TLfZ&20n{>b z#wXt{u#!YfI51qRd3k3Z-lI_TDqFsjP2ErbO|H9eQ)3qMfy0CBMTZ%^0<L^a+e~sdFm+rQeGrCq+W4T!vOheRT~H7^hGW m5D|{w7dHX#t@U62|F(DM#sqavA6Q@j0000 z>Hq&~Wzz`+Na&(dEnsXNUtP&#fd33U1L%~&GntS8epim@M7~SJ=QWoaChv;y@JQ`| zzLB*6=rO_FzpBFc0SO-cEU+>*OfS~~3<1}`>|1Y_3}#LWY*6IDqezu36gi&K=$mY) zh<;X($r!y>(X|PlS5h;eONlzI%u^H1f5=pf>fFXT?gkMI7pkRD5+ktdY7{sV#!l6W z8IhO?J{|8qjpMX?>)LhGXKdc%H!(p+0(2&(F`-*VpCc z<;~5_+}zyA$jG?3xV5#l($dn<(9oNkn;9nd`~Uy|0d!JMQvg8b*k%9#0ToF^K~y-6 zty9~UgCGpd1>GX-y0md`|No&IE+SIx=|g!?4>L?M69jnW!e>Zyew;GSClus}D#&NW zBgVW5^g_y^h%>JEeJN%`ML=8Op~uHYfZyO^r#!kNI;9E(wfRpxfjd z27;Mq7Gsy>GM4|+FTWWu#)D{u>^KbYeF00A0UQ?ab}Sh=7QESLs8~iyh;@Y7t(RcM z@)g?o{R~bhZ7>87yZoA6>Mq7y1PFsHD6qAl2Zy*{GbWxyaCblInDflMW9l!EhRms} z7^m;2p2v*YlfHX`UmHRwMp}7HVBMf3=yw9R3gjl#1Q6YGHWiH)AN>TB8$DhO&2>E@ iVa1PrkH6;m!u1aleFiK3N8srI0000E~*4Eb2($e4G-{>W5h5!Hn0d!JMQvg8b*k%9#0O(0XK~y-6ol=XA0x<}Lr3Lm- z-0SK6|EJ165~I?ZNU}7WftjHc;LE^o8;_WVD3x({#X$jsRK+kzl*2sh53ZQ?C}x}L z&_F?q0?Kc}R`GI@NVx+H;WI@tzsy|^XMn{VQwjh*PNHng;I3g%EynE-*l%mCCmtrv z*u81ACjz_@)X6<;kfqCP;(^QVkrRPN_;+>RxA3+K7U8NltnwJ?8E1jT{lAFp&+$ov zw?Av%7MC!I>8eTzYjb$$JZMIoI0oI8lvD(`DOFN^F>ny-5>pqBGJYmphs!J9)_Lo57JU*Q7%zyu@qlZ$-2~cznyVVap(U zR!w)X2-%YI_zzY0XUPjl-3 Date: Wed, 13 Nov 2024 21:16:48 +0300 Subject: [PATCH 2/2] up1 --- Content.Client/Fluids/PuddleSystem.cs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Content.Client/Fluids/PuddleSystem.cs b/Content.Client/Fluids/PuddleSystem.cs index b1e160f8b4..0786c8999c 100644 --- a/Content.Client/Fluids/PuddleSystem.cs +++ b/Content.Client/Fluids/PuddleSystem.cs @@ -25,19 +25,14 @@ private void OnPuddleAppearance(EntityUid uid, PuddleComponent component, ref Ap { if (args.Sprite == null) return; - + /* Everwood REMOVE | Legacy Puddle var volume = 1f; if (args.AppearanceData.TryGetValue(PuddleVisuals.CurrentVolume, out var volumeObj)) { volume = (float) volumeObj; } - - // Everwood - if (TryComp(uid, out var sprite)) - { - RandomizeRotation(sprite); - } + */ /* Everwood REMOVE | Legacy Puddle // Update smoothing and sprite based on volume. @@ -65,6 +60,12 @@ private void OnPuddleAppearance(EntityUid uid, PuddleComponent component, ref Ap } */ + // Everwood + if (TryComp(uid, out var sprite)) + { + RandomizeRotation(sprite); + } + var baseColor = Color.White; if (args.AppearanceData.TryGetValue(PuddleVisuals.SolutionColor, out var colorObj))