Skip to content

Commit

Permalink
Apply forensics when loading with an ammo box
Browse files Browse the repository at this point in the history
  • Loading branch information
themias committed Sep 18, 2024
1 parent 489938c commit 3311289
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -117,8 +118,8 @@ private void OnBallisticAmmoFillDoAfter(EntityUid uid, BallisticAmmoProviderComp

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();
Expand Down

0 comments on commit 3311289

Please sign in to comment.