Add doc comments to target action components (#29982)

This commit is contained in:
ShadowCommander
2024-07-12 21:04:53 -07:00
committed by GitHub
parent 1b360ac914
commit b94b52396e
2 changed files with 13 additions and 0 deletions

View File

@@ -4,6 +4,9 @@ using Robust.Shared.Serialization;
namespace Content.Shared.Actions; namespace Content.Shared.Actions;
/// <summary>
/// Used on action entities to define an action that triggers when targeting an entity.
/// </summary>
[RegisterComponent, NetworkedComponent] [RegisterComponent, NetworkedComponent]
public sealed partial class EntityTargetActionComponent : BaseTargetActionComponent public sealed partial class EntityTargetActionComponent : BaseTargetActionComponent
{ {
@@ -16,8 +19,15 @@ public sealed partial class EntityTargetActionComponent : BaseTargetActionCompon
[NonSerialized] [NonSerialized]
public EntityTargetActionEvent? Event; public EntityTargetActionEvent? Event;
/// <summary>
/// Determines which entities are valid targets for this action.
/// </summary>
/// <remarks>No whitelist check when null.</remarks>
[DataField("whitelist")] public EntityWhitelist? Whitelist; [DataField("whitelist")] public EntityWhitelist? Whitelist;
/// <summary>
/// Whether this action considers the user as a valid target entity when using this action.
/// </summary>
[DataField("canTargetSelf")] public bool CanTargetSelf = true; [DataField("canTargetSelf")] public bool CanTargetSelf = true;
} }

View File

@@ -3,6 +3,9 @@ using Robust.Shared.Serialization;
namespace Content.Shared.Actions; namespace Content.Shared.Actions;
/// <summary>
/// Used on action entities to define an action that triggers when targeting an entity coordinate.
/// </summary>
[RegisterComponent, NetworkedComponent] [RegisterComponent, NetworkedComponent]
public sealed partial class WorldTargetActionComponent : BaseTargetActionComponent public sealed partial class WorldTargetActionComponent : BaseTargetActionComponent
{ {