mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-10-20 01:46:25 +00:00
Fix
This commit is contained in:
1 parent
bda1b8a405
commit
af5ab4f2ee
2 files changed
+17
-8
No files matched your search
+16
-8
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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(_ =>
|
||||
|
||||
Reference in new issue
Block a user