From: Nemanja <98561806+EmoGarbage404@users.noreply.github.com> Date: Mon, 2 Sep 2024 04:33:25 +0000 (-0400) Subject: Roundstart Grappling Gun (#31737) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=f710b345733d014364e143c0169089b47748e939;p=space-station-14.git Roundstart Grappling Gun (#31737) Roundstart grappling hook --- 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 035cae01a2..b42d247e5b 100644 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 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 e72bc2ceb7..1f5f2a3d08 100644 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 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 43cec357c2..b49e018656 100644 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 diff --git a/Resources/Textures/Objects/Weapons/Guns/Launchers/grappling_gun.rsi/hook.png b/Resources/Textures/Objects/Weapons/Guns/Launchers/grappling_gun.rsi/hook.png index a7dc185ce8..0b79c8618b 100644 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 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 b678adc868..d17dd07e48 100644 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 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 38069830b5..afbddd8d19 100644 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 diff --git a/Resources/Textures/Objects/Weapons/Guns/Launchers/grappling_gun.rsi/meta.json b/Resources/Textures/Objects/Weapons/Guns/Launchers/grappling_gun.rsi/meta.json index d0ad0d0874..0de49fca27 100644 --- a/Resources/Textures/Objects/Weapons/Guns/Launchers/grappling_gun.rsi/meta.json +++ b/Resources/Textures/Objects/Weapons/Guns/Launchers/grappling_gun.rsi/meta.json @@ -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