Misc replay related changes (#13250)

This commit is contained in:
Leon Friedrich
2023-01-08 07:04:09 +13:00
committed by GitHub
parent a9adab88e5
commit f1cb0ca37a
11 changed files with 93 additions and 9 deletions

View File

@@ -20,6 +20,7 @@ public sealed class SpraySystem : EntitySystem
{
[Dependency] private readonly IGameTiming _gameTiming = default!;
[Dependency] private readonly PopupSystem _popupSystem = default!;
[Dependency] private readonly SharedAudioSystem _audio = default!;
[Dependency] private readonly SolutionContainerSystem _solutionContainerSystem = default!;
[Dependency] private readonly VaporSystem _vaporSystem = default!;
@@ -118,7 +119,7 @@ public sealed class SpraySystem : EntitySystem
_vaporSystem.Start(vaporComponent, vaporXform, impulseDirection, component.SprayVelocity, target, component.SprayAliveTime, args.User);
}
SoundSystem.Play(component.SpraySound.GetSound(), Filter.Pvs(uid), uid, AudioHelpers.WithVariation(0.125f));
_audio.PlayPvs(component.SpraySound, uid, component.SpraySound.Params.WithVariation(0.125f));
RaiseLocalEvent(uid,
new RefreshItemCooldownEvent(curTime, curTime + TimeSpan.FromSeconds(component.CooldownTime)), true);