Skip to content

Commit

Permalink
get all loaded patches
Browse files Browse the repository at this point in the history
  • Loading branch information
01010100b committed Oct 16, 2023
1 parent 74432e4 commit ba811ec
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions AuroraPatch/Patch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public abstract class Patch
public string AuroraChecksum => Loader.AuroraChecksum; // available on Loaded
public Assembly AuroraAssembly => Loader.AuroraAssembly; // available on Loaded
public Form TacticalMap => Loader.TacticalMap; // available on Started
public string Folder => Path.Combine(Path.GetDirectoryName(AuroraExecutablePath), "Patches", Name);

/// <summary>
/// A description for your mod, shown on the AuroraPatch UI.
Expand Down Expand Up @@ -61,6 +62,11 @@ public bool TryGetPatch<T>(out T patch) where T : Patch
}
}

/// <summary>
/// Iterate all loaded patches.
/// </summary>
public IEnumerable<Patch> GetLoadedPatches() => Loader.LoadedPatches;

/// <summary>
/// Run code on Aurora's UI thread. Only available on Started..
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion AuroraPatch/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ static void Main(string[] args)

if (!File.Exists(exe))
{
Logger.LogCritical($"File {exe} is missing or is not readable.");
Logger.LogCritical($"File {exe} is missing or is not readable.", true);
Application.Exit();

return;
Expand Down

0 comments on commit ba811ec

Please sign in to comment.