]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Roundstart Grappling Gun (#31737)
authorNemanja <98561806+EmoGarbage404@users.noreply.github.com>
Mon, 2 Sep 2024 04:33:25 +0000 (00:33 -0400)
committerGitHub <noreply@github.com>
Mon, 2 Sep 2024 04:33:25 +0000 (22:33 -0600)
Roundstart grappling hook

15 files changed:
Content.Client/Physics/JointVisualsOverlay.cs
Content.Shared/Physics/JointVisualsComponent.cs
Content.Shared/Weapons/Misc/SharedGrapplingGunSystem.cs
Resources/Prototypes/Catalog/VendingMachines/Inventories/salvage.yml
Resources/Prototypes/Entities/Markers/Spawners/Random/Salvage/tables_loot.yml
Resources/Prototypes/Entities/Objects/Weapons/Guns/Launchers/launchers.yml
Resources/Prototypes/Entities/Structures/Machines/lathe.yml
Resources/Prototypes/Research/industrial.yml
Resources/Textures/Objects/Weapons/Guns/Launchers/grappling_gun.rsi/base-unshaded-off.png
Resources/Textures/Objects/Weapons/Guns/Launchers/grappling_gun.rsi/base-unshaded.png
Resources/Textures/Objects/Weapons/Guns/Launchers/grappling_gun.rsi/base.png
Resources/Textures/Objects/Weapons/Guns/Launchers/grappling_gun.rsi/hook.png
Resources/Textures/Objects/Weapons/Guns/Launchers/grappling_gun.rsi/inhand-left.png
Resources/Textures/Objects/Weapons/Guns/Launchers/grappling_gun.rsi/inhand-right.png
Resources/Textures/Objects/Weapons/Guns/Launchers/grappling_gun.rsi/meta.json

index e0b3499a974fccf4b801884b42026fd6bdb97e95..9cc2831d2128ac28eee8baece08819a7e51b1afa 100644 (file)
@@ -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<Joint> _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<SpriteSystem>();
@@ -33,12 +29,14 @@ public sealed class JointVisualsOverlay : Overlay
         var joints = _entManager.EntityQueryEnumerator<JointVisualsComponent, TransformComponent>();
         var xformQuery = _entManager.GetEntityQuery<TransformComponent>();
 
+        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;
index 4fcf5ca79f162d45098aca9ed7b9eaca02235b8e..37a9cdc3b1727c40bd24d53b64db120c71e0654a 100644 (file)
@@ -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;
 
     /// <summary>
     /// Offset from Body A.
index 75d5300fdb1bcea24fc5f43f88ac9051620241ff..d2f0333b8332d61809154600df871d0de3e9aaea 100644 (file)
@@ -64,7 +64,7 @@ public abstract class SharedGrapplingGunSystem : EntitySystem
             var visuals = EnsureComp<JointVisualsComponent>(shotUid.Value);
             visuals.Sprite = component.RopeSprite;
             visuals.OffsetA = new Vector2(0f, 0.5f);
-            visuals.Target = uid;
+            visuals.Target = GetNetEntity(uid);
             Dirty(shotUid.Value, visuals);
         }
 
index b7e5e9ffcb9280deb707ae4e878128c25f3d29eb..9e5549e249481dee4c5e86c59cf228f8e3d7427f 100644 (file)
@@ -8,4 +8,5 @@
     FlashlightLantern: 2
     HandheldGPSBasic: 2
     RadioHandheld: 2
+    WeaponGrapplingGun: 2
     WeaponProtoKineticAccelerator: 4
index 9bdaed0b936ec6de98adc6efbb56a73821c295d6..78c338fcb51afeae82fdfeec0f5e181adb0494c5 100644 (file)
       weight: 0.5
     - id: OxygenTankFilled
     - id: WelderIndustrial
+    - id: WeaponGrapplingGun
     - !type:GroupSelector
       children:
       - id: ClothingHeadHatWelding
index 5ea853cd8d141db55fa7e65ee8af39006c9d94d9..63029ffba9b5f9ca1b018b4be895ee424f24a703 100644 (file)
         - state: base
         - state: base-unshaded
           map: [ "unshaded" ]
