Don't compile new sandbox code outside TOOLS

Fix build
This commit is contained in:
PJB3005
2026-01-31 09:11:24 +01:00
parent e7f75ab35d
commit 2722448474

View File

@@ -320,6 +320,7 @@ namespace Robust.Shared.ContentPack
MetadataReader reader,
MethodDefinitionHandle method)
{
#if TOOLS
var methodDef = reader.GetMethodDefinition(method);
var type = GetTypeFromDefinition(reader, methodDef.GetDeclaringType());
@@ -329,6 +330,7 @@ namespace Robust.Shared.ContentPack
_sawmill.Error("Hint: method is compiler-generated. Check for params collections and/or collection expressions:");
ReportBadReferences(peReader, reader, [method]);
#endif
}
private static string FormatMethodName(MetadataReader reader, MethodDefinition method)