Skip to content

Commit

Permalink
IPatcherState.LoadOrder /w no generics
Browse files Browse the repository at this point in the history
  • Loading branch information
Noggog committed Dec 4, 2024
1 parent 9c7b4cd commit 0bb1d90
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Mutagen.Bethesda.Synthesis/States/IPatcherState.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Mutagen.Bethesda.Plugins.Allocators;
using Mutagen.Bethesda.Plugins.Cache;
using Mutagen.Bethesda.Plugins.Order;
using Mutagen.Bethesda.Plugins.Records;
using Noggog;
Expand Down Expand Up @@ -41,6 +42,12 @@ public interface IPatcherState : IBaseRunState, IDisposable
CancellationToken Cancel { get; }

internal ILoadOrderGetter<IModListingGetter<IModFlagsGetter>> LoadOrderForPipeline { get; }

/// <summary>
/// Convenience Link Cache to use created from the provided Load Order object.<br />
/// The patch mod is marked as safe for mutation, and will not make the cache invalid.
/// </summary>
ILinkCache LinkCache { get; }
}

public interface IPatcherState<TModSetter, TModGetter> : IBaseRunState<TModSetter, TModGetter>, IPatcherState
Expand All @@ -56,4 +63,10 @@ public interface IPatcherState<TModSetter, TModGetter> : IBaseRunState<TModSette
/// upon that content as appropriate, and mesh any changes to produce the final patch file.
/// </summary>
new TModSetter PatchMod { get; }

/// <summary>
/// Convenience Link Cache to use created from the provided Load Order object.<br />
/// The patch mod is marked as safe for mutation, and will not make the cache invalid.
/// </summary>
new ILinkCache<TModSetter, TModGetter> LinkCache { get; }
}
2 changes: 2 additions & 0 deletions Mutagen.Bethesda.Synthesis/States/SynthesisState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ public class SynthesisState<TModSetter, TModGetter> : IPatcherState<TModSetter,
public CancellationToken Cancel { get; }

public ILoadOrderGetter<IModListingGetter<IModFlagsGetter>> LoadOrderForPipeline => LoadOrder;

ILinkCache IPatcherState.LinkCache => LinkCache;

/// <inheritdoc />
public DirectoryPath? ExtraSettingsDataPath { get; }
Expand Down

0 comments on commit 0bb1d90

Please sign in to comment.