mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-17 05:17:42 +01:00
53 lines
1.1 KiB
C#
53 lines
1.1 KiB
C#
using Dalamud.Bindings.ImGui;
|
|
using Dalamud.Game.ClientState.Fates;
|
|
using Dalamud.Utility;
|
|
|
|
namespace Dalamud.Interface.Internal.Windows.SelfTest.Steps;
|
|
|
|
/// <summary>
|
|
/// Test setup for the Fate Table.
|
|
/// </summary>
|
|
internal class FateTableSelfTestStep : ISelfTestStep
|
|
{
|
|
private byte index = 0;
|
|
|
|
/// <inheritdoc/>
|
|
public string Name => "Test FateTable";
|
|
|
|
/// <inheritdoc/>
|
|
public SelfTestStepResult RunStep()
|
|
{
|
|
var fateTable = Service<FateTable>.Get();
|
|
|
|
ImGui.Text("Checking fate table...");
|
|
|
|
if (fateTable.Length == 0)
|
|
{
|
|
ImGui.Text("Go to a zone that has FATEs currently up.");
|
|
return SelfTestStepResult.Waiting;
|
|
}
|
|
|
|
if (this.index == fateTable.Length - 1)
|
|
{
|
|
return SelfTestStepResult.Pass;
|
|
}
|
|
|
|
var actor = fateTable[this.index];
|
|
this.index++;
|
|
|
|
if (actor == null)
|
|
{
|
|
return SelfTestStepResult.Waiting;
|
|
}
|
|
|
|
Util.ShowObject(actor);
|
|
|
|
return SelfTestStepResult.Waiting;
|
|
}
|
|
|
|
/// <inheritdoc/>
|
|
public void CleanUp()
|
|
{
|
|
// ignored
|
|
}
|
|
}
|