Merge remote-tracking branch 'origin/master' into weapon-modules
# Conflicts: # Resources/Prototypes/Recipes/Lathes/security.yml
This commit is contained in:
@@ -22,6 +22,7 @@ using Content.Shared.Weapons.Ranged.Components;
|
||||
using Content.Shared.Weapons.Ranged.Events;
|
||||
using Content.Shared.Weapons.Ranged.Systems;
|
||||
using Content.Shared._White;
|
||||
using Content.Shared._White.MagGloves;
|
||||
using Content.Shared._White.Chaplain;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Audio.Systems;
|
||||
|
||||
@@ -235,6 +235,9 @@ public sealed partial class GunComponent : Component
|
||||
public bool ClumsyProof = false;
|
||||
|
||||
// WD START
|
||||
|
||||
public EntityUid? Target;
|
||||
|
||||
[DataField("forceThrowingAngle")]
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public bool ForceThrowingAngle;
|
||||
|
||||
@@ -9,6 +9,7 @@ namespace Content.Shared.Weapons.Ranged.Events;
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class RequestShootEvent : EntityEventArgs
|
||||
{
|
||||
public NetEntity? Target;
|
||||
public NetEntity Gun;
|
||||
public NetCoordinates Coordinates;
|
||||
}
|
||||
|
||||
@@ -144,6 +144,7 @@ public abstract partial class SharedGunSystem : EntitySystem
|
||||
return;
|
||||
|
||||
gun.ShootCoordinates = GetCoordinates(msg.Coordinates);
|
||||
gun.Target = GetEntity(msg.Target);
|
||||
Log.Debug($"Set shoot coordinates to {gun.ShootCoordinates}");
|
||||
AttemptShoot(user.Value, ent, gun);
|
||||
}
|
||||
@@ -591,6 +592,12 @@ public abstract partial class SharedGunSystem : EntitySystem
|
||||
[ByRefEvent]
|
||||
public record struct AttemptShootEvent(EntityUid User, string? Message, bool Cancelled = false, bool ThrowItems = false);
|
||||
|
||||
/// <summary>
|
||||
/// Raised when an entity is just about to be hit with a hitscan
|
||||
/// </summary>
|
||||
[ByRefEvent]
|
||||
public record struct HitscanHitAttemptEvent(EntityUid HitEntity, EntityUid? Target, bool Cancelled = false);
|
||||
|
||||
/// <summary>
|
||||
/// Raised directed on the gun after firing.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user