1- using System . Text ;
1+ using System . IO ;
2+ using System . Text ;
23using System . Text . RegularExpressions ;
4+ using Oxide . Core ;
35
46namespace Oxide . CSharp . Common
57{
@@ -10,12 +12,8 @@ internal static class Constants
1012
1113 internal const string CompilerDownloadUrl = "https://downloads.oxidemod.com/artifacts/Oxide.Compiler/{0}/" ;
1214 internal const string CompilerBasicArguments = "-unsafe true --setting:Force true -ms true" ;
13-
14- internal static readonly Regex BlankLineRegex = new Regex ( @"^\s*\{?\s*$" ,
15- RegexOptions . Compiled | RegexOptions . IgnoreCase ) ;
16-
17- internal static readonly Regex CustomAttributeRegex =
18- new Regex ( @"^\s*\[" , RegexOptions . Compiled | RegexOptions . IgnoreCase ) ;
15+ internal const string OxideNamespace = "namespace Oxide.Plugins" ;
16+ internal const string UmodNamespace = "namespace uMod.Plugins" ;
1917
2018 internal static readonly Regex MainPluginClassNameRegex =
2119 new Regex ( @"^\s*(?:public|private|protected|internal)?\s*class\s+(\S+)\s+\:\s+\S+Plugin\s*$" ,
@@ -34,14 +32,14 @@ internal static class Constants
3432 internal static readonly Regex PluginNameRegex = new Regex ( @"Oxide\\.[\\w]+\\.([\\w]+)" ,
3533 RegexOptions . Compiled ) ;
3634
37- internal static readonly Regex NamespaceRegex = new Regex ( @"^\s*namespace Oxide\.Plugins\s*(\{\s*)?$" ,
38- RegexOptions . Compiled | RegexOptions . IgnoreCase ) ;
39-
4035 internal static readonly Regex PluginReferenceRegex = new Regex ( @"^(Oxide\.(?:Ext|Game)\.(.+))$" ,
4136 RegexOptions . Compiled | RegexOptions . IgnoreCase ) ;
4237
4338 internal static readonly Regex IncludeRegex = new Regex ( @"\\include\b" , RegexOptions . Compiled | RegexOptions . IgnoreCase ) ;
4439
4540 internal static readonly Regex SymbolEscapeRegex = new Regex ( @"[^\w\d]" , RegexOptions . Compiled ) ;
41+
42+ internal static readonly string IncludePath = Path . Combine ( Interface . Oxide . PluginDirectory , "include" ) ;
43+ internal static readonly string CSharpPath = Path . Combine ( Interface . Oxide . ExtensionDirectory , "Oxide.CSharp.dll" ) ;
4644 }
4745}
0 commit comments