From c4c4a934af7655a3c9c936210c9ea5a777ae167e Mon Sep 17 00:00:00 2001 From: Nemanja <98561806+EmoGarbage404@users.noreply.github.com> Date: Tue, 30 Jul 2024 00:03:46 -0400 Subject: [PATCH] fix lathe screen animations (#30479) --- Content.Client/Lathe/LatheSystem.cs | 28 +++++++---- Content.Shared/Lathe/LatheComponent.cs | 6 +++ .../Entities/Structures/Machines/lathe.yml | 4 ++ .../Machines/autolathe.rsi/meta.json | 34 +++++++++---- .../Machines/autolathe.rsi/unlit-building.png | Bin 0 -> 521 bytes .../Machines/autolathe_hypercon.rsi/meta.json | 34 +++++++++---- .../autolathe_hypercon.rsi/unlit-building.png | Bin 0 -> 859 bytes .../Machines/protolathe.rsi/meta.json | 46 +++++++++++++----- .../protolathe.rsi/unlit-building.png | Bin 0 -> 604 bytes .../protolathe_hypercon.rsi/meta.json | 37 ++++++++++---- .../unlit-building.png | Bin 0 -> 1236 bytes 11 files changed, 138 insertions(+), 51 deletions(-) create mode 100644 Resources/Textures/Structures/Machines/autolathe.rsi/unlit-building.png create mode 100644 Resources/Textures/Structures/Machines/autolathe_hypercon.rsi/unlit-building.png create mode 100644 Resources/Textures/Structures/Machines/protolathe.rsi/unlit-building.png create mode 100644 Resources/Textures/Structures/Machines/protolathe_hypercon.rsi/unlit-building.png diff --git a/Content.Client/Lathe/LatheSystem.cs b/Content.Client/Lathe/LatheSystem.cs index c72f01b39b..386520c198 100644 --- a/Content.Client/Lathe/LatheSystem.cs +++ b/Content.Client/Lathe/LatheSystem.cs @@ -22,21 +22,29 @@ public sealed class LatheSystem : SharedLatheSystem if (args.Sprite == null) return; + // Lathe specific stuff + if (_appearance.TryGetData(uid, LatheVisuals.IsRunning, out var isRunning, args.Component)) + { + if (args.Sprite.LayerMapTryGet(LatheVisualLayers.IsRunning, out var runningLayer) && + component.RunningState != null && + component.IdleState != null) + { + var state = isRunning ? component.RunningState : component.IdleState; + args.Sprite.LayerSetState(runningLayer, state); + } + } + if (_appearance.TryGetData(uid, PowerDeviceVisuals.Powered, out var powered, args.Component) && args.Sprite.LayerMapTryGet(PowerDeviceVisualLayers.Powered, out var powerLayer)) { args.Sprite.LayerSetVisible(powerLayer, powered); - } - // Lathe specific stuff - if (_appearance.TryGetData(uid, LatheVisuals.IsRunning, out var isRunning, args.Component) && - args.Sprite.LayerMapTryGet(LatheVisualLayers.IsRunning, out var runningLayer) && - component.RunningState != null && - component.IdleState != null) - { - var state = isRunning ? component.RunningState : component.IdleState; - args.Sprite.LayerSetAnimationTime(runningLayer, 0f); - args.Sprite.LayerSetState(runningLayer, state); + if (component.UnlitIdleState != null && + component.UnlitRunningState != null) + { + var state = isRunning ? component.UnlitRunningState : component.UnlitIdleState; + args.Sprite.LayerSetState(powerLayer, state); + } } } diff --git a/Content.Shared/Lathe/LatheComponent.cs b/Content.Shared/Lathe/LatheComponent.cs index 88ac8c05bf..5039e78cb0 100644 --- a/Content.Shared/Lathe/LatheComponent.cs +++ b/Content.Shared/Lathe/LatheComponent.cs @@ -39,6 +39,12 @@ namespace Content.Shared.Lathe [DataField] public string? RunningState; + + [DataField] + public string? UnlitIdleState; + + [DataField] + public string? UnlitRunningState; #endregion /// diff --git a/Resources/Prototypes/Entities/Structures/Machines/lathe.yml b/Resources/Prototypes/Entities/Structures/Machines/lathe.yml index 66f4f684e9..8abcc657cd 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/lathe.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/lathe.yml @@ -115,6 +115,8 @@ - type: Lathe idleState: icon runningState: building + unlitIdleState: unlit + unlitRunningState: unlit-building staticRecipes: - Wirecutter - Igniter @@ -266,6 +268,8 @@ - type: Lathe idleState: icon runningState: building + unlitIdleState: unlit + unlitRunningState: unlit-building staticRecipes: - LargeBeaker - Dropper diff --git a/Resources/Textures/Structures/Machines/autolathe.rsi/meta.json b/Resources/Textures/Structures/Machines/autolathe.rsi/meta.json index b53c89c7a6..2e28bba287 100644 --- a/Resources/Textures/Structures/Machines/autolathe.rsi/meta.json +++ b/Resources/Textures/Structures/Machines/autolathe.rsi/meta.json @@ -20,15 +20,31 @@ "name": "building", "delays": [ [ - 0.5, - 0.5, - 0.5, - 0.5, - 0.5, - 0.5, - 0.5, - 0.5, - 0.5 + 0.15, + 0.15, + 0.15, + 0.15, + 0.15, + 0.15, + 0.15, + 0.15, + 0.15 + ] + ] + }, + { + "name": "unlit-building", + "delays": [ + [ + 0.15, + 0.15, + 0.15, + 0.15, + 0.15, + 0.15, + 0.15, + 0.15, + 0.15 ] ] }, diff --git a/Resources/Textures/Structures/Machines/autolathe.rsi/unlit-building.png b/Resources/Textures/Structures/Machines/autolathe.rsi/unlit-building.png new file mode 100644 index 0000000000000000000000000000000000000000..5b17c682dc21acc38e09671d72c55d6c5ef9a2be GIT binary patch literal 521 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD1|%QND7OGojKx9jP7LeL$-D%z4|}>ehE&XX zd)MBN$x-C^$MzGf8QZ?`wY7xtC-|qju9oHG6+3q1+^sI{0tSs7k3B43&8C@%C7bTx zdF(drsqM6%b+Z&_Pq;t(udv3wHyuFJ!Jt8fH!U|@W^3=KzRZ2k{^%#Ohj-8G&@oTe z*nN6Y>(kA9Lfr%9^{+4cIqUQKkPjRE57d8pe}DhBKHv7(t$zaV6<$s(e_k>5&kNxT zEE|Oj%x*sRJT2;;3nbUhwK)CfQN|&Ym^%F?*KPZMg#BE~wt3rY`!BH;Sx?u`{WEiY z;h{q@@%~r;bl2|R5cTEBt7paOA{Q&O^5lQdzVq{Tk@o+eFMsSmn7D4eyS6;cy&&4b zdFhq;@{2A1XOx$C{rzbOa@vOd&WFr$&;G0VzcZrQwQeKZ)~}4y_WtyI68-)7@_G69 zQ|*L*y2Ozr)Dy{xCl^O)AwAltyeJ2j}jF0$?hYc0Px&6-h)vRCt{2-OW$aa2&_+Z%0vM;(vToh^FJ(f?A{SyD5=Ed zmk#Q!voGf~|LVz+3IILwVt=P~+52339(xJY;#Cz9*_@rQcBu^IZ!g7u?uYe76%kpR zv6p}0_)*~d$LIUs|8U}BvV8x;Z&dH9h)DI*)<17dvjfsv{ZdmAk?G|-8eE^O^8LKH z{O}I2o1cikb3{aHbM}s`LCKe|w*&dt`4I#F0000000000000nT)T!==e!i#LD#m7= zKRY$9PDGMPzR`R@X{`CSQlOKcWih7wH@~4G^WU?Z3-CR>Tdj5s~vlogI9UXTWLw_-;?5^n3o?x4Hx`L780l0HBYg>Bsx^ z?d{oX)_yF#+<%>TJ|J~JKY?&PK0g2bt0yWVvQbFb;`TT0h}4W%?FgnhC|ixtb6*8M_oA=QLJCcYz^!+qK)PQ+I#u7d-|v4pY8IqB9c76 zz^}+3YiD(NYx4nh&t5q!$^HAgDarE-M8ey_=JOK(px*^6+kXH4Bp){x)Ai#m=kIMk zv;O>m@be3nV?TFy?Wu~0Y$bhuLaU#@)a=Kv>}|%*2b{J6(n@>({;uV(49I+d&B>EN l$q&va)Os+V000<#e*ni-<1RzX3)}zz002ovPDHLkV1hu5u`vJu literal 0 HcmV?d00001 diff --git a/Resources/Textures/Structures/Machines/protolathe.rsi/meta.json b/Resources/Textures/Structures/Machines/protolathe.rsi/meta.json index 17832603ef..57f80369d0 100644 --- a/Resources/Textures/Structures/Machines/protolathe.rsi/meta.json +++ b/Resources/Textures/Structures/Machines/protolathe.rsi/meta.json @@ -20,19 +20,39 @@ "name": "building", "delays": [ [ - 0.8, - 0.8, - 0.8, - 0.8, - 0.8, - 0.8, - 0.8, - 0.8, - 0.8, - 0.8, - 0.8, - 0.8, - 0.8 + 0.10, + 0.10, + 0.10, + 0.10, + 0.10, + 0.10, + 0.10, + 0.10, + 0.10, + 0.10, + 0.10, + 0.10, + 0.10 + ] + ] + }, + { + "name": "unlit-building", + "delays": [ + [ + 0.10, + 0.10, + 0.10, + 0.10, + 0.10, + 0.10, + 0.10, + 0.10, + 0.10, + 0.10, + 0.10, + 0.10, + 0.10 ] ] }, diff --git a/Resources/Textures/Structures/Machines/protolathe.rsi/unlit-building.png b/Resources/Textures/Structures/Machines/protolathe.rsi/unlit-building.png new file mode 100644 index 0000000000000000000000000000000000000000..b72d06d65465e7baf9b41d9be12de9b6bfd5ffd5 GIT binary patch literal 604 zcmeAS@N?(olHy`uVBq!ia0vp^4Is?H1|$#LC7uRSjKx9jP7LeL$-HD>U=s6maSW-L z^Y+e0ujoVxwg>vY#mst*d3!swgjz00znHgj^6V0xjt6%vqt(+FI_EiXxq4~!oy$8E zS;Z{tw_G@>r(lWYfBEy3^PcuI*6zRGpmzATE6@%wm}@Ze`{}EjSO2`6bm7CumI z*Z#cv_)5m|Q+TcHzuHOrKk6UI-v09Fba}zRE58|+Ki~W5o8GC*pW~+eZ`}Rho8G2- zw%K)GA3c{^bn5Kf`M1}d`KUCxa=*==qKI|#1vB+bfM)*4i3xk2a!>zw`s0-SC%)c! z_4>-s()a(%1_Jp{9CTQTHf?r?sR_szs2T-=WYE`ryG@Liov|k(6Dq>?5x%D`u4H^j+GT$ z?fyT%?$7i5dO6$j!ad=;<#g?1>lXiJT&1{bSJA4vJ%4`v?0v_6 z{`l$gv;DpgHSPUQo}bOXCG1_@u0LmfGs4YhsBqnNrT=}^zP}8z=eNr*c>MDl^9lAF z)9(B&0kO8rGu+q*VI#Bzgukn^dHLo^9mA!}r*#akvcJ|bFibji&tF~tZ%ISgC4Y8? b2C*OPH7DL_mDhUnfHZo#`njxgN@xNAvt23t literal 0 HcmV?d00001 diff --git a/Resources/Textures/Structures/Machines/protolathe_hypercon.rsi/meta.json b/Resources/Textures/Structures/Machines/protolathe_hypercon.rsi/meta.json index b0326326f9..775b298d5a 100644 --- a/Resources/Textures/Structures/Machines/protolathe_hypercon.rsi/meta.json +++ b/Resources/Textures/Structures/Machines/protolathe_hypercon.rsi/meta.json @@ -20,16 +20,33 @@ "name": "building", "delays": [ [ - 1.0, - 1.0, - 1.0, - 1.0, - 1.0, - 1.0, - 1.0, - 1.0, - 1.0, - 1.0 + 0.10, + 0.10, + 0.10, + 0.10, + 0.10, + 0.10, + 0.10, + 0.10, + 0.10, + 0.10 + ] + ] + }, + { + "name": "unlit-building", + "delays": [ + [ + 0.10, + 0.10, + 0.10, + 0.10, + 0.10, + 0.10, + 0.10, + 0.10, + 0.10, + 0.10 ] ] }, diff --git a/Resources/Textures/Structures/Machines/protolathe_hypercon.rsi/unlit-building.png b/Resources/Textures/Structures/Machines/protolathe_hypercon.rsi/unlit-building.png new file mode 100644 index 0000000000000000000000000000000000000000..bce4888e2a702546a41a8f8d7ea6c88415b7d9d2 GIT binary patch literal 1236 zcmZvceNYm17{`Ckm+LgbGDoGUX)3dpN;M59sEKbSl&NWiR2Se`1ioa5Ae?QfZBu*E zP7^UtSH8hgqf14s&E@9FTFp^-t~C*B zTQMd6ZYaww;$5|W1#sWy+SaRWi{ZN=(b<|N>^T|NLaaNsI^Hvc%*==Q)&{1Bl@_N^ z{0G*lLb12#)3?$WxcZJt>57s!*64YY?;8~Q1wwnb>paCc19#{VZ7QdrM$!5)PuuX0 zo_yiRb}IywQ&`*i(y+&p^~Cvw!F$AbvKn2n#7-Ry5>aR;`X1t3=MDG^jQyk_vmTx4 zFt^fsqli(V|2mn5Y^{BhSv}&n6|ffGKYcK*@msJ4Sk7zx$3Ytl?ZrBdUPiIgL+wGU zjY8iNe?N~v6b-HxQr3ig=nV}d>?(9`ju}&ShySEkXBB~4YrnkSH*aiHm?dT4%)k_F z>OoV2*H-{Z?p=8MIIYN>sEsl5r#VHlu*(zs`O9ZJWd5={YHZ8RWVRu3o1UNr&k`K8 z{rL;1sjdjsa@~2TIjzwhk3QN7>v})ITGGC$s_hHhYpW51;zrpaW}1f$RST| z4Netl;K2W()9)U3(T6tevhywjBI{wPNhs8>2W?}sC72=RYE}f*0&sA=)+x&kFN9A8+b3f`+HL>SLQk$SY z1PMBJX|da~*;fFy)vY?@1$a7S0F*7Ry=x;|+ zgqS~63UHS*6Qrt^FcF|%3VXSI4U^IIK3a@$;$}^b!CrNjY9PgjocEU0JGobR5|PuF zOu6l-E`&knbLkNR9G{*fBxWa&=R}KFg+*25?|iQ8&AzdGLu_eLI=2J34%L!8Cf;~$ z1N6Ch#RJdtE2q{;$>Q`ZZ|)D&9>6-_1UlASbY?DXr!{5BJNt@4(o{E3p!?XcXq2+A z8z;oMWHHJdMTh&I*k?n^@{YxP(ZB!J+a1^R^9$|2tPMZse{g$w zoK2E@rA1q1LApBL4Y=&yiEoMzr^?C|nowN{wV~&r^67@%GujgOBxN8pR_I{UlxtjnB`^pOg2v tYgo&q21yEeedAFizcPdE`kCrcIfocLW*