This commit is contained in:
Gurge44 committed 2024-05-24 15:23:27 +02:00
1 parent bda1b8a405
commit af5ab4f2ee
2 files changed
+17 -8

No files matched your search

+16 -8
View File
@@ -1,21 +1,29 @@
using System.IO;
using System;
using System.IO;
using static EHR.Translator;
namespace EHR;
public class AddSteamID
public static class AddSteamID
{
private static readonly string FilePath = @"./steam_appid.txt";
private const string FilePath = "./steam_appid.txt";
public static void AddSteamAppIdFile()
{
if (!File.Exists(FilePath))
try
{
Logger.Warn("Creating a new steam_appid.txt file", "AddSteamID");
File.Create(FilePath).Close();
File.WriteAllText(FilePath, "945360");
if (!File.Exists(FilePath))
{
Logger.Warn("Creating a new steam_appid.txt file", "AddSteamID");
File.Create(FilePath).Close();
File.WriteAllText(FilePath, "945360");
ModUpdater.ShowPopup(GetString("AppIDAdded"), StringNames.Close, true);
ModUpdater.ShowPopup(GetString("AppIDAdded"), StringNames.Close, true);
}
}
catch (Exception e)
{
Utils.ThrowException(e);
}
}
}
+1
View File
@@ -879,6 +879,7 @@ public static class Options
public static void OptionsLoadStart()
{
Logger.Info("Options.Load Start", "Options");
AddSteamID.AddSteamAppIdFile();
Main.LoadRoleClasses();
taskOptionsLoad = Task.Run(Load);
taskOptionsLoad.ContinueWith(_ =>