mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-10-07 23:07:26 +00:00
* Replaced uses of Dirty(Component) with Dirty(Uid, Component)
Modified some systems (notably pulling-related) to use uids.
* Missed a few
* Revert changes to pulling
* No
(cherry picked from commit 4a83c36585)
19 lines
538 B
C#
19 lines
538 B
C#
using Content.Shared.Weapons.Ranged.Components;
|
|
|
|
namespace Content.Server.Weapons.Ranged.Systems;
|
|
|
|
public sealed partial class GunSystem
|
|
{
|
|
protected override void SpinRevolver(EntityUid revolverUid, RevolverAmmoProviderComponent component, EntityUid? user = null)
|
|
{
|
|
base.SpinRevolver(revolverUid, component, user);
|
|
var index = Random.Next(component.Capacity);
|
|
|
|
if (component.CurrentIndex == index)
|
|
return;
|
|
|
|
component.CurrentIndex = index;
|
|
Dirty(revolverUid, component);
|
|
}
|
|
}
|