From f710b345733d014364e143c0169089b47748e939 Mon Sep 17 00:00:00 2001 From: Nemanja <98561806+EmoGarbage404@users.noreply.github.com> Date: Mon, 2 Sep 2024 00:33:25 -0400 Subject: [PATCH] Roundstart Grappling Gun (#31737) Roundstart grappling hook --- Content.Client/Physics/JointVisualsOverlay.cs | 10 ++++------ Content.Shared/Physics/JointVisualsComponent.cs | 2 +- .../Weapons/Misc/SharedGrapplingGunSystem.cs | 2 +- .../VendingMachines/Inventories/salvage.yml | 1 + .../Spawners/Random/Salvage/tables_loot.yml | 1 + .../Weapons/Guns/Launchers/launchers.yml | 1 - .../Entities/Structures/Machines/lathe.yml | 1 - Resources/Prototypes/Research/industrial.yml | 1 - .../grappling_gun.rsi/base-unshaded-off.png | Bin 545 -> 484 bytes .../grappling_gun.rsi/base-unshaded.png | Bin 544 -> 632 bytes .../Guns/Launchers/grappling_gun.rsi/base.png | Bin 916 -> 944 bytes .../Guns/Launchers/grappling_gun.rsi/hook.png | Bin 708 -> 737 bytes .../Launchers/grappling_gun.rsi/inhand-left.png | Bin 820 -> 789 bytes .../grappling_gun.rsi/inhand-right.png | Bin 824 -> 786 bytes .../Guns/Launchers/grappling_gun.rsi/meta.json | 2 +- 15 files changed, 9 insertions(+), 12 deletions(-) diff --git a/Content.Client/Physics/JointVisualsOverlay.cs b/Content.Client/Physics/JointVisualsOverlay.cs index e0b3499a97..9cc2831d21 100644 --- a/Content.Client/Physics/JointVisualsOverlay.cs +++ b/Content.Client/Physics/JointVisualsOverlay.cs @@ -1,9 +1,8 @@ +using System.Numerics; using Content.Shared.Physics; using Robust.Client.GameObjects; using Robust.Client.Graphics; using Robust.Shared.Enums; -using Robust.Shared.Physics; -using Robust.Shared.Physics.Dynamics.Joints; namespace Content.Client.Physics; @@ -16,8 +15,6 @@ public sealed class JointVisualsOverlay : Overlay private IEntityManager _entManager; - private HashSet _drawn = new(); - public JointVisualsOverlay(IEntityManager entManager) { _entManager = entManager; @@ -25,7 +22,6 @@ public sealed class JointVisualsOverlay : Overlay protected override void Draw(in OverlayDrawArgs args) { - _drawn.Clear(); var worldHandle = args.WorldHandle; var spriteSystem = _entManager.System(); @@ -33,12 +29,14 @@ public sealed class JointVisualsOverlay : Overlay var joints = _entManager.EntityQueryEnumerator(); var xformQuery = _entManager.GetEntityQuery(); + args.DrawingHandle.SetTransform(Matrix3x2.Identity); + while (joints.MoveNext(out var visuals, out var xform)) { if (xform.MapID != args.MapId) continue; - var other = visuals.Target; + var other = _entManager.GetEntity(visuals.Target); if (!xformQuery.TryGetComponent(other, out var otherXform)) continue; diff --git a/Content.Shared/Physics/JointVisualsComponent.cs b/Content.Shared/Physics/JointVisualsComponent.cs index 4fcf5ca79f..37a9cdc3b1 100644 --- a/Content.Shared/Physics/JointVisualsComponent.cs +++ b/Content.Shared/Physics/JointVisualsComponent.cs @@ -14,7 +14,7 @@ public sealed partial class JointVisualsComponent : Component public SpriteSpecifier Sprite = default!; [ViewVariables(VVAccess.ReadWrite), DataField("target"), AutoNetworkedField] - public EntityUid? Target; + public NetEntity? Target; /// /// Offset from Body A. diff --git a/Content.Shared/Weapons/Misc/SharedGrapplingGunSystem.cs b/Content.Shared/Weapons/Misc/SharedGrapplingGunSystem.cs index 75d5300fdb..d2f0333b83 100644 --- a/Content.Shared/Weapons/Misc/SharedGrapplingGunSystem.cs +++ b/Content.Shared/Weapons/Misc/SharedGrapplingGunSystem.cs @@ -64,7 +64,7 @@ public abstract class SharedGrapplingGunSystem : EntitySystem var visuals = EnsureComp(shotUid.Value); visuals.Sprite = component.RopeSprite; visuals.OffsetA = new Vector2(0f, 0.5f); - visuals.Target = uid; + visuals.Target = GetNetEntity(uid); Dirty(shotUid.Value, visuals); } diff --git a/Resources/Prototypes/Catalog/VendingMachines/Inventories/salvage.yml b/Resources/Prototypes/Catalog/VendingMachines/Inventories/salvage.yml index b7e5e9ffcb..9e5549e249 100644 --- a/Resources/Prototypes/Catalog/VendingMachines/Inventories/salvage.yml +++ b/Resources/Prototypes/Catalog/VendingMachines/Inventories/salvage.yml @@ -8,4 +8,5 @@ FlashlightLantern: 2 HandheldGPSBasic: 2 RadioHandheld: 2 + WeaponGrapplingGun: 2 WeaponProtoKineticAccelerator: 4 diff --git a/Resources/Prototypes/Entities/Markers/Spawners/Random/Salvage/tables_loot.yml b/Resources/Prototypes/Entities/Markers/Spawners/Random/Salvage/tables_loot.yml index 9bdaed0b93..78c338fcb5 100644 --- a/Resources/Prototypes/Entities/Markers/Spawners/Random/Salvage/tables_loot.yml +++ b/Resources/Prototypes/Entities/Markers/Spawners/Random/Salvage/tables_loot.yml @@ -202,6 +202,7 @@ weight: 0.5 - id: OxygenTankFilled - id: WelderIndustrial + - id: WeaponGrapplingGun - !type:GroupSelector children: - id: ClothingHeadHatWelding diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Launchers/launchers.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Launchers/launchers.yml index 5ea853cd8d..63029ffba9 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Launchers/launchers.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Launchers/launchers.yml @@ -263,7 +263,6 @@ - state: base - state: base-unshaded map: [ "unshaded" ] - shader: unshaded visible: true - type: UseDelay delay: 1.5 diff --git a/Resources/Prototypes/Entities/Structures/Machines/lathe.yml b/Resources/Prototypes/Entities/Structures/Machines/lathe.yml index 130a0ca5e7..d1d3088113 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/lathe.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/lathe.yml @@ -336,7 +336,6 @@ - WeaponLaserSvalinn - WeaponProtoKineticAccelerator - WeaponTetherGun - - WeaponGrapplingGun - ClothingBackpackHolding - ClothingBackpackSatchelHolding - ClothingBackpackDuffelHolding diff --git a/Resources/Prototypes/Research/industrial.yml b/Resources/Prototypes/Research/industrial.yml index 5d6af070b7..8e11f661a8 100644 --- a/Resources/Prototypes/Research/industrial.yml +++ b/Resources/Prototypes/Research/industrial.yml @@ -11,7 +11,6 @@ cost: 7500 recipeUnlocks: - MiningDrill - - WeaponGrapplingGun - BorgModuleMining - BorgModuleGrapplingGun - OreProcessorIndustrialMachineCircuitboard diff --git a/Resources/Textures/Objects/Weapons/Guns/Launchers/grappling_gun.rsi/base-unshaded-off.png b/Resources/Textures/Objects/Weapons/Guns/Launchers/grappling_gun.rsi/base-unshaded-off.png index 035cae01a2264ed042f1d6f21b216a5523b53686..b42d247e5bef83f8c90e543add3b50378aee147b 100644 GIT binary patch delta 55 zcmZ3;@`QQARz`g(PZ!6Kh}O3U85tQE7@8FRug~*v05RXQ2`Dfyx-%~50CE^SUHx3v IIVCg!0Nl?Hx&QzG delta 116 zcmaFDypUzXR>mA#PZ!6Kh}Pr;3D(64B0Wuk1|kO}WjFut&$az``B08pl1L{vm*Jk8 z|9xWL`hl`sZU;4>N*mc3=2x&!&-wInE&~GtUuuMBny)W|7Ld&W#2|1fcru9cboFyt I=akR{0L$qnZvX%Q diff --git a/Resources/Textures/Objects/Weapons/Guns/Launchers/grappling_gun.rsi/base-unshaded.png b/Resources/Textures/Objects/Weapons/Guns/Launchers/grappling_gun.rsi/base-unshaded.png index e72bc2ceb7b110882fbb7356692d64abe8d17437..1f5f2a3d0822ebca5498b2e9cee9342d3d2668e5 100644 GIT binary patch delta 205 zcmV;;05boe1o#B7v;lvwNklEeICm;n!gY7Ged0T?kr+O^98X zL!#Nhdd!y%zLV%-#+d;&o6WyNM2(2r?ETJR!h4UI2^Iq(gsF+guf=1GHvkO)j4=Sv z-gmqZQFG3w&{Ie$jTG1u001fFIJ1qxT02F0S4u$$0j)Kc{EM?8 zE~#M25YGk(EJ)xuKsIK-XB97{@QZf?%f!2ZW#XI7<`O&sc(rBEObK^B00000NkvXX Hu0mjf`o~xV delta 116 zcmeytvVdj77RDS~PZ!6Kh}Pr;3D(64B0Wuk1|kh#C++y}*IxYp@}V5HB$17$KO6t4 z`7u%KTR%{i%k7{BRB0nS!=lCP8@z7rT*kn_z?T}~nda-upao=e05J$$3Z4w2JYD@< J);T3K0RYL1DVzWR diff --git a/Resources/Textures/Objects/Weapons/Guns/Launchers/grappling_gun.rsi/base.png b/Resources/Textures/Objects/Weapons/Guns/Launchers/grappling_gun.rsi/base.png index 43cec357c240bd5aed99fd098711dc148cc6a15e..b49e018656a0848786de02f1f64182a9c29cc5e8 100644 GIT binary patch delta 519 zcmV+i0{H!u2e1dQv;lwTNklEV0(EnMNF>72$8~uQG#vvZCZ`%!4~JS%H}ARJLvJ{&+|(?I z$th(U&RBzBDD=Gl`ZX$*3WZ#b`0F=x_`JkoF#>^rjE~dgx9{kwG51wk?b{?Q_ zC`x?ht*tpg+u?yi(ZJ_D4?xK%^I%~A7#s01HsX`(5-;xAsuOdlwZK|^-8fsWGI|qI z**^e0n_krbUOwzL7uMiY@(UdoJW6$nW;HJq4R&({nZSSD-roSk7E7|4{RIB8`}Z7O z?P~q7op*i*8quzq4bA5^FM2=YW9t9_002ov JPDHLkV1mjA1gii5 delta 491 zcmVbAYX!I`8$$OT&_vO9! z`SAU|?}3Yp%X_EI?!wubZ=xB&!s7C?jt)DUB$6@luk)OdPg8%64k`#zv3lfsmz zcF&rYLtP7$ctpfTzgPhPj(3)7%5Roi(+ygcLtP63K5t`<+~hSxjd;|8YV6+kR}D}t zJxQ-PKGjaCX@RC2ME@V5s&A=$Ccs0lMZj0A9=o`>xV$O%IY5|!mr!X40000EWmrjO hO-%qQ00008000000002eQps-v;lts7fD1xR9J=Wl`(3>Fc3xmhSaWA`2u@^CG9o?F4csT$_1jz zXK-PB0D;dTAH!F0AyjRlK1?bZhivfL+7J@-D>2gOKg|pXNYG35#OKqIQ|@?3Nxp|N zKnBPF86X2>fWHlJc`pC}M3nR;?-CL5IF5Wi9eEfA-V1S;7EFKBv^)24?ZEP7*4o2z z&wG#O*EfU^Hsx&+5wUZQjWJ)!Ohnwa?bWz3hMjY(ty!&rwf3Nt;=b==h-3U3EC5I; zQB@U`Qme0D1z198ts$lS1hO=bdu3VPWDWqEdP79qG!4A>^WcRLP!z>%EQCN^*Ejcl z^Kis6Ypo%KnBymN7$4&+yiv$Fn;J^-zEgve8T%v1mX002ov JPDHLkV1iBSk1+rM delta 282 zcmV+#0p1 zPiz}fx@?_S`B>4y%!t+8CWJ6|4w*{=2ED(%wAbgyX7RYO6#s=BzyTb<0UW>qOaLFl z9RMjM^^d3qNGY`#BLFc*HN>qJpw`MbjsWcYPOVktW6r?+!;^ohey|jaNSo)GZQEGa zRpr%v10vEyqydBwIIrik->N$UA%xG_e`zElZCMsdDP4ZuH;{84j^nuQr)j!|v6Mp2 zxoZ@v5dPF8gwWkw4FG%#ou;`7;H>jV{#}-5*yVBoTmagqKkB#&1rGoK01jnXNoGw= g04e|g00;m8000sI007cclK=n!07*qoM6N<$f?|An%m4rY diff --git a/Resources/Textures/Objects/Weapons/Guns/Launchers/grappling_gun.rsi/inhand-left.png b/Resources/Textures/Objects/Weapons/Guns/Launchers/grappling_gun.rsi/inhand-left.png index b678adc86841638e799384b906f6e595c2ea4c83..d17dd07e4838bb7f6d11e84ae3eaeb38fd6cfd2e 100644 GIT binary patch delta 362 zcmdnOHkEC|R>pd7PZ!6KiaBp@*?S*$kYM|;TuFpo^Ok;~21}7Q_e`(rB2L>DyP_XmqPp?B7 z)3mA&X^5QPknQ#fDzW%vBk&o^gU|Lf@9yngzep4z~}jUw@7u^g-4UoB9Wyz&3WJiFPaz86cs z-JUqT`{FHuu=)Dpi{-1MOMm*F`qvP9-pK_CTw&^cCvZj6HRRzY=MC?(Rx~}=wzRi( z6i8xWP~iVwE<64C^iqyj1#%97T?`F6z6|Y(BGdQp*>&voY2&JP_KGe3vJdt;7t~xi ze0J^a1KBsXi3GZ8TeGAt?XZfvt(ful0nn;1>-RDitL(j#)X}<%0SG)@{an^LB{Ts5 D>t~^W delta 394 zcmbQrwuNoOR>t}OPZ!6KiaBp@ZOl64Aj9@SpS7G*_MD@Pwdnl=s+(`97rbJ2ahc@4 zBCW&!;XU>fN_={p?n^AFpa zz&Qne!X0}KDf!7TRMb{Z+uiSfH=32fLaoiujrr%kzrT!s|C*40dh6vcdot%ueYLNl z`h9B$4AcV|Czy6wvAC@}etU{i$cr}u8T<=;HJw~z+ZXV@Wn3{$Da53dW8H4f?M6k< z<<8p7OuJuE^C_VG{rW?<_#7pE6v^su{Uf~Qtw6-?LZHuoU9V#Z{kcnWqBqY>1_lPc g)CkWsUtb0-Ae#e-LEuvGWDw=)>gTe~i7BB802BbI=Kufz diff --git a/Resources/Textures/Objects/Weapons/Guns/Launchers/grappling_gun.rsi/inhand-right.png b/Resources/Textures/Objects/Weapons/Guns/Launchers/grappling_gun.rsi/inhand-right.png index 38069830b50194e96256531941dcc963505e1841..afbddd8d19e4235068a2f699ed26fe572c4a401b 100644 GIT binary patch delta 359 zcmV-t0hs={29gG_wE=%fNklgM4=E!Htn{!jSyz%CKt#) zq>wA*5N_&D3c8gpWMte}5#}0-CwQ(>BCWR3v1#o8?Lub4dv6A^cn=^VA|fIpA|fIn zik0|5C~e2#f**tu#cKClqF9MBM#{46d=dO0l(Hg1zXNjMzHWE^~2oF)yfQH#<iLPbGk|z-n5fKp)5fKp)5fM4pxc~m2?9zXC;V%a^ zPJgqx>c0a(k!N23Ah+{t&p})(^_hiBKwg$lPQTx{0BNG+_3a&3H+SB`EIk17{P=*y zy>?!NgB{rTQUAT6Z37zz%XRXb1~!hu(f(P8h=^!!J^*92#-ZHv$^ifX002ovPDHLk FV1mtwsI~wA delta 398 zcmbQlwu5cMR>t}ePZ!6KiaBp@ZOl3pAj0;*p0)gBz`EuZzqwuc6P9jX;{V_ZyN95s z+`?IkcCFR&3f&evN(w}{f+oyxG)mh$S461SRBf5(-~Aui4q4hy-#v#}KoANNqL<0| zR()FkTH{d0rODe;mwhXmZnHr*c-35i*OkJx%cEZl{PL?0U-#U1#aw|*#Uo5WIj)ON zI|43dtXKH6VvZO0lRdWYrA6yn+^Sm(7CLoYyD0FD@y#s$Cf;q{{D=At3T#uq-@ULk z>Q39u=i+hk^HdmkV*CZ`THaoA7Rc#qTfp$~+5Prp)t|x6*Pk5!^83M_RhM4b-h95Y z{gM67sdk+mAW#n`J606zKYM@my99fM?&4?fU3WY?OrMCIZ z{m&Z7iH{e}{O|htd(R|p>3;t28(Vu%X+2`QF-`OMyA9X+v-8aF+5mk&^%46${aun@ ne;!h1U|`@&jqptK^<~fkvN?bl1TF