From b2b3b22a041879529e89898689eb5b8d967d6e39 Mon Sep 17 00:00:00 2001 From: themias <89101928+themias@users.noreply.github.com> Date: Sat, 4 Jan 2025 08:41:45 -0500 Subject: [PATCH] Apply forensics when loading with an ammo box (#32280) --- .../Weapons/Ranged/Systems/SharedGunSystem.Ballistic.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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();