Harden retail character selection recovery
This commit is contained in:
parent
6cfab727f1
commit
aeac874dab
8 changed files with 736 additions and 81 deletions
|
|
@ -15,12 +15,9 @@ namespace AcDream.App.Tests.UI.Layout;
|
|||
/// </summary>
|
||||
public sealed class CharacterManagementLiveDatTests
|
||||
{
|
||||
[Fact]
|
||||
[InstalledDatFact]
|
||||
public void EnumTable5_ResolvesAndImportsTheExactRetailScreenAndDialogs()
|
||||
{
|
||||
if (Environment.GetEnvironmentVariable("ACDREAM_PROBE_LIVE_MOUNT") != "1")
|
||||
return;
|
||||
|
||||
string datDirectory = Environment.GetEnvironmentVariable("ACDREAM_DAT_DIR")
|
||||
?? Path.Combine(
|
||||
Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),
|
||||
|
|
@ -162,3 +159,23 @@ public sealed class CharacterManagementLiveDatTests
|
|||
yield return descendant;
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class InstalledDatFactAttribute : FactAttribute
|
||||
{
|
||||
public InstalledDatFactAttribute()
|
||||
{
|
||||
if (Environment.GetEnvironmentVariable("ACDREAM_PROBE_LIVE_MOUNT") != "1")
|
||||
{
|
||||
Skip = "Set ACDREAM_PROBE_LIVE_MOUNT=1 to run the installed-DAT LA8 gate.";
|
||||
return;
|
||||
}
|
||||
|
||||
string datDirectory = Environment.GetEnvironmentVariable("ACDREAM_DAT_DIR")
|
||||
?? Path.Combine(
|
||||
Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),
|
||||
"Documents",
|
||||
"Asheron's Call");
|
||||
if (!File.Exists(Path.Combine(datDirectory, "client_portal.dat")))
|
||||
Skip = $"Installed client_portal.dat is required at '{datDirectory}'.";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue