Move Validating outside of main class.

This commit is contained in:
Ottermandias 2023-03-10 15:16:38 +01:00
parent 8ce52b7028
commit 23c1ee9dc6
4 changed files with 115 additions and 101 deletions

View file

@ -86,21 +86,21 @@ public sealed partial class ConfigWindow : Window, IDisposable
try
{
if( Penumbra.ImcExceptions.Count > 0 )
if( Penumbra.ValidityChecker.ImcExceptions.Count > 0 )
{
DrawProblemWindow( $"There were {Penumbra.ImcExceptions.Count} errors while trying to load IMC files from the game data.\n"
DrawProblemWindow( $"There were {Penumbra.ValidityChecker.ImcExceptions.Count} errors while trying to load IMC files from the game data.\n"
+ "This usually means that your game installation was corrupted by updating the game while having TexTools mods still active.\n"
+ "It is recommended to not use TexTools and Penumbra (or other Lumina-based tools) at the same time.\n\n"
+ "Please use the Launcher's Repair Game Files function to repair your client installation.", true );
}
else if( !Penumbra.IsValidSourceRepo )
else if( !Penumbra.ValidityChecker.IsValidSourceRepo )
{
DrawProblemWindow(
$"You are loading a release version of Penumbra from the repository \"{Dalamud.PluginInterface.SourceRepository}\" instead of the official repository.\n"
+ $"Please use the official repository at {Penumbra.Repository}.\n\n"
+ $"Please use the official repository at {ValidityChecker.Repository}.\n\n"
+ "If you are developing for Penumbra and see this, you should compile your version in debug mode to avoid it.", false );
}
else if( Penumbra.IsNotInstalledPenumbra )
else if( Penumbra.ValidityChecker.IsNotInstalledPenumbra )
{
DrawProblemWindow(
$"You are loading a release version of Penumbra from \"{Dalamud.PluginInterface.AssemblyLocation.Directory?.FullName ?? "Unknown"}\" instead of the installedPlugins directory.\n\n"
@ -108,7 +108,7 @@ public sealed partial class ConfigWindow : Window, IDisposable
+ "If you do not know how to do this, please take a look at the readme in Penumbras github repository or join us in discord.\n"
+ "If you are developing for Penumbra and see this, you should compile your version in debug mode to avoid it.", false );
}
else if( Penumbra.DevPenumbraExists )
else if( Penumbra.ValidityChecker.DevPenumbraExists )
{
DrawProblemWindow(
$"You are loading a installed version of Penumbra from \"{Dalamud.PluginInterface.AssemblyLocation.Directory?.FullName ?? "Unknown"}\", "
@ -153,7 +153,7 @@ public sealed partial class ConfigWindow : Window, IDisposable
ImGui.TextUnformatted( "Exceptions" );
ImGui.Separator();
using var box = ImRaii.ListBox( "##Exceptions", new Vector2( -1, -1 ) );
foreach( var exception in Penumbra.ImcExceptions )
foreach( var exception in Penumbra.ValidityChecker.ImcExceptions )
{
ImGuiUtil.TextWrapped( exception.ToString() );
ImGui.Separator();