Skip to content

Commit

Permalink
IModMasterFlagsGetter
Browse files Browse the repository at this point in the history
  • Loading branch information
Noggog committed Sep 7, 2024
1 parent ce6ec4c commit d6975d3
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public sealed record BinaryWriteParameters
/// <summary>
/// Load order. Required for games with Separated Load Order lists per master type
/// </summary>
public ILoadOrderGetter<IModFlagsGetter>? LoadOrder { get; init; }
public ILoadOrderGetter<IModMasterFlagsGetter>? LoadOrder { get; init; }

/// <summary>
/// Whether to use multithreading when possible
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ private void PostProcessAdjustments(
MutagenWriter writer,
IModGetter mod,
IModHeaderCommon modHeader,
ILoadOrderGetter<IModFlagsGetter>? loadOrder)
ILoadOrderGetter<IModMasterFlagsGetter>? loadOrder)
{
HandleDisallowedLowerFormIDs();
writer.MetaData.MasterReferences = ConstructWriteMasters(mod);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public static IReadOnlySeparatedMasterPackage Factory(
ModKey currentModKey,
MasterStyle style,
IReadOnlyMasterReferenceCollection masters,
ILoadOrderGetter<IModFlagsGetter>? loadOrder)
ILoadOrderGetter<IModMasterFlagsGetter>? loadOrder)
{
var constants = GameConstants.Get(release);
if (constants.SeparateMasterLoadOrders)
Expand Down Expand Up @@ -151,13 +151,13 @@ internal static IReadOnlySeparatedMasterPackage Separate(
ModKey currentModKey,
MasterStyle style,
IReadOnlyMasterReferenceCollection masters,
ILoadOrderGetter<IModFlagsGetter>? loadOrder)
ILoadOrderGetter<IModMasterFlagsGetter>? loadOrder)
{
var normal = new List<ModKey>();
var medium = new List<ModKey>();
var light = new List<ModKey>();

void AddToList(IModFlagsGetter mod, ModKey modKey)
void AddToList(IModMasterFlagsGetter mod, ModKey modKey)
{
if (mod.IsMediumMaster)
{
Expand Down
6 changes: 3 additions & 3 deletions Mutagen.Bethesda.Core/Plugins/Records/AMod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ public AMod(ModKey modKey)
public abstract bool UsingLocalization { get; set; }
bool IModFlagsGetter.UsingLocalization => throw new NotImplementedException();
public abstract bool IsMaster { get; set; }
bool IModFlagsGetter.IsMaster => throw new NotImplementedException();
bool IModMasterFlagsGetter.IsMaster => throw new NotImplementedException();
public abstract bool CanBeSmallMaster { get; }
public abstract bool IsSmallMaster { get; set; }
bool IModFlagsGetter.IsSmallMaster => throw new NotImplementedException();
bool IModMasterFlagsGetter.IsSmallMaster => throw new NotImplementedException();
public abstract bool CanBeMediumMaster { get; }
public abstract bool IsMediumMaster { get; set; }
bool IModFlagsGetter.IsMediumMaster => throw new NotImplementedException();
bool IModMasterFlagsGetter.IsMediumMaster => throw new NotImplementedException();
public abstract bool ListsOverriddenForms { get; }
IGroup<T>? IMod.TryGetTopLevelGroup<T>() => throw new NotImplementedException();
IGroup? IMod.TryGetTopLevelGroup(Type t) => throw new NotImplementedException();
Expand Down
15 changes: 9 additions & 6 deletions Mutagen.Bethesda.Core/Plugins/Records/ModFlags.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Mutagen.Bethesda.Plugins.Records;

public interface IModFlagsGetter : IModKeyed
public interface IModFlagsGetter : IModMasterFlagsGetter, IModKeyed
{
/// <summary>
/// Whether a mod supports localization features
Expand All @@ -12,6 +12,14 @@ public interface IModFlagsGetter : IModKeyed
/// </summary>
bool UsingLocalization { get; }

/// <summary>
/// Whether a mod lists overridden forms in its header
/// </summary>
bool ListsOverriddenForms { get; }
}

public interface IModMasterFlagsGetter : IModKeyed
{
/// <summary>
/// Whether a mod supports Small Master features
/// </summary>
Expand All @@ -36,11 +44,6 @@ public interface IModFlagsGetter : IModKeyed
/// Whether a mod has Master flag enabled
/// </summary>
bool IsMaster { get; }

/// <summary>
/// Whether a mod lists overridden forms in its header
/// </summary>
bool ListsOverriddenForms { get; }
}

public record ModFlags : IModFlagsGetter
Expand Down

0 comments on commit d6975d3

Please sign in to comment.