Skip to content

Commit e144323

Browse files
Slutlukespragg
authored andcommitted
Allow restricted references when sandbox disabled
1 parent a8fff28 commit e144323

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Compilation.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using ObjectStream.Data;
1+
using ObjectStream.Data;
22
using Oxide.Core;
33
using System;
44
using System.Collections.Generic;
@@ -262,8 +262,8 @@ private void PreparseScript(CompilablePlugin plugin)
262262
if (match.Success)
263263
{
264264
string result = match.Groups[1].Value;
265-
if (!result.StartsWith("Oxide.") && !result.Contains("Harmony") && !result.Contains("Newtonsoft.Json")
266-
&& !result.Contains("protobuf-net") && !result.StartsWith("Rust."))
265+
if (!result.StartsWith("Oxide.") && !result.Contains("Newtonsoft.Json")&& !result.Contains("protobuf-net")
266+
|| !CSharpExtension.SandboxEnabled && !result.Contains("Harmony"))
267267
{
268268
AddReference(plugin, result);
269269
Interface.Oxide.LogInfo("Added '// Reference: {0}' in plugin '{1}'", result, plugin.Name);

0 commit comments

Comments
 (0)