Gun cleanup (#18682)

This commit is contained in:
metalgearsloth
2023-08-05 12:49:27 +10:00
committed by GitHub
parent 7b71933165
commit a5ed3af5b1
7 changed files with 16 additions and 20 deletions

View File

@@ -50,7 +50,7 @@ public abstract partial class SharedGunSystem
Audio.PlayPredicted(component.SoundInsert, uid, args.User);
args.Handled = true;
UpdateBallisticAppearance(uid, component);
Dirty(component);
Dirty(uid, component);
}
private void OnBallisticAfterInteract(EntityUid uid, BallisticAmmoProviderComponent component, AfterInteractEvent args)
@@ -161,7 +161,7 @@ public abstract partial class SharedGunSystem
gunComp.NextFire = Timing.CurTime + TimeSpan.FromSeconds(1 / gunComp.FireRate);
}
Dirty(component);
Dirty(uid, component);
Audio.PlayPredicted(component.SoundRack, uid, user);
var shots = GetBallisticShots(component);
@@ -190,7 +190,7 @@ public abstract partial class SharedGunSystem
if (component.FillProto != null)
{
component.UnspawnedCount = Math.Max(0, component.Capacity - component.Container.ContainedEntities.Count);
Dirty(component);
Dirty(uid, component);
}
}
@@ -252,7 +252,7 @@ public abstract partial class SharedGunSystem
}
UpdateBallisticAppearance(uid, component);
Dirty(component);
Dirty(uid, component);
}
private void OnBallisticAmmoCount(EntityUid uid, BallisticAmmoProviderComponent component, ref GetAmmoCountEvent args)