fix: fix non-access checking EntityTargetActions (#38731)

This commit is contained in:
Perry Fraser
2025-07-22 15:34:39 -04:00
committed by GitHub
parent f16175a6e3
commit 1ee7dffe6d
5 changed files with 35 additions and 12 deletions

View File

@@ -1,6 +1,6 @@
using Content.Shared.Actions;
using Content.Shared.Interaction;
using Robust.Shared.GameStates;
using Content.Shared.Interaction;
using Content.Shared.Physics;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
namespace Content.Shared.Actions.Components;
@@ -37,6 +37,16 @@ public sealed partial class TargetActionComponent : Component
[DataField]
public bool CheckCanAccess = true;
/// <summary>
/// The collision group to use to check for accessibility if <see cref="CheckCanAccess" /> is true.
/// </summary>
[DataField]
public CollisionGroup AccessMask = SharedInteractionSystem.InRangeUnobstructedMask;
/// <summary>
/// The allowed range for a target to be. If zero or negative, the range check is skipped,
/// unless <see cref="CheckCanAccess"/> is true.
/// </summary>
[DataField]
public float Range = SharedInteractionSystem.InteractionRange;