fix naming
This commit is contained in:
@@ -8,14 +8,14 @@ namespace Barotrauma
|
||||
{
|
||||
public static void Check()
|
||||
{
|
||||
if (!File.Exists(LuaCsSetup.VERSION_FILE)) { return; }
|
||||
if (!File.Exists(LuaCsSetup.VersionFile)) { return; }
|
||||
|
||||
ContentPackage luaPackage = LuaCsSetup.GetPackage("Lua For Barotrauma");
|
||||
string luaCsPath = Path.GetDirectoryName(luaPackage.Path);
|
||||
|
||||
if (luaPackage == null) { return; }
|
||||
|
||||
string clientVersion = File.ReadAllText(LuaCsSetup.VERSION_FILE);
|
||||
string clientVersion = File.ReadAllText(LuaCsSetup.VersionFile);
|
||||
string workshopVersion = luaPackage.ModVersion;
|
||||
|
||||
if (clientVersion == workshopVersion) { return; }
|
||||
@@ -53,7 +53,7 @@ namespace Barotrauma
|
||||
File.Copy(Path.Combine(luaCsPath, "Binary", file), file, true);
|
||||
}
|
||||
|
||||
File.WriteAllText(LuaCsSetup.VERSION_FILE, workshopVersion);
|
||||
File.WriteAllText(LuaCsSetup.VersionFile, workshopVersion);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
@@ -449,7 +449,7 @@ namespace Barotrauma
|
||||
}
|
||||
};
|
||||
|
||||
string version = File.Exists(LuaCsSetup.VERSION_FILE) ? File.ReadAllText(LuaCsSetup.VERSION_FILE) : "Github";
|
||||
string version = File.Exists(LuaCsSetup.VersionFile) ? File.ReadAllText(LuaCsSetup.VersionFile) : "Github";
|
||||
|
||||
new GUITextBlock(new RectTransform(new Point(300, 30), Frame.RectTransform, Anchor.TopLeft) { AbsoluteOffset = new Point(10, 10) }, $"Using Lua{additional}ForBarotrauma revision {AssemblyInfo.GitRevision} version {version}", Color.Red)
|
||||
{
|
||||
|
||||
@@ -1301,7 +1301,7 @@ namespace Barotrauma
|
||||
File.Copy(Path.Combine(path, "Binary", file), file, true);
|
||||
}
|
||||
|
||||
File.WriteAllText(LuaCsSetup.VERSION_FILE, luaPackage.ModVersion);
|
||||
File.WriteAllText(LuaCsSetup.VersionFile, luaPackage.ModVersion);
|
||||
}
|
||||
catch (UnauthorizedAccessException e)
|
||||
{
|
||||
|
||||
@@ -26,8 +26,8 @@ namespace Barotrauma
|
||||
|
||||
partial class LuaCsSetup
|
||||
{
|
||||
public const string LUASETUP_FILE = "Lua/LuaSetup.lua";
|
||||
public const string VERSION_FILE = "luacsversion.txt";
|
||||
public const string LuaSetupFile = "Lua/LuaSetup.lua";
|
||||
public const string VersionFile = "luacsversion.txt";
|
||||
|
||||
private const string configFileName = "LuaCsSetupConfig.xml";
|
||||
|
||||
@@ -514,11 +514,11 @@ modding needs.
|
||||
|
||||
ContentPackage luaPackage = GetPackage("Lua For Barotrauma");
|
||||
|
||||
if (File.Exists(LUASETUP_FILE))
|
||||
if (File.Exists(LuaSetupFile))
|
||||
{
|
||||
try
|
||||
{
|
||||
lua.Call(lua.LoadFile(LUASETUP_FILE), Path.GetDirectoryName(Path.GetFullPath(LUASETUP_FILE)));
|
||||
lua.Call(lua.LoadFile(LuaSetupFile), Path.GetDirectoryName(Path.GetFullPath(LuaSetupFile)));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user