Fix mixed spaces and tabs
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using Microsoft.CodeAnalysis.Scripting;
|
||||
@@ -14,40 +14,40 @@ using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Barotrauma
|
||||
{
|
||||
class CsScriptBase : AssemblyLoadContext
|
||||
{
|
||||
class CsScriptBase : AssemblyLoadContext
|
||||
{
|
||||
|
||||
public const string CsOneTimeScriptAssembly = "NetOneTimeScriptAssembly";
|
||||
public const string CsScriptAssembly = "NetScriptAssembly";
|
||||
public const string CsOneTimeScriptAssembly = "NetOneTimeScriptAssembly";
|
||||
public const string CsScriptAssembly = "NetScriptAssembly";
|
||||
|
||||
public static readonly string[] LoadedAssemblyName = {
|
||||
CsScriptBase.CsScriptAssembly,
|
||||
CsScriptBase.CsOneTimeScriptAssembly
|
||||
};
|
||||
|
||||
public static Dictionary<string, object> Revision = new Dictionary<string, object>()
|
||||
{
|
||||
{ CsScriptAssembly, 0},
|
||||
{ CsOneTimeScriptAssembly, 0}
|
||||
public static readonly string[] LoadedAssemblyName = {
|
||||
CsScriptBase.CsScriptAssembly,
|
||||
CsScriptBase.CsOneTimeScriptAssembly
|
||||
};
|
||||
|
||||
public CSharpParseOptions ParseOptions { get; protected set; }
|
||||
|
||||
public CsScriptBase() : base(isCollectible: true) {
|
||||
ParseOptions = CSharpParseOptions.Default
|
||||
.WithPreprocessorSymbols(new[] { LuaCsSetup.IsServer ? "SERVER" : (LuaCsSetup.IsClient ? "CLIENT" : "UNDEFINED") });
|
||||
}
|
||||
|
||||
public static SyntaxTree AssemblyInfoSyntaxTree(string asmName = null)
|
||||
public static Dictionary<string, object> Revision = new Dictionary<string, object>()
|
||||
{
|
||||
Revision[asmName] = (int)Revision[asmName] + 1;
|
||||
var asmInfo = new StringBuilder();
|
||||
asmInfo.AppendLine("using System.Reflection;");
|
||||
asmInfo.AppendLine($"[assembly: AssemblyMetadata(\"Revision\", \"{Revision[asmName]}\")]");
|
||||
asmInfo.AppendLine($"[assembly: AssemblyVersion(\"0.0.0.{Revision[asmName]}\")]");
|
||||
return CSharpSyntaxTree.ParseText(asmInfo.ToString(), CSharpParseOptions.Default);
|
||||
}
|
||||
{ CsScriptAssembly, 0},
|
||||
{ CsOneTimeScriptAssembly, 0}
|
||||
};
|
||||
|
||||
~CsScriptBase() { }
|
||||
}
|
||||
}
|
||||
public CSharpParseOptions ParseOptions { get; protected set; }
|
||||
|
||||
public CsScriptBase() : base(isCollectible: true) {
|
||||
ParseOptions = CSharpParseOptions.Default
|
||||
.WithPreprocessorSymbols(new[] { LuaCsSetup.IsServer ? "SERVER" : (LuaCsSetup.IsClient ? "CLIENT" : "UNDEFINED") });
|
||||
}
|
||||
|
||||
public static SyntaxTree AssemblyInfoSyntaxTree(string asmName = null)
|
||||
{
|
||||
Revision[asmName] = (int)Revision[asmName] + 1;
|
||||
var asmInfo = new StringBuilder();
|
||||
asmInfo.AppendLine("using System.Reflection;");
|
||||
asmInfo.AppendLine($"[assembly: AssemblyMetadata(\"Revision\", \"{Revision[asmName]}\")]");
|
||||
asmInfo.AppendLine($"[assembly: AssemblyVersion(\"0.0.0.{Revision[asmName]}\")]");
|
||||
return CSharpSyntaxTree.ParseText(asmInfo.ToString(), CSharpParseOptions.Default);
|
||||
}
|
||||
|
||||
~CsScriptBase() { }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user