Skip to content

Commit

Permalink
Add doc comments to target action components (#29982)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShadowCommander authored Jul 13, 2024
1 parent 1b360ac commit b94b523
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Content.Shared/Actions/EntityTargetActionComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

namespace Content.Shared.Actions;

/// <summary>
/// Used on action entities to define an action that triggers when targeting an entity.
/// </summary>
[RegisterComponent, NetworkedComponent]
public sealed partial class EntityTargetActionComponent : BaseTargetActionComponent
{
Expand All @@ -16,8 +19,15 @@ public sealed partial class EntityTargetActionComponent : BaseTargetActionCompon
[NonSerialized]
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;

/// <summary>
/// Whether this action considers the user as a valid target entity when using this action.
/// </summary>
[DataField("canTargetSelf")] public bool CanTargetSelf = true;
}

Expand Down
3 changes: 3 additions & 0 deletions Content.Shared/Actions/WorldTargetActionComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

namespace Content.Shared.Actions;

/// <summary>
/// Used on action entities to define an action that triggers when targeting an entity coordinate.
/// </summary>
[RegisterComponent, NetworkedComponent]
public sealed partial class WorldTargetActionComponent : BaseTargetActionComponent
{
Expand Down

0 comments on commit b94b523

Please sign in to comment.