Use WorkshopId instead and minor cleanup

This commit is contained in:
EvilFactory
2022-10-28 12:26:47 -03:00
parent 79b4edf7a8
commit 43810a3509
9 changed files with 340 additions and 324 deletions
@@ -59,7 +59,7 @@ namespace Barotrauma
{
if (!File.Exists(LuaCsSetup.VersionFile)) { return; }
ContentPackage luaPackage = LuaCsSetup.GetPackage("Lua For Barotrauma");
ContentPackage luaPackage = LuaCsSetup.GetPackage(LuaCsSetup.LuaForBarotraumaId);
string luaCsPath = Path.GetDirectoryName(luaPackage.Path);
if (luaPackage == null) { return; }
@@ -69,7 +69,7 @@ namespace Barotrauma
if (clientVersion == workshopVersion) { return; }
string additional = LuaCsSetup.GetPackage("CsForBarotrauma", false, true) == null ? "" : "Cs";
string additional = LuaCsSetup.GetPackage(LuaCsSetup.CsForBarotraumaId, false, true) == null ? "" : "Cs";
var msg = new GUIMessageBox($"Lua{additional} Update", $"Your Lua{additional} client version is different from the version found in the Lua{additional}ForBarotrauma workshop files. Do you want to update?\n\n Client Version: {clientVersion}\n Workshop Version: {workshopVersion}",
new LocalizedString[2] { TextManager.Get("Yes"), TextManager.Get("Cancel") });