Roundstart Grappling Gun (#31737)

This commit is contained in:
Nemanja
2024-09-02 14:33:25 +10:00
committed by Spatison
parent eeff28540d
commit 7d3faf96ca
15 changed files with 11 additions and 14 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

@@ -129,7 +129,7 @@ public sealed class FishingSystem : SharedFishingSystem
visuals.Sprite = component.RopeSprite;
visuals.OffsetA = component.RopeLureOffset;
visuals.OffsetB = component.RopeUserOffset;
visuals.Target = uid;
visuals.Target = GetNetEntity(uid);
}
protected override void ThrowFishReward(EntProtoId fishId, EntityUid fishSpot, EntityUid target)

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,7 +8,7 @@
FlashlightLantern: 2
HandheldGPSBasic: 2
RadioHandheld: 2
# WeaponGrapplingGun: 4
# WeaponGrapplingGun: 2
WeaponProtoKineticAccelerator: 4
# WD EDIT START
contrabandInventory:

View File

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

View File

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

View File

@@ -11,9 +11,8 @@
cost: 7500
recipeUnlocks:
- MiningDrill
# - WeaponGrapplingGun
- BorgModuleMining
# - BorgModuleGrapplingGun
# - BorgModuleGrapplingGun
- MechEquipmentDrill # Goobstation
- OreProcessorIndustrialMachineCircuitboard
- ClothingMaskWeldingGas

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