Items face: "No buff" toggle on shield rows #11

Open
AwfulWaffle wants to merge 1 commit from AwfulWaffle/RynthCore:items-nobuff-toggle into main
First-time contributor

Depends on: nothing to build or run. Pairs with RynthSuite PR "RynthAi: exclude a listed shield from buffing (noBuff on the Items bridge)".

Companion PR: rynth/RynthSuite#22 (rynth/RynthSuite#22).

What went wrong in play

The Items face had no way to mark a shield "never buff this one". A shield that already carries its buffs kept being buffed, and the Items list offered nothing for it: a shield row's element column only said "Shield".

The fix

  • ItemsPanel.WeaponEntry reads and writes RynthAi's noBuff (nullable; omitted from the save when null, so a plugin that predates it keeps its saved value). New ShowsNoBuff: true only for a shield row (Action "Shield") from a plugin that sends the field.
  • ItemsFace draws a "No buff" toggle in place of the element picker on those rows (lit while excluded, with a tooltip) and saves on click. Weapon rows are unchanged.
  • The panel's change check now includes NoBuff, so it never saves back a stale value.

How it was tested

This repo (RynthCore) has no Suite host tests; the new offline check project is tools\ItemsNoBuffTests (reflection against the engine, no test seam needed). From tools\ItemsNoBuffTests:

dotnet run -c Release -r win-x86 -nodeReuse:false

Result: "All 14 checks passed." (exit 0). It builds RynthCore.Engine as a dependency; the build succeeded. It covers the wire shape RynthAi writes, an older plugin with no field (no toggle, nothing written back), the flipped value going back, and the exact wire name noBuff.

Scope and risk

4 files: ImGui/Panels/ItemsFace.cs (including one sentence in the header comment), UI/Panels/ItemsPanel.cs, and the new test project (csproj + Program.cs). Risk: UI only; with an older RynthAi no toggle is drawn.

🤖 Generated with Claude Code

Depends on: nothing to build or run. Pairs with RynthSuite PR "RynthAi: exclude a listed shield from buffing (noBuff on the Items bridge)". Companion PR: rynth/RynthSuite#22 (https://aelrynth.com/git/rynth/RynthSuite/pulls/22). ## What went wrong in play The Items face had no way to mark a shield "never buff this one". A shield that already carries its buffs kept being buffed, and the Items list offered nothing for it: a shield row's element column only said "Shield". ## The fix - `ItemsPanel.WeaponEntry` reads and writes RynthAi's `noBuff` (nullable; omitted from the save when null, so a plugin that predates it keeps its saved value). New `ShowsNoBuff`: true only for a shield row (Action "Shield") from a plugin that sends the field. - `ItemsFace` draws a "No buff" toggle in place of the element picker on those rows (lit while excluded, with a tooltip) and saves on click. Weapon rows are unchanged. - The panel's change check now includes `NoBuff`, so it never saves back a stale value. ## How it was tested This repo (RynthCore) has no Suite host tests; the new offline check project is `tools\ItemsNoBuffTests` (reflection against the engine, no test seam needed). From `tools\ItemsNoBuffTests`: dotnet run -c Release -r win-x86 -nodeReuse:false Result: "All 14 checks passed." (exit 0). It builds `RynthCore.Engine` as a dependency; the build succeeded. It covers the wire shape RynthAi writes, an older plugin with no field (no toggle, nothing written back), the flipped value going back, and the exact wire name `noBuff`. ## Scope and risk 4 files: `ImGui/Panels/ItemsFace.cs` (including one sentence in the header comment), `UI/Panels/ItemsPanel.cs`, and the new test project (csproj + Program.cs). Risk: UI only; with an older RynthAi no toggle is drawn. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Adds a No buff toggle on shield rows in the Items face; it writes the noBuff field RynthAi reads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This pull request has changes conflicting with the target branch.
  • src/RynthCore.Engine/ImGui/Panels/ItemsFace.cs
  • src/RynthCore.Engine/UI/Panels/ItemsPanel.cs
  • tools/ItemsNoBuffTests/ItemsNoBuffTests.csproj
  • tools/ItemsNoBuffTests/Program.cs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u items-nobuff-toggle:AwfulWaffle-items-nobuff-toggle
git switch AwfulWaffle-items-nobuff-toggle

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff AwfulWaffle-items-nobuff-toggle
git switch AwfulWaffle-items-nobuff-toggle
git rebase main
git switch main
git merge --ff-only AwfulWaffle-items-nobuff-toggle
git switch AwfulWaffle-items-nobuff-toggle
git rebase main
git switch main
git merge --no-ff AwfulWaffle-items-nobuff-toggle
git switch main
git merge --squash AwfulWaffle-items-nobuff-toggle
git switch main
git merge --ff-only AwfulWaffle-items-nobuff-toggle
git switch main
git merge AwfulWaffle-items-nobuff-toggle
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
rynth/RynthCore!11
No description provided.