mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-19 23:24:22 +01:00
Use specific counter for Imc.
This commit is contained in:
parent
be729afd4b
commit
d7a8c9415b
3 changed files with 5 additions and 1 deletions
|
|
@ -68,6 +68,7 @@ public sealed class ImcCache(MetaFileManager manager, ModCollection collection)
|
||||||
|
|
||||||
protected override void ApplyModInternal(ImcIdentifier identifier, ImcEntry entry)
|
protected override void ApplyModInternal(ImcIdentifier identifier, ImcEntry entry)
|
||||||
{
|
{
|
||||||
|
++Collection.ImcChangeCounter;
|
||||||
if (Manager.CharacterUtility.Ready)
|
if (Manager.CharacterUtility.Ready)
|
||||||
ApplyFile(identifier, entry);
|
ApplyFile(identifier, entry);
|
||||||
}
|
}
|
||||||
|
|
@ -102,6 +103,7 @@ public sealed class ImcCache(MetaFileManager manager, ModCollection collection)
|
||||||
|
|
||||||
protected override void RevertModInternal(ImcIdentifier identifier)
|
protected override void RevertModInternal(ImcIdentifier identifier)
|
||||||
{
|
{
|
||||||
|
++Collection.ImcChangeCounter;
|
||||||
var path = identifier.GamePath();
|
var path = identifier.GamePath();
|
||||||
if (!_imcFiles.TryGetValue(path, out var pair))
|
if (!_imcFiles.TryGetValue(path, out var pair))
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,8 @@ public partial class ModCollection
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int ChangeCounter { get; private set; }
|
public int ChangeCounter { get; private set; }
|
||||||
|
|
||||||
|
public uint ImcChangeCounter { get; set; }
|
||||||
|
|
||||||
/// <summary> Increment the number of changes in the effective file list. </summary>
|
/// <summary> Increment the number of changes in the effective file list. </summary>
|
||||||
public int IncrementCounter()
|
public int IncrementCounter()
|
||||||
=> ++ChangeCounter;
|
=> ++ChangeCounter;
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ public static class PathDataHandler
|
||||||
/// <summary> Create the encoding path for an IMC file. </summary>
|
/// <summary> Create the encoding path for an IMC file. </summary>
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
public static FullPath CreateImc(ByteString path, ModCollection collection)
|
public static FullPath CreateImc(ByteString path, ModCollection collection)
|
||||||
=> CreateBase(path, collection);
|
=> new($"|{collection.LocalId.Id}_{collection.ImcChangeCounter}_{DiscriminatorString}|{path}");
|
||||||
|
|
||||||
/// <summary> Create the encoding path for a TMB file. </summary>
|
/// <summary> Create the encoding path for a TMB file. </summary>
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue