Wizard Staff of Animation (#34649)
This commit is contained in:
@@ -88,6 +88,7 @@ namespace Content.Client.Actions
|
||||
return;
|
||||
|
||||
component.Whitelist = state.Whitelist;
|
||||
component.Blacklist = state.Blacklist;
|
||||
component.CanTargetSelf = state.CanTargetSelf;
|
||||
BaseHandleState<EntityTargetActionComponent>(uid, component, state);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Content.Shared.Magic;
|
||||
using Content.Shared.Magic;
|
||||
using Content.Shared.Magic.Events;
|
||||
|
||||
namespace Content.Client.Magic;
|
||||
|
||||
@@ -32,6 +32,11 @@ public sealed class TargetOutlineSystem : EntitySystem
|
||||
/// </summary>
|
||||
public EntityWhitelist? Whitelist = null;
|
||||
|
||||
/// <summary>
|
||||
/// Blacklist that the target must satisfy.
|
||||
/// </summary>
|
||||
public EntityWhitelist? Blacklist = null;
|
||||
|
||||
/// <summary>
|
||||
/// Predicate the target must satisfy.
|
||||
/// </summary>
|
||||
@@ -93,15 +98,16 @@ public sealed class TargetOutlineSystem : EntitySystem
|
||||
RemoveHighlights();
|
||||
}
|
||||
|
||||
public void Enable(float range, bool checkObstructions, Func<EntityUid, bool>? predicate, EntityWhitelist? whitelist, CancellableEntityEventArgs? validationEvent)
|
||||
public void Enable(float range, bool checkObstructions, Func<EntityUid, bool>? predicate, EntityWhitelist? whitelist, EntityWhitelist? blacklist, CancellableEntityEventArgs? validationEvent)
|
||||
{
|
||||
Range = range;
|
||||
CheckObstruction = checkObstructions;
|
||||
Predicate = predicate;
|
||||
Whitelist = whitelist;
|
||||
Blacklist = blacklist;
|
||||
ValidationEvent = validationEvent;
|
||||
|
||||
_enabled = Predicate != null || Whitelist != null || ValidationEvent != null;
|
||||
_enabled = Predicate != null || Whitelist != null || Blacklist != null || ValidationEvent != null;
|
||||
}
|
||||
|
||||
public override void Update(float frameTime)
|
||||
|
||||
@@ -952,7 +952,7 @@ public sealed class ActionUIController : UIController, IOnStateChanged<GameplayS
|
||||
var range = entityAction.CheckCanAccess ? action.Range : -1;
|
||||
|
||||
_interactionOutline?.SetEnabled(false);
|
||||
_targetOutline?.Enable(range, entityAction.CheckCanAccess, predicate, entityAction.Whitelist, null);
|
||||
_targetOutline?.Enable(range, entityAction.CheckCanAccess, predicate, entityAction.Whitelist, entityAction.Blacklist, null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user