-          shader: unshaded
           visible: true
     - type: UseDelay
       delay: 1.5
index 130a0ca5e7c3292a282f1b036d62eb8c58f193c5..d1d30881134b55f896ff97d1498100ab628f1bf8 100644 (file)
       - WeaponLaserSvalinn
       - WeaponProtoKineticAccelerator
       - WeaponTetherGun
-      - WeaponGrapplingGun
       - ClothingBackpackHolding
       - ClothingBackpackSatchelHolding
       - ClothingBackpackDuffelHolding
index 5d6af070b773f6e23597e5ada5f84fc4d5a18c85..8e11f661a84dde2536079542e97a82cd7a5442ef 100644 (file)
@@ -11,7 +11,6 @@
   cost: 7500
   recipeUnlocks:
   - MiningDrill
-  - WeaponGrapplingGun
   - BorgModuleMining
   - BorgModuleGrapplingGun
   - OreProcessorIndustrialMachineCircuitboard
index 035cae01a2264ed042f1d6f21b216a5523b53686..b42d247e5bef83f8c90e543add3b50378aee147b 100644 (file)
Binary files a/Resources/Textures/Objects/Weapons/Guns/Launchers/grappling_gun.rsi/base-unshaded-off.png and b/Resources/Textures/Objects/Weapons/Guns/Launchers/grappling_gun.rsi/base-unshaded-off.png differ
index e72bc2ceb7b110882fbb7356692d64abe8d17437..1f5f2a3d0822ebca5498b2e9cee9342d3d2668e5 100644 (file)
Binary files a/Resources/Textures/Objects/Weapons/Guns/Launchers/grappling_gun.rsi/base-unshaded.png and b/Resources/Textures/Objects/Weapons/Guns/Launchers/grappling_gun.rsi/base-unshaded.png differ
index 43cec357c240bd5aed99fd098711dc148cc6a15e..b49e018656a0848786de02f1f64182a9c29cc5e8 100644 (file)
Binary files a/Resources/Textures/Objects/Weapons/Guns/Launchers/grappling_gun.rsi/base.png and b/Resources/Textures/Objects/Weapons/Guns/Launchers/grappling_gun.rsi/base.png differ
index a7dc185ce84e3248a0cab1a38e9960221bb09b23..0b79c8618b8b1e8c07bc0714aa3aeeb94a92a9a5 100644 (file)
Binary files a/Resources/Textures/Objects/Weapons/Guns/Launchers/grappling_gun.rsi/hook.png and b/Resources/Textures/Objects/Weapons/Guns/Launchers/grappling_gun.rsi/hook.png differ
index b678adc86841638e799384b906f6e595c2ea4c83..d17dd07e4838bb7f6d11e84ae3eaeb38fd6cfd2e 100644 (file)
Binary files a/Resources/Textures/Objects/Weapons/Guns/Launchers/grappling_gun.rsi/inhand-left.png and b/Resources/Textures/Objects/Weapons/Guns/Launchers/grappling_gun.rsi/inhand-left.png differ
index 38069830b50194e96256531941dcc963505e1841..afbddd8d19e4235068a2f699ed26fe572c4a401b 100644 (file)
Binary files a/Resources/Textures/Objects/Weapons/Guns/Launchers/grappling_gun.rsi/inhand-right.png and b/Resources/Textures/Objects/Weapons/Guns/Launchers/grappling_gun.rsi/inhand-right.png differ
index d0ad0d08740f34033321d10da786490ee2934d9e..0de49fca278efd0b2611b08e14d1c618c3985091 100644 (file)
@@ -1,7 +1,7 @@
 {
     "version": 1,
     "license": "CC-BY-SA-3.0",
-    "copyright": "Sprited by discord emogarbage",
+    "copyright": "Taken from tgstation at commit https://github.com/tgstation/tgstation/commit/456cd10d94084c7c2574f628cf7ac9b67087ba26. Recolored, adjusted, and inhands created by EmoGarbage404",
     "size": {
         "x": 32,
         "y": 32