Skip to content

Commit

Permalink
V2.4 - Release
Browse files Browse the repository at this point in the history
  • Loading branch information
Eisenmonoxid committed Dec 1, 2024
1 parent e7a680c commit 6f08ab6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Helpers/Helpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ public static List<string> GetUserScriptDirectories()
{
// <Documents>/Settlers/Script/UserScriptGlobal.lua && UserScriptLocal.lua are always loaded by the game when a map is started!
string DocumentPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);

List<string> Directories = new List<string>();

foreach (string Element in Directory.GetDirectories(DocumentPath))
{
if (Element.Contains("Aufstieg eines") || Element.Contains("Rise of an"))
Expand All @@ -142,7 +142,7 @@ public static List<string> GetUserScriptDirectories()

return Directories;
}
public static void RestoreUserScriptFiles()
public static void RemoveUserScriptFiles()
{
string[] ScriptFiles = {"UserScriptLocal.lua", "EMXBinData.s6patcher"};
List<string> Directories = GetUserScriptDirectories();
Expand All @@ -168,7 +168,7 @@ public static void RestoreUserScriptFiles()
}
public static bool RestoreBackup(string filePath)
{
RestoreUserScriptFiles(); // Delete Userscript from Folders
RemoveUserScriptFiles(); // Delete Userscript from Folders

string FileName = Path.GetFileNameWithoutExtension(filePath);
string DirectoryPath = Path.GetDirectoryName(filePath);
Expand Down

0 comments on commit 6f08ab6

Please sign in to comment.