Toolshed Rejig (#5455)

* Toolshed Rejig

* shorten hint string

* Try fix conflicts. Ill make with work later

* bodge

* Fix ProtoIdTypeParser assert

* comment

* AllEntities

* Remove more linq from WhereCommand

* better help strings

* Add ContainsCommand

* loc strings

* Add contains command description

* Add $self variable

* Errors for writing to readonly variables

* A
This commit is contained in:
Leon Friedrich
2024-12-21 17:49:11 +11:00
committed by GitHub
parent 6247be2c84
commit 9af119f57a
134 changed files with 5129 additions and 3027 deletions

View File

@@ -1,5 +1,4 @@
using System.Reflection;
using System.Reflection.Emit;
using ILReader;
using ILReader.Readers;
using Robust.Shared.Toolshed;
@@ -11,7 +10,7 @@ public sealed class ILCommand : ToolshedCommand
{
[CommandImplementation("dumpil")]
public void DumpIL(
[CommandInvocationContext] IInvocationContext ctx,
IInvocationContext ctx,
[PipedArgument] MethodInfo info
)
{

View File

@@ -282,11 +282,31 @@ namespace Robust.Shared.Scripting
return Array.Empty<IConError>();
}
public bool HasErrors => false;
public void ClearErrors()
{
}
public Dictionary<string, object?> Variables { get; } = new();
/// <inheritdoc />
public object? ReadVar(string name)
{
return Variables.GetValueOrDefault(name);
}
/// <inheritdoc />
public void WriteVar(string name, object? value)
{
Variables[name] = value;
}
/// <inheritdoc />
public IEnumerable<string> GetVars()
{
return Variables.Keys;
}
public Dictionary<string, object?> Variables { get; } = new();
private static MemberInfo? ReflectionGetInstanceMember(Type type, MemberTypes memberType, string name)
{