From: themias <89101928+themias@users.noreply.github.com> Date: Sat, 4 Jan 2025 13:41:45 +0000 (-0500) Subject: Apply forensics when loading with an ammo box (#32280) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=b2b3b22a041879529e89898689eb5b8d967d6e39;p=space-station-14.git Apply forensics when loading with an ammo box (#32280) --- diff --git a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Ballistic.cs b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Ballistic.cs index 044f75dbc9..f92c5ed3a2 100644 --- a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Ballistic.cs +++ b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Ballistic.cs @@ -14,6 +14,7 @@ namespace Content.Shared.Weapons.Ranged.Systems; public abstract partial class SharedGunSystem { [Dependency] private readonly SharedDoAfterSystem _doAfter = default!; + [Dependency] private readonly SharedInteractionSystem _interaction = default!; protected virtual void InitializeBallistic() @@ -117,8 +118,8 @@ public abstract partial class SharedGunSystem void SimulateInsertAmmo(EntityUid ammo, EntityUid ammoProvider, EntityCoordinates coordinates) { - var evInsert = new InteractUsingEvent(args.User, ammo, ammoProvider, coordinates); - RaiseLocalEvent(ammoProvider, evInsert); + // We call SharedInteractionSystem to raise contact events. Checks are already done by this point. + _interaction.InteractUsing(args.User, ammo, ammoProvider, coordinates, checkCanInteract: false, checkCanUse: false); } List<(EntityUid? Entity, IShootable Shootable)> ammo = new();