Toolshed refactor (#33598)

* Content changes for engine toolshed PR

* add contains command

* more permissive commands
This commit is contained in:
Leon Friedrich
2024-12-21 17:45:48 +11:00
committed by GitHub
parent b011dbb61e
commit 06e2bba8ab
19 changed files with 212 additions and 270 deletions

View File

@@ -20,7 +20,7 @@ public sealed class PolymorphCommand : ToolshedCommand
[CommandImplementation]
public EntityUid? Polymorph(
[PipedArgument] EntityUid input,
[CommandArgument] ProtoId<PolymorphPrototype> protoId
ProtoId<PolymorphPrototype> protoId
)
{
_system ??= GetSys<PolymorphSystem>();
@@ -34,7 +34,7 @@ public sealed class PolymorphCommand : ToolshedCommand
[CommandImplementation]
public IEnumerable<EntityUid> Polymorph(
[PipedArgument] IEnumerable<EntityUid> input,
[CommandArgument] ProtoId<PolymorphPrototype> protoId
ProtoId<PolymorphPrototype> protoId
)
=> input.Select(x => Polymorph(x, protoId)).Where(x => x is not null).Select(x => (EntityUid)x!);
}