feat(ui): Include T11 attributes checkbox in the Add to loot profile popup
Sends IncludeT11 with item_preview / item_add; RynthAi (rynth/RynthSuite) then adds the item's T11 tier, grade, damage %, modifiers, slot special and Cast on Strike to the rule. Shows '(not a T11 item)' from the draft's IsT11. Older RynthAi ignores the new field. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
abf9146a5b
commit
79540f8015
2 changed files with 30 additions and 1 deletions
|
|
@ -7,6 +7,9 @@
|
|||
//
|
||||
// item its name and the profile the rule goes to
|
||||
// match name + class (default), name only, items like this
|
||||
// T11 "Include T11 attributes": also require the item's T11 tier,
|
||||
// grade, damage %, modifiers, slot special and Cast on Strike,
|
||||
// each at least this item's (any match; 2026-10-07)
|
||||
// action Keep, Keep # (with the count), Salvage, Sell, Read
|
||||
// name the rule's name (empty: RynthAi's default, "Keep Copper Pea")
|
||||
// preview the rule in words, where it goes in the list and why, notes
|
||||
|
|
@ -48,6 +51,7 @@ internal sealed class LootAddDialog
|
|||
|
||||
// What the popup asks for (0 / -1 = RynthAi's default).
|
||||
private int _match, _action, _keep = -1;
|
||||
private bool _includeT11;
|
||||
private readonly byte[] _name = new byte[128];
|
||||
private int _keepEdit = 1;
|
||||
|
||||
|
|
@ -88,6 +92,7 @@ internal sealed class LootAddDialog
|
|||
_match = 0;
|
||||
_action = 0;
|
||||
_keep = -1;
|
||||
_includeT11 = false;
|
||||
Array.Clear(_name);
|
||||
_draft = null;
|
||||
_adding = false;
|
||||
|
|
@ -113,7 +118,7 @@ internal sealed class LootAddDialog
|
|||
Item = new LootEditItemRequestDto
|
||||
{
|
||||
ItemId = _itemId, Match = _match, Action = _action, KeepCount = _keep,
|
||||
RuleName = Utf8(_name).Trim(), ToOpenProfile = _toOpenProfile, Seq = _seq,
|
||||
RuleName = Utf8(_name).Trim(), ToOpenProfile = _toOpenProfile, IncludeT11 = _includeT11, Seq = _seq,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
@ -255,6 +260,24 @@ internal sealed class LootAddDialog
|
|||
if (ImGuiNET.ImGui.IsItemHovered()) ImGuiNET.ImGui.SetTooltip(MatchTips[i]);
|
||||
}
|
||||
|
||||
// T11 attributes. Shown for every item: a non-T11 item answers with a note saying so.
|
||||
bool t11 = _includeT11;
|
||||
if (ImGuiNET.ImGui.Checkbox("Include T11 attributes##la_t11", ref t11))
|
||||
{
|
||||
_includeT11 = t11;
|
||||
changed = true;
|
||||
}
|
||||
if (ImGuiNET.ImGui.IsItemHovered())
|
||||
ImGuiNET.ImGui.SetTooltip(
|
||||
"Also require this item's T11 tier, weapon grade, damage %, every modifier, slot special\n" +
|
||||
"and Cast on Strike, each at least as good as this one. Works with any match.\n" +
|
||||
"Not added: Can Wield (depends on your character) and Zone Locked (depends on where it was assessed).");
|
||||
if (!d.IsT11)
|
||||
{
|
||||
ImGuiNET.ImGui.SameLine();
|
||||
ImGuiNET.ImGui.TextDisabled("(not a T11 item)");
|
||||
}
|
||||
|
||||
// Action.
|
||||
ImGuiNET.ImGui.TextDisabled("Action:");
|
||||
for (int i = 0; i < ActionIds.Length; i++)
|
||||
|
|
|
|||
|
|
@ -139,6 +139,8 @@ internal sealed class LootEditItemRequestDto
|
|||
public string RuleName { get; set; } = string.Empty;
|
||||
/// <summary>True: the profile open in the Loot Editor; false: the one RynthAi loots with.</summary>
|
||||
public bool ToOpenProfile { get; set; }
|
||||
/// <summary>Also require the item's T11 attributes (added 2026-10-07; an older RynthAi ignores it).</summary>
|
||||
public bool IncludeT11 { get; set; }
|
||||
public int Seq { get; set; }
|
||||
}
|
||||
|
||||
|
|
@ -157,6 +159,10 @@ internal sealed class LootEditItemDraftDto
|
|||
public bool TargetInUse { get; set; }
|
||||
public string Format { get; set; } = string.Empty;
|
||||
public int Match { get; set; }
|
||||
/// <summary>The rule includes the item's T11 attributes (added 2026-10-07; false from an older RynthAi).</summary>
|
||||
public bool IncludeT11 { get; set; }
|
||||
/// <summary>The item is T11 gear (added 2026-10-07; false from an older RynthAi).</summary>
|
||||
public bool IsT11 { get; set; }
|
||||
public int Action { get; set; }
|
||||
public int KeepCount { get; set; }
|
||||
public string RuleName { get; set; } = string.Empty;
|
||||
|
|
|
|||
Loading…
Reference in a new issue