From 79540f8015d473b3e6d7d5f357c70aa66e5183f9 Mon Sep 17 00:00:00 2001 From: BlankenshipG Date: Wed, 7 Oct 2026 08:10:59 -0400 Subject: [PATCH] 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 --- .../ImGui/Panels/LootAddDialog.cs | 25 ++++++++++++++++++- src/RynthCore.Engine/UI/Data/LootEditData.cs | 6 +++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/src/RynthCore.Engine/ImGui/Panels/LootAddDialog.cs b/src/RynthCore.Engine/ImGui/Panels/LootAddDialog.cs index 34b14fc..0c77514 100644 --- a/src/RynthCore.Engine/ImGui/Panels/LootAddDialog.cs +++ b/src/RynthCore.Engine/ImGui/Panels/LootAddDialog.cs @@ -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++) diff --git a/src/RynthCore.Engine/UI/Data/LootEditData.cs b/src/RynthCore.Engine/UI/Data/LootEditData.cs index 7148ea5..3a89213 100644 --- a/src/RynthCore.Engine/UI/Data/LootEditData.cs +++ b/src/RynthCore.Engine/UI/Data/LootEditData.cs @@ -139,6 +139,8 @@ internal sealed class LootEditItemRequestDto public string RuleName { get; set; } = string.Empty; /// True: the profile open in the Loot Editor; false: the one RynthAi loots with. public bool ToOpenProfile { get; set; } + /// Also require the item's T11 attributes (added 2026-10-07; an older RynthAi ignores it). + 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; } + /// The rule includes the item's T11 attributes (added 2026-10-07; false from an older RynthAi). + public bool IncludeT11 { get; set; } + /// The item is T11 gear (added 2026-10-07; false from an older RynthAi). + public bool IsT11 { get; set; } public int Action { get; set; } public int KeepCount { get; set; } public string RuleName { get; set; } = string.Empty; -- 2.43.0