UseDelay + ItemCooldown merge (#22502)
This commit is contained in:
@@ -8,7 +8,6 @@ using Content.Shared.Inventory.Events;
|
||||
using Content.Shared.Ninja.Components;
|
||||
using Content.Shared.Popups;
|
||||
using Content.Shared.Research.Components;
|
||||
using Content.Shared.Timing;
|
||||
using Content.Shared.Toggleable;
|
||||
using Robust.Shared.Timing;
|
||||
|
||||
@@ -24,7 +23,6 @@ public abstract class SharedNinjaGlovesSystem : EntitySystem
|
||||
[Dependency] private readonly SharedCombatModeSystem _combatMode = default!;
|
||||
[Dependency] protected readonly SharedInteractionSystem Interaction = default!;
|
||||
[Dependency] protected readonly SharedPopupSystem Popup = default!;
|
||||
[Dependency] private readonly UseDelaySystem _useDelay = default!;
|
||||
[Dependency] private readonly ActionContainerSystem _actionContainer = default!;
|
||||
|
||||
public override void Initialize()
|
||||
@@ -110,7 +108,6 @@ public abstract class SharedNinjaGlovesSystem : EntitySystem
|
||||
target = args.Target;
|
||||
return _timing.IsFirstTimePredicted
|
||||
&& !_combatMode.IsInCombatMode(uid)
|
||||
&& !_useDelay.ActiveDelay(uid)
|
||||
&& TryComp<HandsComponent>(uid, out var hands)
|
||||
&& hands.ActiveHandEntity == null
|
||||
&& Interaction.InRangeUnobstructed(uid, target);
|
||||
|
||||
@@ -15,7 +15,7 @@ public abstract class SharedNinjaSuitSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly SharedAudioSystem _audio = default!;
|
||||
[Dependency] private readonly SharedNinjaGlovesSystem _gloves = default!;
|
||||
[Dependency] protected readonly SharedSpaceNinjaSystem _ninja = default!;
|
||||
[Dependency] private readonly SharedSpaceNinjaSystem _ninja = default!;
|
||||
[Dependency] protected readonly StealthClothingSystem StealthClothing = default!;
|
||||
[Dependency] protected readonly UseDelaySystem UseDelay = default!;
|
||||
[Dependency] private readonly ActionContainerSystem _actionContainer = default!;
|
||||
@@ -112,8 +112,8 @@ public abstract class SharedNinjaSuitSystem : EntitySystem
|
||||
_audio.PlayPredicted(comp.RevealSound, uid, user);
|
||||
// all abilities check for a usedelay on the ninja
|
||||
var useDelay = EnsureComp<UseDelayComponent>(user);
|
||||
useDelay.Delay = comp.DisableTime;
|
||||
UseDelay.BeginDelay(user, useDelay);
|
||||
UseDelay.SetDelay((user, useDelay), comp.DisableTime);
|
||||
UseDelay.TryResetDelay((user, useDelay));
|
||||
}
|
||||
|
||||
// TODO: modify PowerCellDrain
|
||||
|
||||
Reference in New Issue
Block a user