muffin v7.4.7

This commit is contained in:
alydev 2025-12-28 12:35:39 +10:00
parent 1cc65e495d
commit 63f975ff4f
16 changed files with 1659 additions and 939 deletions

View file

@ -39,29 +39,27 @@ internal sealed class DutyConfigComponent : ConfigComponent
private readonly Dictionary<EExpansionVersion, List<DutyInfo>> _allTrialNames;
private readonly Dictionary<EExpansionVersion, List<DutyInfo>> _allNormalRaidNames;
private readonly Dictionary<EExpansionVersion, List<DutyInfo>> _allAllianceRaidNames;
public DutyConfigComponent(IDalamudPluginInterface pluginInterface, Configuration configuration, IDataManager dataManager, QuestRegistry questRegistry, AutoDutyIpc autoDutyIpc, TerritoryData territoryData)
: base(pluginInterface, configuration)
{
_questRegistry = questRegistry;
_autoDutyIpc = autoDutyIpc;
var source = (from x in dataManager.GetExcelSheet<DawnContent>()
where x.RowId != 0 && !x.Unknown16
orderby x.Unknown15
select x.Content.ValueNullable into x
where x.HasValue
select x.Value into x
_contentFinderConditionNames = (from x in dataManager.GetExcelSheet<ContentFinderCondition>()
where x.RowId != 0 && x.Content.RowId != 0 && x.ContentType.RowId == 2
select new
{
Expansion = (EExpansionVersion)x.TerritoryType.Value.ExVersion.RowId,
CfcId = x.RowId,
Name = (territoryData.GetContentFinderCondition(x.RowId)?.Name ?? "?"),
Name = (territoryData.GetContentFinderCondition(x.RowId)?.Name ?? x.Name.ToDalamudString().ToString()),
TerritoryId = x.TerritoryType.RowId,
ContentType = x.ContentType.RowId,
Level = x.ClassJobLevelRequired,
SortKey = x.SortKey
}).ToList();
_contentFinderConditionNames = (from x in source
where x.ContentType == 2
} into x
orderby x.SortKey
group x by x.Expansion).ToDictionary(x => x.Key, x => x.Select(y => new DutyInfo(y.CfcId, y.TerritoryId, ConfigComponent.FormatLevel(y.Level) + " " + y.Name)).ToList());
_allTrialNames = (from x in dataManager.GetExcelSheet<ContentFinderCondition>()
where x.RowId != 0 && x.Content.RowId != 0 && x.ContentType.RowId == 4
@ -76,6 +74,34 @@ internal sealed class DutyConfigComponent : ConfigComponent
} into x
orderby x.SortKey
group x by x.Expansion).ToDictionary(x => x.Key, x => x.Select(y => new DutyInfo(y.CfcId, y.TerritoryId, ConfigComponent.FormatLevel(y.Level) + " " + y.Name)).ToList());
_allNormalRaidNames = (from x in dataManager.GetExcelSheet<ContentFinderCondition>()
where x.RowId != 0 && x.Content.RowId != 0 && x.ContentType.RowId == 5
where x.ContentMemberType.RowId == 3
select new
{
Expansion = (EExpansionVersion)x.TerritoryType.Value.ExVersion.RowId,
CfcId = x.RowId,
Name = (territoryData.GetContentFinderCondition(x.RowId)?.Name ?? x.Name.ToDalamudString().ToString()),
TerritoryId = x.TerritoryType.RowId,
Level = x.ClassJobLevelRequired,
SortKey = x.SortKey
} into x
orderby x.SortKey
group x by x.Expansion).ToDictionary(x => x.Key, x => x.Select(y => new DutyInfo(y.CfcId, y.TerritoryId, ConfigComponent.FormatLevel(y.Level) + " " + y.Name)).ToList());
_allAllianceRaidNames = (from x in dataManager.GetExcelSheet<ContentFinderCondition>()
where x.RowId != 0 && x.Content.RowId != 0 && x.ContentType.RowId == 5
where x.ContentMemberType.RowId == 4
select new
{
Expansion = (EExpansionVersion)x.TerritoryType.Value.ExVersion.RowId,
CfcId = x.RowId,
Name = (territoryData.GetContentFinderCondition(x.RowId)?.Name ?? x.Name.ToDalamudString().ToString()),
TerritoryId = x.TerritoryType.RowId,
Level = x.ClassJobLevelRequired,
SortKey = x.SortKey
} into x
orderby x.SortKey
group x by x.Expansion).ToDictionary(x => x.Key, x => x.Select(y => new DutyInfo(y.CfcId, y.TerritoryId, ConfigComponent.FormatLevel(y.Level) + " " + y.Name)).ToList());
}
public override void DrawTab()
@ -106,6 +132,15 @@ internal sealed class DutyConfigComponent : ConfigComponent
}
}
ImGui.Spacing();
bool v2 = base.Configuration.Duties.RunLevelingModeWhenUnderleveled;
if (ImGui.Checkbox("Run AutoDuty Leveling mode when underleveled for MSQ", ref v2))
{
base.Configuration.Duties.RunLevelingModeWhenUnderleveled = v2;
Save();
}
ImGui.SameLine();
ImGuiComponents.HelpMarker("When enabled, Questionable will automatically run AutoDuty's Leveling mode when your character is underleveled for the next Main Scenario Quest.\n\nLeveling mode runs the highest available dungeon for your level to gain XP.\n\nThis is useful for characters without the Road to 90 XP buff who may not have enough XP to continue the MSQ.");
ImGui.Spacing();
ImGui.Text("Default duty mode:");
ImGui.SameLine();
int currentItem = (int)base.Configuration.Duties.DefaultDutyMode;
@ -128,7 +163,7 @@ internal sealed class DutyConfigComponent : ConfigComponent
Util.OpenLink("https://docs.google.com/spreadsheets/d/151RlpqRcCpiD_VbQn6Duf-u-S71EP7d0mx3j1PDNoNA/edit?pli=1#gid=0");
}
ImGui.Separator();
ImGui.Text("You can override the settings for each individual dungeon/trial:");
ImGui.Text("You can override the settings for each individual duty:");
using ImRaii.IEndObject endObject2 = ImRaii.TabBar("DutyTypeTabs");
if (endObject2)
{
@ -139,10 +174,24 @@ internal sealed class DutyConfigComponent : ConfigComponent
DrawConfigTable(v, _contentFinderConditionNames);
}
}
using ImRaii.IEndObject endObject4 = ImRaii.TabItem("Trials");
if (endObject4)
using (ImRaii.IEndObject endObject4 = ImRaii.TabItem("Trials"))
{
DrawConfigTable(v, _allTrialNames);
if (endObject4)
{
DrawConfigTable(v, _allTrialNames);
}
}
using (ImRaii.IEndObject endObject5 = ImRaii.TabItem("Normal Raids"))
{
if (endObject5)
{
DrawConfigTable(v, _allNormalRaidNames);
}
}
using ImRaii.IEndObject endObject6 = ImRaii.TabItem("Alliance Raids");
if (endObject6)
{
DrawConfigTable(v, _allAllianceRaidNames);
}
}
DrawEnableAllButton();
@ -375,7 +424,7 @@ internal sealed class DutyConfigComponent : ConfigComponent
{
base.Configuration.Duties.BlacklistedDutyCfcIds.Clear();
base.Configuration.Duties.WhitelistedDutyCfcIds.Clear();
foreach (List<DutyInfo> item2 in _contentFinderConditionNames.Values.Concat<List<DutyInfo>>(_allTrialNames.Values))
foreach (List<DutyInfo> item2 in _contentFinderConditionNames.Values.Concat<List<DutyInfo>>(_allTrialNames.Values).Concat<List<DutyInfo>>(_allNormalRaidNames.Values).Concat<List<DutyInfo>>(_allAllianceRaidNames.Values))
{
foreach (var (item, _, _) in item2)
{