Add support for MKDLore rows

This commit is contained in:
Haselnussbomber 2025-10-18 02:50:38 +02:00
parent 193d321103
commit 880add5ab3
No known key found for this signature in database
GPG key ID: BB905BB49E7295D1
2 changed files with 20 additions and 0 deletions

View file

@ -309,6 +309,12 @@ internal unsafe class UnlockState : IInternalDisposableService, IUnlockState
return this.IsUnlockLinkUnlocked(row.UnlockLink);
}
/// <inheritdoc/>
public bool IsMKDLoreUnlocked(MKDLore row)
{
return this.IsUnlockLinkUnlocked(row.Unknown2);
}
/// <inheritdoc/>
public bool IsMountUnlocked(Mount row)
{
@ -493,6 +499,9 @@ internal unsafe class UnlockState : IInternalDisposableService, IUnlockState
if (rowRef.TryGetValue<MJILandmark>(out var mjiLandmarkRow))
return this.IsMJILandmarkUnlocked(mjiLandmarkRow);
if (rowRef.TryGetValue<MKDLore>(out var mkdLoreRow))
return this.IsMKDLoreUnlocked(mkdLoreRow);
if (rowRef.TryGetValue<McGuffin>(out var mcGuffinRow))
return this.IsMcGuffinUnlocked(mcGuffinRow);
@ -599,6 +608,7 @@ internal unsafe class UnlockState : IInternalDisposableService, IUnlockState
this.UpdateUnlocksForSheet<InstanceContentSheet>(fireEvent);
this.UpdateUnlocksForSheet<Item>(fireEvent);
this.UpdateUnlocksForSheet<MJILandmark>(fireEvent);
this.UpdateUnlocksForSheet<MKDLore>(fireEvent);
this.UpdateUnlocksForSheet<McGuffin>(fireEvent);
this.UpdateUnlocksForSheet<Mount>(fireEvent);
this.UpdateUnlocksForSheet<NotebookDivision>(fireEvent);
@ -772,6 +782,9 @@ internal class UnlockStatePluginScoped : IInternalDisposableService, IUnlockStat
/// <inheritdoc/>
public bool IsMJILandmarkUnlocked(MJILandmark row) => this.unlockStateService.IsMJILandmarkUnlocked(row);
/// <inheritdoc/>
public bool IsMKDLoreUnlocked(MKDLore row) => this.unlockStateService.IsMKDLoreUnlocked(row);
/// <inheritdoc/>
public bool IsMountUnlocked(Mount row) => this.unlockStateService.IsMountUnlocked(row);

View file

@ -206,6 +206,13 @@ public interface IUnlockState
/// <returns><see langword="true"/> if unlocked; otherwise, <see langword="false"/>.</returns>
bool IsMJILandmarkUnlocked(MJILandmark row);
/// <summary>
/// Determines whether the specified MKDLore (Occult Record) is unlocked.
/// </summary>
/// <param name="row">The MKDLore row to check.</param>
/// <returns><see langword="true"/> if unlocked; otherwise, <see langword="false"/>.</returns>
bool IsMKDLoreUnlocked(MKDLore row);
/// <summary>
/// Determines whether the specified Mount is unlocked.
/// </summary>