1
0
Fork 0
forked from aly/qstbak

muffin v7.5.1

This commit is contained in:
alydev 2026-05-01 08:59:48 +10:00
parent a6481e7b9a
commit 965a736f84
59 changed files with 4112 additions and 5059 deletions

View file

@ -41,7 +41,6 @@ internal sealed class FateSelectionWindow : LWindow
public FateSelectionWindow(FateController fateController, FateDefinitionRegistry fateDefinitionRegistry, QuestController questController, MovementController movementController, QuestFunctions questFunctions, QuestData questData, TerritoryData territoryData)
: base("FATE Farming###QuestionableFateFarming")
{
//IL_0097: Unknown result type (might be due to invalid IL or missing references)
_fateController = fateController;
_fateDefinitionRegistry = fateDefinitionRegistry;
_questController = questController;
@ -51,11 +50,11 @@ internal sealed class FateSelectionWindow : LWindow
_territoryData = territoryData;
base.Size = new Vector2(600f, 400f);
base.SizeCondition = ImGuiCond.FirstUseEver;
WindowSizeConstraints value = default(WindowSizeConstraints);
((WindowSizeConstraints)(ref value))._002Ector();
((WindowSizeConstraints)(ref value)).MinimumSize = new Vector2(500f, 300f);
((WindowSizeConstraints)(ref value)).MaximumSize = new Vector2(900f, 700f);
((Window)this).SizeConstraints = value;
base.SizeConstraints = new WindowSizeConstraints
{
MinimumSize = new Vector2(500f, 300f),
MaximumSize = new Vector2(900f, 700f)
};
}
public override void DrawContent()
@ -91,26 +90,18 @@ internal sealed class FateSelectionWindow : LWindow
float num2 = (float)ImGui.GetTime();
float num3 = 0.85f + MathF.Sin(num2 * 3f) * 0.15f;
Vector4 col = new Vector4(1f * num3, 0.85f * num3, 0f, 1f);
FontDisposable val = ImRaii.PushFont(UiBuilder.IconFont, true);
try
using (ImRaii.PushFont(UiBuilder.IconFont))
{
ImGui.TextColored(in col, FontAwesomeIcon.Star.ToIconString());
}
finally
{
((IDisposable)val)?.Dispose();
}
ImGui.SameLine();
ImGui.TextColored(ImGuiColors.ParsedGold, _fateController.CurrentFate.Name);
ImGui.SameLine(x - 35f);
ColorDisposable val2 = ImRaii.PushColor(ImGuiCol.Button, Vector4.Zero, true);
try
using (ImRaii.PushColor(ImGuiCol.Button, Vector4.Zero))
{
ColorDisposable val3 = ImRaii.PushColor(ImGuiCol.ButtonHovered, new Vector4(0.8f, 0.3f, 0.3f, 0.4f), true);
try
using (ImRaii.PushColor(ImGuiCol.ButtonHovered, new Vector4(0.8f, 0.3f, 0.3f, 0.4f)))
{
ColorDisposable val4 = ImRaii.PushColor(ImGuiCol.ButtonActive, new Vector4(0.9f, 0.2f, 0.2f, 0.6f), true);
try
using (ImRaii.PushColor(ImGuiCol.ButtonActive, new Vector4(0.9f, 0.2f, 0.2f, 0.6f)))
{
if (ImGuiComponents.IconButton(FontAwesomeIcon.Stop))
{
@ -118,19 +109,7 @@ internal sealed class FateSelectionWindow : LWindow
_movementController.Stop();
}
}
finally
{
((IDisposable)val4)?.Dispose();
}
}
finally
{
((IDisposable)val3)?.Dispose();
}
}
finally
{
((IDisposable)val2)?.Dispose();
}
ImGui.SetCursorPosX(ImGui.GetCursorPosX() + 8f);
string value = (_fateController.CycleLimit.HasValue ? $"Cycle {_fateController.CompletedCycles + 1} / {_fateController.CycleLimit}" : $"Cycle {_fateController.CompletedCycles + 1}");
@ -158,8 +137,7 @@ internal sealed class FateSelectionWindow : LWindow
ImGui.TextColored(in col2, text3);
}
ImGui.SetCursorPosX(ImGui.GetCursorPosX() + 8f);
DisabledDisposable val5 = ImRaii.Disabled(true);
try
using (ImRaii.Disabled(disabled: true))
{
ImGui.AlignTextToFramePadding();
ImGui.TextUnformatted("Cycles:");
@ -167,18 +145,13 @@ internal sealed class FateSelectionWindow : LWindow
ImGui.SetNextItemWidth(100f);
ImGui.InputInt("##CycleLimitRunning", ref _cycleLimit, 1, 5);
}
finally
{
((IDisposable)val5)?.Dispose();
}
ImGui.SetCursorPosY(cursorScreenPos.Y + num - ImGui.GetCursorScreenPos().Y + ImGui.GetCursorPosY() + 4f);
ImGui.Spacing();
}
private void DrawControlsStrip()
{
DisabledDisposable val = ImRaii.Disabled(_fateController.IsRunning);
try
using (ImRaii.Disabled(_fateController.IsRunning))
{
ImGui.AlignTextToFramePadding();
ImGui.TextUnformatted("Cycles:");
@ -192,10 +165,6 @@ internal sealed class FateSelectionWindow : LWindow
ImGui.SameLine();
ImGui.TextColored(ImGuiColors.DalamudGrey, (_cycleLimit == 0) ? "(unlimited)" : "");
}
finally
{
((IDisposable)val)?.Dispose();
}
ImGui.Spacing();
}
@ -237,9 +206,6 @@ internal sealed class FateSelectionWindow : LWindow
private void DrawFateTable()
{
//IL_0097: Unknown result type (might be due to invalid IL or missing references)
//IL_009c: Unknown result type (might be due to invalid IL or missing references)
//IL_009d: Unknown result type (might be due to invalid IL or missing references)
List<FateDefinition> list = _fateDefinitionRegistry.Definitions.Values.OrderBy(delegate(FateDefinition f)
{
DateTime? eventExpiry = f.EventExpiry;
@ -267,49 +233,40 @@ internal sealed class FateSelectionWindow : LWindow
return double.MaxValue;
}).ThenBy<FateDefinition, string>((FateDefinition f) => f.Name, StringComparer.OrdinalIgnoreCase)
.ToList();
TableDisposable val = ImRaii.Table((ImU8String)"FateTable", 4, ImGuiTableFlags.SizingStretchProp | ImGuiTableFlags.RowBg | ImGuiTableFlags.BordersInnerH | ImGuiTableFlags.ScrollY);
try
using ImRaii.TableDisposable tableDisposable = ImRaii.Table("FateTable", 4, ImGuiTableFlags.SizingStretchProp | ImGuiTableFlags.RowBg | ImGuiTableFlags.BordersInnerH | ImGuiTableFlags.ScrollY);
if (!tableDisposable)
{
if (!val)
{
return;
}
ImGui.TableSetupColumn("Name", ImGuiTableColumnFlags.None, 3f);
ImGui.TableSetupColumn("Zone", ImGuiTableColumnFlags.None, 2f);
ImGui.TableSetupColumn("Expiry", ImGuiTableColumnFlags.WidthFixed, 80f);
ImGui.TableSetupColumn("##Actions", ImGuiTableColumnFlags.WidthFixed, 30f);
ImGui.TableHeadersRow();
foreach (FateDefinition item in list)
{
ImGui.TableNextRow();
bool flag = _fateController.IsRunning && _fateController.CurrentFate == item;
if (flag)
{
float num = (float)ImGui.GetTime();
float w = 0.1f + MathF.Sin(num * 2.5f) * 0.05f;
ImGui.TableSetBgColor(ImGuiTableBgTarget.RowBg1, ImGui.GetColorU32(new Vector4(1f, 0.85f, 0f, w)));
}
ImGui.TableNextColumn();
DrawFateRowName(item, flag);
ImGui.TableNextColumn();
ImGui.TextUnformatted(_territoryData.GetName(item.TerritoryId) ?? item.Description);
ImGui.TableNextColumn();
DrawFateRowExpiry(item);
ImGui.TableNextColumn();
bool disabled = _fateController.IsRunning || _questController.AutomationType != QuestController.EAutomationType.Manual;
DrawFateRowActions(item, disabled);
}
return;
}
finally
ImGui.TableSetupColumn("Name", ImGuiTableColumnFlags.None, 3f);
ImGui.TableSetupColumn("Zone", ImGuiTableColumnFlags.None, 2f);
ImGui.TableSetupColumn("Expiry", ImGuiTableColumnFlags.WidthFixed, 80f);
ImGui.TableSetupColumn("##Actions", ImGuiTableColumnFlags.WidthFixed, 30f);
ImGui.TableHeadersRow();
foreach (FateDefinition item in list)
{
((TableDisposable)(ref val)).Dispose();
ImGui.TableNextRow();
bool flag = _fateController.IsRunning && _fateController.CurrentFate == item;
if (flag)
{
float num = (float)ImGui.GetTime();
float w = 0.1f + MathF.Sin(num * 2.5f) * 0.05f;
ImGui.TableSetBgColor(ImGuiTableBgTarget.RowBg1, ImGui.GetColorU32(new Vector4(1f, 0.85f, 0f, w)));
}
ImGui.TableNextColumn();
DrawFateRowName(item, flag);
ImGui.TableNextColumn();
ImGui.TextUnformatted(_territoryData.GetName(item.TerritoryId) ?? item.Description);
ImGui.TableNextColumn();
DrawFateRowExpiry(item);
ImGui.TableNextColumn();
bool disabled = _fateController.IsRunning || _questController.AutomationType != QuestController.EAutomationType.Manual;
DrawFateRowActions(item, disabled);
}
}
private void DrawFateRowName(FateDefinition fate, bool isActive)
{
//IL_006f: Unknown result type (might be due to invalid IL or missing references)
//IL_0074: Unknown result type (might be due to invalid IL or missing references)
if (isActive)
{
float num = (float)ImGui.GetTime();
@ -324,8 +281,7 @@ internal sealed class FateSelectionWindow : LWindow
{
return;
}
TooltipDisposable val = ImRaii.Tooltip();
try
using (ImRaii.Tooltip())
{
ImGui.TextColored(ImGuiColors.DalamudWhite, fate.Name);
ImGui.Separator();
@ -360,10 +316,6 @@ internal sealed class FateSelectionWindow : LWindow
}
}
}
finally
{
((TooltipDisposable)(ref val)).Dispose();
}
}
private static void DrawFateRowExpiry(FateDefinition fate)
@ -392,23 +344,17 @@ internal sealed class FateSelectionWindow : LWindow
private void DrawFateRowActions(FateDefinition fate, bool disabled)
{
bool flag = fate.RequiredQuestId.HasValue && !_questFunctions.IsQuestComplete(new QuestId(fate.RequiredQuestId.Value));
ImU8String imU8String = new ImU8String(5, 1);
imU8String.AppendLiteral("fate_");
imU8String.AppendFormatted(fate.Name);
IdDisposable val = ImRaii.PushId(imU8String, true);
try
ImU8String id = new ImU8String(5, 1);
id.AppendLiteral("fate_");
id.AppendFormatted(fate.Name);
using (ImRaii.PushId(id))
{
if (flag)
{
FontDisposable val2 = ImRaii.PushFont(UiBuilder.IconFont, true);
try
using (ImRaii.PushFont(UiBuilder.IconFont))
{
ImGui.TextColored(ImGuiColors.DalamudRed, FontAwesomeIcon.Times.ToIconString());
}
finally
{
((IDisposable)val2)?.Dispose();
}
if (ImGui.IsItemHovered())
{
IQuestInfo questInfo;
@ -421,8 +367,7 @@ internal sealed class FateSelectionWindow : LWindow
}
return;
}
DisabledDisposable val3 = ImRaii.Disabled(disabled);
try
using (ImRaii.Disabled(disabled))
{
if (ImGuiComponents.IconButton(FontAwesomeIcon.Play))
{
@ -432,10 +377,6 @@ internal sealed class FateSelectionWindow : LWindow
_fateController.Start(fate, cycleLimit);
}
}
finally
{
((IDisposable)val3)?.Dispose();
}
if (disabled && ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled))
{
if (_fateController.IsRunning)
@ -448,10 +389,6 @@ internal sealed class FateSelectionWindow : LWindow
}
}
}
finally
{
((IDisposable)val)?.Dispose();
}
}
private static string FormatElapsed(TimeSpan elapsed)