Files
RobustToolbox/Robust.Shared/Toolshed/Commands/Generic/Variables/VarsCommand.cs
T
Leon FriedrichandGitHub b323c8bd1e Add support for optional and params T[] toolshed command arguments. (#5573)
* Include argument name in completion suggestions

* Support optional args

* It (not so shrimply) works

* Add tests

* Add TestGenericPipeInference

* Fix tests

* Release notes

* Overzealous YAMLLinter

* Improve help signatures, fix map command

* Improve NoImplementationError

* Better type argument help signatures

* better pipe syntax

* fix NRE

* Add test

* a

* Fix silent toolshed failure

* Fix GetConcreteMethodInternal

* Improve vars command

* EntProtoId IAsType

* More GetConcreteMethodInternal fixes

* I hate this so much

* update tp command description

The command arguments call the the "other" entity the "target"

* Support localized argument hints/signatures
2025-02-16 21:55:05 +11:00

14 lines
385 B
C#

using System.Linq;
namespace Robust.Shared.Toolshed.Commands.Generic.Variables;
[ToolshedCommand]
public sealed class VarsCommand : ToolshedCommand
{
[CommandImplementation]
public void Vars(IInvocationContext ctx)
{
ctx.WriteLine(Toolshed.PrettyPrintType(ctx.GetVars().Select(x => $"{x} = {Toolshed.PrettyPrintType(ctx.ReadVar(x), out _)}"), out _));
}
}