mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-14 19:29:36 +01:00
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:
@@ -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
|
||||
)
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user