Skip to content

Commit

Permalink
Merge pull request #204 from Rexicon226/v1.1.2
Browse files Browse the repository at this point in the history
creating disabled_plugins.cfg on boot if it wasn't found. no command …
  • Loading branch information
Rexicon226 authored Apr 9, 2023
2 parents 147271f + e2b6d74 commit 290b084
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion SpaceWarpPatcher/Patcher.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
Expand Down Expand Up @@ -46,7 +47,13 @@ internal static class Delayer
public static void PatchChainloaderStart()
{
ChainloaderPatch.Logger = Logger.CreateLogSource("SW BIE Extensions");
ChainloaderPatch.DisabledPluginGuids = File.ReadAllLines(ChainloaderPatch.DisabledPluginsFilepath = Path.Combine(Paths.BepInExRootPath, "disabled_plugins.cfg"));
string disabledPluginsFilepath = Path.Combine(Paths.BepInExRootPath, "disabled_plugins.cfg");
if (!File.Exists(disabledPluginsFilepath))
{
File.Create(disabledPluginsFilepath).Dispose();
ChainloaderPatch.Logger.LogWarning("Disabled plugins file did not exist, created empty file at: " + disabledPluginsFilepath);
}
ChainloaderPatch.DisabledPluginGuids = File.ReadAllLines(disabledPluginsFilepath);
ChainloaderPatch.DisabledPlugins = new();
Harmony.CreateAndPatchAll(typeof(ChainloaderPatch));
}
Expand Down

0 comments on commit 290b084

Please sign in to comment.