UseDelay + ItemCooldown merge (#22502)
This commit is contained in:
@@ -3,7 +3,6 @@ using Content.Server.Xenoarchaeology.Equipment.Components;
|
||||
using Content.Server.Xenoarchaeology.XenoArtifacts;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Shared.Timing;
|
||||
using Robust.Shared.Player;
|
||||
|
||||
namespace Content.Server.Xenoarchaeology.Equipment.Systems;
|
||||
|
||||
@@ -31,7 +30,11 @@ public sealed class NodeScannerSystem : EntitySystem
|
||||
args.Handled = true;
|
||||
|
||||
var target = args.Target.Value;
|
||||
_useDelay.BeginDelay(uid);
|
||||
|
||||
if (TryComp(uid, out UseDelayComponent? useDelay)
|
||||
&& !_useDelay.TryResetDelay((uid, useDelay), true))
|
||||
return;
|
||||
|
||||
_popupSystem.PopupEntity(Loc.GetString("node-scan-popup",
|
||||
("id", $"{artifact.CurrentNodeId}")), target);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user