forked from aly/qstbak
muffin v7.5.0
This commit is contained in:
parent
afafd5e377
commit
a6481e7b9a
67 changed files with 4281 additions and 2372 deletions
|
|
@ -61,30 +61,45 @@ internal sealed class AlliedSocietyJournalComponent
|
|||
|
||||
public void DrawAlliedSocietyQuests()
|
||||
{
|
||||
using ImRaii.IEndObject endObject = ImRaii.TabItem("Allied Societies");
|
||||
if (!endObject)
|
||||
//IL_000a: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_000f: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0010: Unknown result type (might be due to invalid IL or missing references)
|
||||
TabItemDisposable val = ImRaii.TabItem((ImU8String)"Allied Societies");
|
||||
try
|
||||
{
|
||||
return;
|
||||
}
|
||||
DrawDailyAllowanceHeader();
|
||||
foreach (EAlliedSociety item in from x in Enum.GetValues<EAlliedSociety>()
|
||||
where x != EAlliedSociety.None
|
||||
select x)
|
||||
{
|
||||
List<QuestInfo> list = (from x in _alliedSocietyQuestFunctions.GetAvailableAlliedSocietyQuests(item)
|
||||
select (QuestInfo)_questData.GetQuestInfo(x)).ToList();
|
||||
if (list.Count != 0 && DrawAlliedSocietyHeader(item, list))
|
||||
if (!val)
|
||||
{
|
||||
using (ImRaii.PushIndent())
|
||||
return;
|
||||
}
|
||||
DrawDailyAllowanceHeader();
|
||||
foreach (EAlliedSociety item in from x in Enum.GetValues<EAlliedSociety>()
|
||||
where x != EAlliedSociety.None
|
||||
select x)
|
||||
{
|
||||
List<QuestInfo> list = (from x in _alliedSocietyQuestFunctions.GetAvailableAlliedSocietyQuests(item)
|
||||
select (QuestInfo)_questData.GetQuestInfo(x)).ToList();
|
||||
if (list.Count != 0 && DrawAlliedSocietyHeader(item, list))
|
||||
{
|
||||
DrawAddToPriorityButtons(item, list);
|
||||
ImGui.Spacing();
|
||||
ImGui.Separator();
|
||||
ImGui.Spacing();
|
||||
DrawQuestList(item, list);
|
||||
IndentDisposable val2 = ImRaii.PushIndent(1, true);
|
||||
try
|
||||
{
|
||||
DrawAddToPriorityButtons(item, list);
|
||||
ImGui.Spacing();
|
||||
ImGui.Separator();
|
||||
ImGui.Spacing();
|
||||
DrawQuestList(item, list);
|
||||
}
|
||||
finally
|
||||
{
|
||||
((IDisposable)val2)?.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
((TabItemDisposable)(ref val)).Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
private unsafe void DrawDailyAllowanceHeader()
|
||||
|
|
@ -271,10 +286,15 @@ internal sealed class AlliedSocietyJournalComponent
|
|||
|
||||
private static void DrawDisabledAddButton()
|
||||
{
|
||||
using (ImRaii.Disabled(disabled: true))
|
||||
DisabledDisposable val = ImRaii.Disabled(true);
|
||||
try
|
||||
{
|
||||
ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Plus, "Add to Priority");
|
||||
}
|
||||
finally
|
||||
{
|
||||
((IDisposable)val)?.Dispose();
|
||||
}
|
||||
if (ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled))
|
||||
{
|
||||
ImGui.SetTooltip("No quests available to add (may be disabled, already in priority, or not available)");
|
||||
|
|
@ -284,7 +304,8 @@ internal sealed class AlliedSocietyJournalComponent
|
|||
private void DrawArrSocietyButtons(EAlliedSociety alliedSociety, List<QuestInfo> availableQuests, int dailyLimit, int remainingAllowances)
|
||||
{
|
||||
int num = Math.Min(Math.Min(dailyLimit, remainingAllowances), availableQuests.Count);
|
||||
using (ImRaii.Disabled(remainingAllowances == 0))
|
||||
DisabledDisposable val = ImRaii.Disabled(remainingAllowances == 0);
|
||||
try
|
||||
{
|
||||
if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Plus, num switch
|
||||
{
|
||||
|
|
@ -297,6 +318,10 @@ internal sealed class AlliedSocietyJournalComponent
|
|||
AddQuestsToPriority(alliedSociety, availableQuests.Take(num).ToList());
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
((IDisposable)val)?.Dispose();
|
||||
}
|
||||
if (ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled))
|
||||
{
|
||||
DrawRecommendedButtonTooltip(num, remainingAllowances, dailyLimit, alliedSociety, availableQuests.Count);
|
||||
|
|
@ -317,7 +342,8 @@ internal sealed class AlliedSocietyJournalComponent
|
|||
ImGui.BeginTooltip();
|
||||
if (remainingAllowances == 0)
|
||||
{
|
||||
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudRed))
|
||||
ColorDisposable val = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudRed, true);
|
||||
try
|
||||
{
|
||||
ImU8String text = new ImU8String(0, 1);
|
||||
text.AppendFormatted(SeIconChar.Cross.ToIconString());
|
||||
|
|
@ -325,6 +351,10 @@ internal sealed class AlliedSocietyJournalComponent
|
|||
ImGui.SameLine();
|
||||
ImGui.TextUnformatted("No daily allowances remaining");
|
||||
}
|
||||
finally
|
||||
{
|
||||
((IDisposable)val)?.Dispose();
|
||||
}
|
||||
Vector4 col = ImGuiColors.DalamudGrey3;
|
||||
ImU8String text2 = new ImU8String(44, 1);
|
||||
text2.AppendLiteral("You've used all ");
|
||||
|
|
@ -334,7 +364,8 @@ internal sealed class AlliedSocietyJournalComponent
|
|||
}
|
||||
else if (questsToAddCount == remainingAllowances && questsToAddCount < availableCount)
|
||||
{
|
||||
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGreen))
|
||||
ColorDisposable val = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGreen, true);
|
||||
try
|
||||
{
|
||||
ImU8String text3 = new ImU8String(0, 1);
|
||||
text3.AppendFormatted(SeIconChar.QuestSync.ToIconString());
|
||||
|
|
@ -347,6 +378,10 @@ internal sealed class AlliedSocietyJournalComponent
|
|||
text4.AppendFormatted((questsToAddCount == 1) ? "quest" : "quests");
|
||||
ImGui.TextUnformatted(text4);
|
||||
}
|
||||
finally
|
||||
{
|
||||
((IDisposable)val)?.Dispose();
|
||||
}
|
||||
Vector4 col = ImGuiColors.DalamudGrey3;
|
||||
ImU8String text5 = new ImU8String(44, 2);
|
||||
text5.AppendLiteral("You can complete ");
|
||||
|
|
@ -360,7 +395,8 @@ internal sealed class AlliedSocietyJournalComponent
|
|||
}
|
||||
else if (questsToAddCount == dailyLimit)
|
||||
{
|
||||
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGreen))
|
||||
ColorDisposable val = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGreen, true);
|
||||
try
|
||||
{
|
||||
ImU8String text6 = new ImU8String(0, 1);
|
||||
text6.AppendFormatted(SeIconChar.QuestSync.ToIconString());
|
||||
|
|
@ -372,6 +408,10 @@ internal sealed class AlliedSocietyJournalComponent
|
|||
text7.AppendLiteral(" quests");
|
||||
ImGui.TextUnformatted(text7);
|
||||
}
|
||||
finally
|
||||
{
|
||||
((IDisposable)val)?.Dispose();
|
||||
}
|
||||
Vector4 col = ImGuiColors.DalamudGrey3;
|
||||
ImU8String text8 = new ImU8String(51, 2);
|
||||
text8.AppendLiteral("This will use ");
|
||||
|
|
@ -385,7 +425,8 @@ internal sealed class AlliedSocietyJournalComponent
|
|||
}
|
||||
else if (questsToAddCount == availableCount)
|
||||
{
|
||||
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGreen))
|
||||
ColorDisposable val = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGreen, true);
|
||||
try
|
||||
{
|
||||
ImU8String text9 = new ImU8String(0, 1);
|
||||
text9.AppendFormatted(SeIconChar.QuestSync.ToIconString());
|
||||
|
|
@ -400,6 +441,10 @@ internal sealed class AlliedSocietyJournalComponent
|
|||
text10.AppendFormatted((questsToAddCount == 1) ? "quest" : "quests");
|
||||
ImGui.TextUnformatted(text10);
|
||||
}
|
||||
finally
|
||||
{
|
||||
((IDisposable)val)?.Dispose();
|
||||
}
|
||||
Vector4 col = ImGuiColors.DalamudGrey3;
|
||||
ImU8String text11 = new ImU8String(37, 2);
|
||||
text11.AppendLiteral("Uses ");
|
||||
|
|
@ -413,7 +458,8 @@ internal sealed class AlliedSocietyJournalComponent
|
|||
}
|
||||
else
|
||||
{
|
||||
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudYellow))
|
||||
ColorDisposable val = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudYellow, true);
|
||||
try
|
||||
{
|
||||
ImU8String text12 = new ImU8String(0, 1);
|
||||
text12.AppendFormatted(SeIconChar.BoxedLetterQ.ToIconString());
|
||||
|
|
@ -428,6 +474,10 @@ internal sealed class AlliedSocietyJournalComponent
|
|||
text13.AppendFormatted((questsToAddCount == 1) ? "quest" : "quests");
|
||||
ImGui.TextUnformatted(text13);
|
||||
}
|
||||
finally
|
||||
{
|
||||
((IDisposable)val)?.Dispose();
|
||||
}
|
||||
Vector4 col = ImGuiColors.DalamudGrey3;
|
||||
ImU8String text14 = new ImU8String(55, 2);
|
||||
text14.AppendLiteral("Limited by available quests (");
|
||||
|
|
@ -447,7 +497,8 @@ internal sealed class AlliedSocietyJournalComponent
|
|||
ImGui.BeginTooltip();
|
||||
if (availableCount > remainingAllowances)
|
||||
{
|
||||
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudOrange))
|
||||
ColorDisposable val = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudOrange, true);
|
||||
try
|
||||
{
|
||||
ImU8String text = new ImU8String(0, 1);
|
||||
text.AppendFormatted(SeIconChar.Cross.ToIconString());
|
||||
|
|
@ -455,6 +506,10 @@ internal sealed class AlliedSocietyJournalComponent
|
|||
ImGui.SameLine();
|
||||
ImGui.TextUnformatted("Warning: Exceeds remaining allowances");
|
||||
}
|
||||
finally
|
||||
{
|
||||
((IDisposable)val)?.Dispose();
|
||||
}
|
||||
ImGui.Spacing();
|
||||
ImU8String text2 = new ImU8String(54, 1);
|
||||
text2.AppendLiteral("This adds all ");
|
||||
|
|
@ -473,7 +528,8 @@ internal sealed class AlliedSocietyJournalComponent
|
|||
}
|
||||
else if (availableCount > dailyLimit)
|
||||
{
|
||||
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudOrange))
|
||||
ColorDisposable val = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudOrange, true);
|
||||
try
|
||||
{
|
||||
ImU8String text4 = new ImU8String(0, 1);
|
||||
text4.AppendFormatted(SeIconChar.Cross.ToIconString());
|
||||
|
|
@ -481,6 +537,10 @@ internal sealed class AlliedSocietyJournalComponent
|
|||
ImGui.SameLine();
|
||||
ImGui.TextUnformatted("Warning: Exceeds daily optimal amount");
|
||||
}
|
||||
finally
|
||||
{
|
||||
((IDisposable)val)?.Dispose();
|
||||
}
|
||||
ImGui.Spacing();
|
||||
ImU8String text5 = new ImU8String(32, 1);
|
||||
text5.AppendLiteral("This adds all ");
|
||||
|
|
@ -503,7 +563,8 @@ internal sealed class AlliedSocietyJournalComponent
|
|||
}
|
||||
else
|
||||
{
|
||||
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGreen))
|
||||
ColorDisposable val = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGreen, true);
|
||||
try
|
||||
{
|
||||
ImU8String text8 = new ImU8String(0, 1);
|
||||
text8.AppendFormatted(SeIconChar.QuestSync.ToIconString());
|
||||
|
|
@ -518,6 +579,10 @@ internal sealed class AlliedSocietyJournalComponent
|
|||
text9.AppendFormatted((availableCount == 1) ? "quest" : "quests");
|
||||
ImGui.TextUnformatted(text9);
|
||||
}
|
||||
finally
|
||||
{
|
||||
((IDisposable)val)?.Dispose();
|
||||
}
|
||||
ImGui.Spacing();
|
||||
Vector4 col = ImGuiColors.DalamudGrey3;
|
||||
ImU8String text10 = new ImU8String(27, 2);
|
||||
|
|
@ -561,7 +626,8 @@ internal sealed class AlliedSocietyJournalComponent
|
|||
ImGui.Spacing();
|
||||
if (availableQuests.Count <= remainingAllowances)
|
||||
{
|
||||
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGreen))
|
||||
ColorDisposable val = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGreen, true);
|
||||
try
|
||||
{
|
||||
ImU8String text2 = new ImU8String(0, 1);
|
||||
text2.AppendFormatted(SeIconChar.QuestSync.ToIconString());
|
||||
|
|
@ -576,11 +642,16 @@ internal sealed class AlliedSocietyJournalComponent
|
|||
text3.AppendFormatted((remainingAllowances == 1) ? "allowance" : "allowances");
|
||||
ImGui.TextUnformatted(text3);
|
||||
}
|
||||
finally
|
||||
{
|
||||
((IDisposable)val)?.Dispose();
|
||||
}
|
||||
ImGui.TextColored(ImGuiColors.DalamudGrey3, "All can be completed today");
|
||||
}
|
||||
else
|
||||
{
|
||||
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudOrange))
|
||||
ColorDisposable val = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudOrange, true);
|
||||
try
|
||||
{
|
||||
ImU8String text4 = new ImU8String(0, 1);
|
||||
text4.AppendFormatted(SeIconChar.Cross.ToIconString());
|
||||
|
|
@ -592,6 +663,10 @@ internal sealed class AlliedSocietyJournalComponent
|
|||
text5.AppendLiteral(")");
|
||||
ImGui.TextUnformatted(text5);
|
||||
}
|
||||
finally
|
||||
{
|
||||
((IDisposable)val)?.Dispose();
|
||||
}
|
||||
ImGui.TextColored(ImGuiColors.DalamudGrey3, "Some quests won't be completable until tomorrow");
|
||||
}
|
||||
ImGui.EndTooltip();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue