UseDelay + ItemCooldown merge (#22502)
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
using Content.Shared.Mech;
|
||||
using Content.Shared.Mech.Equipment.Components;
|
||||
using Content.Shared.Mech.Equipment.Systems;
|
||||
using Content.Shared.Timing;
|
||||
using Robust.Shared.Audio;
|
||||
using System.Linq;
|
||||
using Content.Shared.Mech.Equipment.Components;
|
||||
using Content.Shared.Timing;
|
||||
using Robust.Shared.Audio.Systems;
|
||||
|
||||
namespace Content.Shared.Mech.Equipment.Systems;
|
||||
@@ -47,12 +44,11 @@ public sealed class MechSoundboardSystem : EntitySystem
|
||||
if (msg.Sound >= comp.Sounds.Count)
|
||||
return;
|
||||
|
||||
if (_useDelay.ActiveDelay(uid))
|
||||
if (TryComp(uid, out UseDelayComponent? useDelay)
|
||||
&& !_useDelay.TryResetDelay((uid, useDelay), true))
|
||||
return;
|
||||
|
||||
// honk!!!!!
|
||||
var mech = equipment.EquipmentOwner.Value;
|
||||
_useDelay.BeginDelay(uid);
|
||||
_audio.PlayPvs(comp.Sounds[msg.Sound], uid);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user