mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-14 12:44:16 +01:00
feat: add GameData.HasModifiedGameDataFiles
This commit is contained in:
parent
987ff8dc8f
commit
02f90899a3
1 changed files with 33 additions and 0 deletions
|
|
@ -84,6 +84,19 @@ public sealed class DataManager : IDisposable, IServiceType
|
||||||
}
|
}
|
||||||
|
|
||||||
Log.Information("Lumina is ready: {0}", this.GameData.DataPath);
|
Log.Information("Lumina is ready: {0}", this.GameData.DataPath);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var tsInfo =
|
||||||
|
JsonConvert.DeserializeObject<LauncherTroubleshootingInfo>(
|
||||||
|
dalamudStartInfo.TroubleshootingPackData);
|
||||||
|
this.HasModifiedGameDataFiles =
|
||||||
|
tsInfo?.IndexIntegrity is LauncherTroubleshootingInfo.IndexIntegrityResult.Failed or LauncherTroubleshootingInfo.IndexIntegrityResult.Exception;
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
// ignored
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.IsDataReady = true;
|
this.IsDataReady = true;
|
||||||
|
|
@ -144,6 +157,11 @@ public sealed class DataManager : IDisposable, IServiceType
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsDataReady { get; private set; }
|
public bool IsDataReady { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets a value indicating whether the game data files have been modified by another third-party tool.
|
||||||
|
/// </summary>
|
||||||
|
public bool HasModifiedGameDataFiles { get; private set; }
|
||||||
|
|
||||||
#region Lumina Wrappers
|
#region Lumina Wrappers
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -345,4 +363,19 @@ public sealed class DataManager : IDisposable, IServiceType
|
||||||
{
|
{
|
||||||
this.luminaCancellationTokenSource.Cancel();
|
this.luminaCancellationTokenSource.Cancel();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private class LauncherTroubleshootingInfo
|
||||||
|
{
|
||||||
|
public enum IndexIntegrityResult
|
||||||
|
{
|
||||||
|
Failed,
|
||||||
|
Exception,
|
||||||
|
NoGame,
|
||||||
|
ReferenceNotFound,
|
||||||
|
ReferenceFetchFailure,
|
||||||
|
Success,
|
||||||
|
}
|
||||||
|
|
||||||
|
public IndexIntegrityResult IndexIntegrity { get; set; }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue