mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-02-19 22:37:46 +01:00
Heavily improve changed item display.
This commit is contained in:
parent
1ebe4099d6
commit
deba8ac910
30 changed files with 360 additions and 126 deletions
|
|
@ -136,7 +136,7 @@ public sealed class CombiningModGroup : IModGroup
|
|||
public void AddData(Setting setting, Dictionary<Utf8GamePath, FullPath> redirections, MetaDictionary manipulations)
|
||||
=> Data[setting.AsIndex].AddDataTo(redirections, manipulations);
|
||||
|
||||
public void AddChangedItems(ObjectIdentification identifier, IDictionary<string, IIdentifiedObjectData?> changedItems)
|
||||
public void AddChangedItems(ObjectIdentification identifier, IDictionary<string, IIdentifiedObjectData> changedItems)
|
||||
{
|
||||
foreach (var container in DataContainers)
|
||||
identifier.AddChangedItems(container, changedItems);
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ public interface IModGroup
|
|||
public IModGroupEditDrawer EditDrawer(ModGroupEditDrawer editDrawer);
|
||||
|
||||
public void AddData(Setting setting, Dictionary<Utf8GamePath, FullPath> redirections, MetaDictionary manipulations);
|
||||
public void AddChangedItems(ObjectIdentification identifier, IDictionary<string, IIdentifiedObjectData?> changedItems);
|
||||
public void AddChangedItems(ObjectIdentification identifier, IDictionary<string, IIdentifiedObjectData> changedItems);
|
||||
|
||||
/// <summary> Ensure that a value is valid for a group. </summary>
|
||||
public Setting FixSetting(Setting setting);
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ public class ImcModGroup(Mod mod) : IModGroup
|
|||
}
|
||||
}
|
||||
|
||||
public void AddChangedItems(ObjectIdentification identifier, IDictionary<string, IIdentifiedObjectData?> changedItems)
|
||||
public void AddChangedItems(ObjectIdentification identifier, IDictionary<string, IIdentifiedObjectData> changedItems)
|
||||
=> Identifier.AddChangedItems(identifier, changedItems, AllVariants);
|
||||
|
||||
public Setting FixSetting(Setting setting)
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ public sealed class MultiModGroup(Mod mod) : IModGroup, ITexToolsGroup
|
|||
}
|
||||
}
|
||||
|
||||
public void AddChangedItems(ObjectIdentification identifier, IDictionary<string, IIdentifiedObjectData?> changedItems)
|
||||
public void AddChangedItems(ObjectIdentification identifier, IDictionary<string, IIdentifiedObjectData> changedItems)
|
||||
{
|
||||
foreach (var container in DataContainers)
|
||||
identifier.AddChangedItems(container, changedItems);
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ public sealed class SingleModGroup(Mod mod) : IModGroup, ITexToolsGroup
|
|||
OptionData[setting.AsIndex].AddDataTo(redirections, manipulations);
|
||||
}
|
||||
|
||||
public void AddChangedItems(ObjectIdentification identifier, IDictionary<string, IIdentifiedObjectData?> changedItems)
|
||||
public void AddChangedItems(ObjectIdentification identifier, IDictionary<string, IIdentifiedObjectData> changedItems)
|
||||
{
|
||||
foreach (var container in DataContainers)
|
||||
identifier.AddChangedItems(container, changedItems);
|
||||
|
|
|
|||
|
|
@ -139,6 +139,7 @@ public class ModCacheManager : IDisposable, IService
|
|||
mod.ChangedItems.RemoveMachinistOffhands();
|
||||
|
||||
mod.LowerChangedItemsString = string.Join("\0", mod.ChangedItems.Keys.Select(k => k.ToLowerInvariant()));
|
||||
++mod.LastChangedItemsUpdate;
|
||||
}
|
||||
|
||||
private static void UpdateCounts(Mod mod)
|
||||
|
|
|
|||
|
|
@ -101,13 +101,14 @@ public sealed class Mod : IMod
|
|||
}
|
||||
|
||||
// Cache
|
||||
public readonly SortedList<string, IIdentifiedObjectData?> ChangedItems = new();
|
||||
public readonly SortedList<string, IIdentifiedObjectData> ChangedItems = new();
|
||||
|
||||
public string LowerChangedItemsString { get; internal set; } = string.Empty;
|
||||
public string AllTagsLower { get; internal set; } = string.Empty;
|
||||
|
||||
public int TotalFileCount { get; internal set; }
|
||||
public int TotalSwapCount { get; internal set; }
|
||||
public int TotalManipulations { get; internal set; }
|
||||
public int TotalFileCount { get; internal set; }
|
||||
public int TotalSwapCount { get; internal set; }
|
||||
public int TotalManipulations { get; internal set; }
|
||||
public ushort LastChangedItemsUpdate { get; internal set; }
|
||||
public bool HasOptions { get; internal set; }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue