1
0
Fork 0
forked from aly/qstbak

muffin v7.38.1

This commit is contained in:
alydev 2025-11-18 10:16:09 +10:00
parent e5b98b3d57
commit 0336b9c9e9
12 changed files with 4618 additions and 4245 deletions

View file

@ -219,6 +219,9 @@
"CompletionQuestVariablesFlags": {
"$ref": "https://github.com/WigglyMuffin/Questionable/raw/refs/heads/main/Questionable.Model/common-completionflags.json"
},
"RequiredQuestVariables": {
"$ref": "https://github.com/WigglyMuffin/Questionable/raw/refs/heads/main/Questionable.Model/common-requiredvariables.json"
},
"Flying": {
"type": "string",
"enum": [
@ -265,14 +268,14 @@
},
"BetterOrEqualItemEquipped": {
"type": "boolean",
"description": "Skip this step if a better or equal item (by item level) is already equipped in the main hand slot"
"description": "Skip this step if a better or equal item (by item level) is already equipped"
}
},
"additionalProperties": false
},
"MinimumLevel": {
"type": "integer",
"description": "Skip this step if the player level is greater than or equal to this value. Useful for steps that should only be done once at low levels (e.g., early aetheryte attunements).",
"description": "Skip this step if the player level is greater than or equal to this value",
"minimum": 1,
"maximum": 100
},
@ -285,6 +288,15 @@
]
}
},
"QuestsCompleted": {
"type": "array",
"items": {
"type": [
"number",
"string"
]
}
},
"NotNamePlateIconId": {
"type": "array",
"items": {

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.carvel.li//liza/Questionable/raw/refs/heads/main/Questionable.Model/common-classjob.json",
"$id": "https://github.com/WigglyMuffin/Questionable/raw/refs/heads/main/Questionable.Model/common-classjob.json",
"type": "string",
"enum": [
"Gladiator",

View file

@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.carvel.li//liza/Questionable/raw/refs/heads/main/Questionable.Model/common-completionflags.json",
"$id": "https://github.com/WigglyMuffin/Questionable/raw/refs/heads/main/Questionable.Model/common-completionflags.json",
"type": "array",
"description": "Quest Variables that dictate whether or not this step is skipped: null is don't check, positive values need to be set, negative values need to be unset",
"items": {

View file

@ -0,0 +1,40 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/WigglyMuffin/Questionable/raw/refs/heads/main/Questionable.Model/common-requiredvariables.json",
"type": "array",
"description": "Certain quests (primarily beast tribes/allied societies) have a RNG element to spawning targets, and the step should be skipped in its entirety if none of the sets below match",
"minItems": 6,
"maxItems": 6,
"items": {
"type": [
"array",
"null"
],
"items": {
"type": [
"number",
"object"
],
"properties": {
"High": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 15
},
"Low": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 15
}
},
"minimum": 0,
"maximum": 255
}
}
}

View file

@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.carvel.li//liza/Questionable/raw/refs/heads/main/Questionable.Model/common-vector3.json",
"$id": "https://github.com/WigglyMuffin/Questionable/raw/refs/heads/main/Questionable.Model/common-vector3.json",
"type": "object",
"description": "Position in the world",
"properties": {

View file

@ -17,11 +17,13 @@
<None Remove="Questionable.Model.CommonAetheryte" />
<None Remove="Questionable.Model.CommonClassJob" />
<None Remove="Questionable.Model.CommonCompletionFlags" />
<None Remove="Questionable.Model.CommonRequiredVariables" />
<None Remove="Questionable.Model.CommonVector3" />
<EmbeddedResource Include="Questionable.Model.CommonAethernetShard" LogicalName="Questionable.Model.CommonAethernetShard" />
<EmbeddedResource Include="Questionable.Model.CommonAetheryte" LogicalName="Questionable.Model.CommonAetheryte" />
<EmbeddedResource Include="Questionable.Model.CommonClassJob" LogicalName="Questionable.Model.CommonClassJob" />
<EmbeddedResource Include="Questionable.Model.CommonCompletionFlags" LogicalName="Questionable.Model.CommonCompletionFlags" />
<EmbeddedResource Include="Questionable.Model.CommonRequiredVariables" LogicalName="Questionable.Model.CommonRequiredVariables" />
<EmbeddedResource Include="Questionable.Model.CommonVector3" LogicalName="Questionable.Model.CommonVector3" />
</ItemGroup>
<ItemGroup>

View file

@ -12,5 +12,7 @@ public static class AssemblyModelLoader
public static Stream CommonCompletionFlags => typeof(AssemblyModelLoader).Assembly.GetManifestResourceStream("Questionable.Model.CommonCompletionFlags");
public static Stream CommonRequiredVariables => typeof(AssemblyModelLoader).Assembly.GetManifestResourceStream("Questionable.Model.CommonRequiredVariables");
public static Stream CommonVector3 => typeof(AssemblyModelLoader).Assembly.GetManifestResourceStream("Questionable.Model.CommonVector3");
}

View file

@ -29,6 +29,12 @@ internal sealed class ItemUseModule : ICombatModule
private DateTime _continueAt;
private bool _itemUsePending;
private DateTime _itemUsePendingUntil;
private int _lastKnownItemCount;
public ItemUseModule(IServiceProvider serviceProvider, ICondition condition, ILogger<ItemUseModule> logger)
{
_serviceProvider = serviceProvider;
@ -49,13 +55,19 @@ internal sealed class ItemUseModule : ICombatModule
return _delegate != null;
}
public bool Start(CombatController.CombatData combatData)
public unsafe bool Start(CombatController.CombatData combatData)
{
if (_delegate.Start(combatData))
{
_combatData = combatData;
_isDoingRotation = true;
_continueAt = DateTime.Now;
if (_combatData?.CombatItemUse != null)
{
InventoryManager* ptr = InventoryManager.Instance();
_lastKnownItemCount = ptr->GetInventoryItemCount(_combatData.CombatItemUse.ItemId, isHq: false, checkEquipped: true, checkArmory: true, 0);
_itemUsePending = false;
}
return true;
}
return false;
@ -88,16 +100,29 @@ internal sealed class ItemUseModule : ICombatModule
{
if (_isDoingRotation)
{
if (InventoryManager.Instance()->GetInventoryItemCount(_combatData.CombatItemUse.ItemId, isHq: false, checkEquipped: true, checkArmory: true, 0) == 0)
int inventoryItemCount = InventoryManager.Instance()->GetInventoryItemCount(_combatData.CombatItemUse.ItemId, isHq: false, checkEquipped: true, checkArmory: true, 0);
if (_itemUsePending)
{
_isDoingRotation = false;
_delegate.Stop();
if (DateTime.Now < _itemUsePendingUntil)
{
_logger.LogDebug("Item use pending; ignoring temporary inventory count={Count}", inventoryItemCount);
}
else
{
_itemUsePending = false;
}
}
else if (ShouldUseItem(nextTarget))
if (!_itemUsePending && inventoryItemCount == 0)
{
_isDoingRotation = false;
_delegate.Stop();
_logger.LogInformation("Using item {ItemId}", _combatData.CombatItemUse.ItemId);
return;
}
_lastKnownItemCount = inventoryItemCount;
if (ShouldUseItem(nextTarget))
{
_itemUsePending = true;
_itemUsePendingUntil = DateTime.Now.AddSeconds(3.0);
AgentInventoryContext.Instance()->UseItem(_combatData.CombatItemUse.ItemId, InventoryType.Invalid, 0u, 0);
_continueAt = DateTime.Now.AddSeconds(2.0);
}

File diff suppressed because it is too large Load diff

View file

@ -34,6 +34,7 @@ internal sealed class JsonSchemaValidator : IQuestValidator
SchemaRegistry.Global.Register(new Uri("https://github.com/WigglyMuffin/Questionable/raw/refs/heads/main/Questionable.Model/common-aetheryte.json"), JsonSchema.FromStream(AssemblyModelLoader.CommonAetheryte).AsTask().Result);
SchemaRegistry.Global.Register(new Uri("https://github.com/WigglyMuffin/Questionable/raw/refs/heads/main/Questionable.Model/common-classjob.json"), JsonSchema.FromStream(AssemblyModelLoader.CommonClassJob).AsTask().Result);
SchemaRegistry.Global.Register(new Uri("https://github.com/WigglyMuffin/Questionable/raw/refs/heads/main/Questionable.Model/common-completionflags.json"), JsonSchema.FromStream(AssemblyModelLoader.CommonCompletionFlags).AsTask().Result);
SchemaRegistry.Global.Register(new Uri("https://github.com/WigglyMuffin/Questionable/raw/refs/heads/main/Questionable.Model/common-requiredvariables.json"), JsonSchema.FromStream(AssemblyModelLoader.CommonRequiredVariables).AsTask().Result);
SchemaRegistry.Global.Register(new Uri("https://github.com/WigglyMuffin/Questionable/raw/refs/heads/main/Questionable.Model/common-vector3.json"), JsonSchema.FromStream(AssemblyModelLoader.CommonVector3).AsTask().Result);
SchemaRegistry.Global.Register(new Uri("https://github.com/WigglyMuffin/Questionable/raw/refs/heads/main/QuestPaths/quest-v1.json"), JsonSchema.FromStream(AssemblyQuestLoader.QuestSchema).AsTask().Result);
}
@ -67,6 +68,7 @@ internal sealed class JsonSchemaValidator : IQuestValidator
RegisterLocalIfExistsFromPath(Find("common-aetheryte.json"), "https://github.com/WigglyMuffin/Questionable/raw/refs/heads/main/Questionable.Model/common-aetheryte.json");
RegisterLocalIfExistsFromPath(Find("common-classjob.json"), "https://github.com/WigglyMuffin/Questionable/raw/refs/heads/main/Questionable.Model/common-classjob.json");
RegisterLocalIfExistsFromPath(Find("common-completionflags.json"), "https://github.com/WigglyMuffin/Questionable/raw/refs/heads/main/Questionable.Model/common-completionflags.json");
RegisterLocalIfExistsFromPath(Find("common-requiredvariables.json"), "https://github.com/WigglyMuffin/Questionable/raw/refs/heads/main/Questionable.Model/common-requiredvariables.json");
RegisterLocalIfExistsFromPath(Find("common-vector3.json"), "https://github.com/WigglyMuffin/Questionable/raw/refs/heads/main/Questionable.Model/common-vector3.json");
RegisterLocalIfExistsFromPath(Find("quest-v1.json"), "https://github.com/WigglyMuffin/Questionable/raw/refs/heads/main/QuestPaths/quest-v1.json");
static void RegisterLocalIfExistsFromPath(string? path, string registrationUri)

View file

@ -56,7 +56,10 @@ internal static class ChangelogCategoryComponent
{
ImGui.SetCursorPosX(baseX + changeIndent);
float cursorPosY = ImGui.GetCursorPosY();
ImGui.TextColored(new Vector4(0.95f, 0.95f, 1f, 1f), "\ufffd");
using (ImRaii.PushFont(UiBuilder.IconFont))
{
ImGui.TextColored(new Vector4(0.95f, 0.95f, 1f, 1f), FontAwesomeIcon.CaretRight.ToIconString());
}
ImGui.SameLine();
ImGui.SetCursorPosY(cursorPosY);
float num = ImGui.GetContentRegionAvail().X - 8f;
@ -76,7 +79,10 @@ internal static class ChangelogCategoryComponent
{
ImGui.SetCursorPosX(baseX + num);
float cursorPosY = ImGui.GetCursorPosY();
ImGui.TextColored(new Vector4(0.85f, 0.85f, 0.92f, 1f), "\ufffd");
using (ImRaii.PushFont(UiBuilder.IconFont))
{
ImGui.TextColored(new Vector4(0.85f, 0.85f, 0.92f, 1f), FontAwesomeIcon.AngleRight.ToIconString());
}
ImGui.SameLine();
ImGui.SetCursorPosY(cursorPosY);
float num2 = ImGui.GetContentRegionAvail().X - 8f;