]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Apply forensics when loading with an ammo box (#32280)
authorthemias <89101928+themias@users.noreply.github.com>
Sat, 4 Jan 2025 13:41:45 +0000 (08:41 -0500)
committerGitHub <noreply@github.com>
Sat, 4 Jan 2025 13:41:45 +0000 (14:41 +0100)
Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Ballistic.cs

index 044f75dbc909e55810bb34fc489be239110c6018..f92c5ed3a2f0d13379611f5806f4e696766fda3a 100644 (file)
@@ -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();