Skip to content

Commit

Permalink
Merge pull request #10 from KSP2Community/hf1
Browse files Browse the repository at this point in the history
Did a dumb
  • Loading branch information
cheese3660 authored Sep 1, 2023
2 parents 3934956 + 60f4cff commit 109df58
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/PatchManager.Core/Assets/PatchingManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,18 @@ internal static class PatchingManager
private static Universe _universe;


public static void GenerateUniverse()
{
_universe = new(RegisterPatcher, Logging.LogError, Logging.LogInfo,RegisterGenerator);
}

private static readonly PatchHashes CurrentPatchHashes = PatchHashes.CreateDefault();

private static readonly int InitialLibraryCount = _universe.AllLibraries.Count;
private static int _initialLibraryCount;
private static Dictionary<string, List<(string name, string text)>> _createdAssets = new();

internal static int TotalPatchCount;
public static void GenerateUniverse()
{
_universe = new(RegisterPatcher, Logging.LogError, Logging.LogInfo,RegisterGenerator);
_initialLibraryCount = _universe.AllLibraries.Count;
}

private static void RegisterPatcher(ITextPatcher patcher)
{
Expand Down Expand Up @@ -108,7 +109,7 @@ public static void ImportModPatches(string modName, string modFolder)
{
_universe.LoadPatchesInDirectory(new DirectoryInfo(modFolder), modName);

var currentLibraryCount = _universe.AllLibraries.Count - InitialLibraryCount;
var currentLibraryCount = _universe.AllLibraries.Count - _initialLibraryCount;

if (currentLibraryCount > _previousLibraryCount)
{
Expand Down

0 comments on commit 109df58

Please sign in to comment.