tag:with toolshed command (#31751)
This commit is contained in:
@@ -25,6 +25,16 @@ public sealed class TagCommand : ToolshedCommand
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[CommandImplementation("with")]
|
||||||
|
public IEnumerable<EntityUid> With(
|
||||||
|
[CommandInvocationContext] IInvocationContext ctx,
|
||||||
|
[PipedArgument] IEnumerable<EntityUid> entities,
|
||||||
|
[CommandArgument] ValueRef<string, Prototype<TagPrototype>> tag)
|
||||||
|
{
|
||||||
|
_tag ??= GetSys<TagSystem>();
|
||||||
|
return entities.Where(e => _tag.HasTag(e, tag.Evaluate(ctx)!));
|
||||||
|
}
|
||||||
|
|
||||||
[CommandImplementation("add")]
|
[CommandImplementation("add")]
|
||||||
public EntityUid Add(
|
public EntityUid Add(
|
||||||
[CommandInvocationContext] IInvocationContext ctx,
|
[CommandInvocationContext] IInvocationContext ctx,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
command-description-visualize =
|
command-description-visualize =
|
||||||
Takes the input list of entities and puts them into a UI window for easy browsing.
|
Takes the input list of entities and puts them into a UI window for easy browsing.
|
||||||
command-description-runverbas =
|
command-description-runverbas =
|
||||||
Runs a verb over the input entities with the given user.
|
Runs a verb over the input entities with the given user.
|
||||||
@@ -58,6 +58,8 @@ command-description-rejuvenate =
|
|||||||
Rejuvenates the given entities, restoring them to full health, clearing status effects, etc.
|
Rejuvenates the given entities, restoring them to full health, clearing status effects, etc.
|
||||||
command-description-tag-list =
|
command-description-tag-list =
|
||||||
Lists tags on the given entities.
|
Lists tags on the given entities.
|
||||||
|
command-description-tag-with =
|
||||||
|
Returns only the entities with the given tag from the piped list of entities.
|
||||||
command-description-tag-add =
|
command-description-tag-add =
|
||||||
Adds a tag to the given entities.
|
Adds a tag to the given entities.
|
||||||
command-description-tag-rm =
|
command-description-tag-rm =
|
||||||
|
|||||||
Reference in New Issue
Block a user