Merge remote-tracking branch 'origin/master' into weapon-modules

# Conflicts:
#	Resources/Prototypes/Recipes/Lathes/security.yml
This commit is contained in:
CaYpeN1
2024-03-21 11:01:20 +05:00
389 changed files with 3471 additions and 1231 deletions

View File

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

View File

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

View File

@@ -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;
}

View File

@@ -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>