Roundstart Grappling Gun (#31737)

Roundstart grappling hook
This commit is contained in:
Nemanja
2024-09-02 00:33:25 -04:00
committed by GitHub
parent 7b82317b67
commit f710b34573
15 changed files with 9 additions and 12 deletions

View 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;

View 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.

View 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);
}

View File

@@ -8,4 +8,5 @@
FlashlightLantern: 2
HandheldGPSBasic: 2
RadioHandheld: 2
WeaponGrapplingGun: 2
WeaponProtoKineticAccelerator: 4

View File

@@ -202,6 +202,7 @@
weight: 0.5
- id: OxygenTankFilled
- id: WelderIndustrial
- id: WeaponGrapplingGun
- !type:GroupSelector
children:
- id: ClothingHeadHatWelding

View File

@@ -263,7 +263,6 @@
- state: base
- state: base-unshaded
map: [ "unshaded" ]
shader: unshaded
visible: true
- type: UseDelay
delay: 1.5

View File

@@ -336,7 +336,6 @@
- WeaponLaserSvalinn
- WeaponProtoKineticAccelerator
- WeaponTetherGun
- WeaponGrapplingGun
- ClothingBackpackHolding
- ClothingBackpackSatchelHolding
- ClothingBackpackDuffelHolding

View File

@@ -11,7 +11,6 @@
cost: 7500
recipeUnlocks:
- MiningDrill
- WeaponGrapplingGun
- BorgModuleMining
- BorgModuleGrapplingGun
- OreProcessorIndustrialMachineCircuitboard

Binary file not shown.

Before

Width:  |  Height:  |  Size: 545 B

After

Width:  |  Height:  |  Size: 484 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 544 B

After

Width:  |  Height:  |  Size: 632 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 916 B

After

Width:  |  Height:  |  Size: 944 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 708 B

After

Width:  |  Height:  |  Size: 737 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 820 B

After

Width:  |  Height:  |  Size: 789 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 824 B

After

Width:  |  Height:  |  Size: 786 B

View 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