mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-25 18:09:22 +01:00
Fix stack overflow.
This commit is contained in:
parent
514121d8c1
commit
cd76c31d8c
4 changed files with 7 additions and 7 deletions
|
|
@ -23,7 +23,7 @@ public class DefaultSubMod(IMod mod) : IModDataContainer
|
|||
=> null;
|
||||
|
||||
public void AddDataTo(Dictionary<Utf8GamePath, FullPath> redirections, HashSet<MetaManipulation> manipulations)
|
||||
=> ((IModDataContainer)this).AddDataTo(redirections, manipulations);
|
||||
=> IModDataContainer.AddDataTo(this, redirections, manipulations);
|
||||
|
||||
public (int GroupIndex, int DataIndex) GetDataIndices()
|
||||
=> (-1, 0);
|
||||
|
|
|
|||
|
|
@ -16,14 +16,14 @@ public interface IModDataContainer
|
|||
public Dictionary<Utf8GamePath, FullPath> FileSwaps { get; set; }
|
||||
public HashSet<MetaManipulation> Manipulations { get; set; }
|
||||
|
||||
public void AddDataTo(Dictionary<Utf8GamePath, FullPath> redirections, HashSet<MetaManipulation> manipulations)
|
||||
public static void AddDataTo(IModDataContainer container, Dictionary<Utf8GamePath, FullPath> redirections, HashSet<MetaManipulation> manipulations)
|
||||
{
|
||||
foreach (var (path, file) in Files)
|
||||
foreach (var (path, file) in container.Files)
|
||||
redirections.TryAdd(path, file);
|
||||
|
||||
foreach (var (path, file) in FileSwaps)
|
||||
foreach (var (path, file) in container.FileSwaps)
|
||||
redirections.TryAdd(path, file);
|
||||
manipulations.UnionWith(Manipulations);
|
||||
manipulations.UnionWith(container.Manipulations);
|
||||
}
|
||||
|
||||
public string GetName()
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ public class MultiSubMod(Mod mod, MultiModGroup group) : IModDataOption
|
|||
}
|
||||
|
||||
public void AddDataTo(Dictionary<Utf8GamePath, FullPath> redirections, HashSet<MetaManipulation> manipulations)
|
||||
=> ((IModDataContainer)this).AddDataTo(redirections, manipulations);
|
||||
=> IModDataContainer.AddDataTo(this, redirections, manipulations);
|
||||
|
||||
public static MultiSubMod CreateForSaving(string name, string description, ModPriority priority)
|
||||
=> new(null!, null!)
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ public class SingleSubMod(Mod mod, SingleModGroup group) : IModDataOption
|
|||
}
|
||||
|
||||
public void AddDataTo(Dictionary<Utf8GamePath, FullPath> redirections, HashSet<MetaManipulation> manipulations)
|
||||
=> ((IModDataContainer)this).AddDataTo(redirections, manipulations);
|
||||
=> IModDataContainer.AddDataTo(this, redirections, manipulations);
|
||||
|
||||
public (int GroupIndex, int DataIndex) GetDataIndices()
|
||||
=> (Group.GetIndex(), GetDataIndex());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue