Added pricegun sound (#34119)

added pricegun sound

Co-authored-by: dylanhunter <dylan2.whittingham@live.uwe.ac.uk>
This commit is contained in:
Dylan Hunter Whittingham
2025-01-02 16:46:13 +00:00
committed by GitHub
parent 1a5be80d04
commit 39ee853801
6 changed files with 29 additions and 10 deletions

View File

@@ -1,3 +1,4 @@
using Content.Shared.Cargo.Components;
using Content.Shared.Timing;
using Content.Shared.Cargo.Systems;
@@ -10,9 +11,9 @@ public sealed class ClientPriceGunSystem : SharedPriceGunSystem
{
[Dependency] private readonly UseDelaySystem _useDelay = default!;
protected override bool GetPriceOrBounty(EntityUid priceGunUid, EntityUid target, EntityUid user)
protected override bool GetPriceOrBounty(Entity<PriceGunComponent> entity, EntityUid target, EntityUid user)
{
if (!TryComp(priceGunUid, out UseDelayComponent? useDelay) || _useDelay.IsDelayed((priceGunUid, useDelay)))
if (!TryComp(entity, out UseDelayComponent? useDelay) || _useDelay.IsDelayed((entity, useDelay)))
return false;
// It feels worse if the cooldown is predicted but the popup isn't! So only do the cooldown reset on the server.