CSharp preprocessor definitions
This commit is contained in:
@@ -16,7 +16,6 @@ namespace Barotrauma
|
||||
{
|
||||
class CsScriptBase : AssemblyLoadContext
|
||||
{
|
||||
public static readonly List<string> PreprocessingSymbols = new List<string>();
|
||||
|
||||
public const string NET_ONE_TIME_SCRIPT_ASSEMBLY = "NetOneTimeScriptAssembly";
|
||||
public const string NET_SCRIPT_ASSEMBLY = "NetScriptAssembly";
|
||||
@@ -27,15 +26,11 @@ namespace Barotrauma
|
||||
{ NET_ONE_TIME_SCRIPT_ASSEMBLY, 0}
|
||||
};
|
||||
|
||||
public CsScriptBase() : base(isCollectible: true) { }
|
||||
public CSharpParseOptions ParseOptions { get; protected set; }
|
||||
|
||||
static CsScriptBase()
|
||||
{
|
||||
#if SERVER
|
||||
PreprocessingSymbols.Add("SERVER");
|
||||
#else
|
||||
PreprocessingSymbols.Add("CLIENT");
|
||||
#endif
|
||||
public CsScriptBase() : base(isCollectible: true) {
|
||||
ParseOptions = CSharpParseOptions.Default
|
||||
.WithPreprocessorSymbols(new[] { LuaCsSetup.IsServer ? "SERVER" : (LuaCsSetup.IsClient ? "CLIENT" : "UNDEFINED") });
|
||||
}
|
||||
|
||||
public static SyntaxTree AssemblyInfoSyntaxTree(string asmName = null)
|
||||
|
||||
Reference in New Issue
Block a user