ModernUO/Projects/UOContent/Items/Containers
Kamron Batman 4e565ca6da
perf: Migrate SoulStone and TMap chest gumps to DynamicGump (#2417)
## Summary

Migrates the five-step SoulStone wizard and the TreasureMapChest remove-confirmation dialog from legacy `Gump` to the modern builder API.

Per-gump base type:

- **`SelectSkillGump` -> `DynamicGump`** -- the skill picker iterates the player's skill list and emits one button per non-zero skill, so the layout shape varies per instance.
- **`ConfirmSkillGump` -> `DynamicGump`** -- skill name uses `AosSkillBonuses.GetLabel(...)` which returns dynamic clilocs in the `1044060 + (int)skill` range, plus current/cap skill values rendered as text labels.
- **`ConfirmTransferGump` -> `DynamicGump`** -- same dynamic skill cliloc plus per-instance Base/Cap/Stored values.
- **`ConfirmRemovalGump` -> `StaticGump<ConfirmRemovalGump>`** -- only fixed clilocs (warning text, Continue, Cancel), so the layout caches.
- **`ErrorGump` -> `DynamicGump`** -- title and message clilocs are constructor parameters that vary per call site.
- **`TreasureMapChest.RemoveGump` -> `StaticGump<RemoveGump>`** -- fixed-cliloc confirmation prompt (no item list, despite the name); `Closable=false`/`Disposable=false` are now `builder.SetNoClose()`/`builder.SetNoDispose()`.

All six gumps are now `Singleton => true`, have private constructors, and expose a static `DisplayTo` entry point that validates `from`, `NetState`, and the underlying entity before constructing -- prevents the empty-gump leak. Wizard navigation between steps now goes through `DisplayTo` (e.g. `ConfirmSkillGump.DisplayTo(from, _stone, skill)` from the skill picker, `ErrorGump.DisplayTo(...)` from absorption pre-checks, `SelectSkillGump.DisplayTo(...)` from the "make another selection" button on `ConfirmSkillGump` and from `ErrorGump` bounce-back). Because each gump is Singleton, sending the same type again automatically closes any prior instance instead of stacking; the explicit `gumps.Close<T>()` chain on `OnDoubleClick` is preserved so opening the soulstone still resets any orphaned step from another wizard.

`OnResponse` now uses `in RelayInfo info`. All inline `AddX(...)` calls move to `builder.AddX(...)` inside `BuildLayout`. `Skill.Base.ToString("F1")` etc. are converted to `$"{value:F1}"` interpolation passed to `AddLabel(ReadOnlySpan<char>)`. Skill picker pagination still uses client-side `AddPage` / `GumpButtonType.Page` -- no server-state pagination to migrate.
2026-04-25 20:38:24 -07:00
..
Fillable Containers chore: Use var everywhere (#2294) 2025-12-27 16:47:28 -08:00
BaseTreasureChest.cs feat: Adds SerializedCommandProperty (#1249) 2022-11-14 18:24:33 -08:00
Container.cs feat: Adds Feature Flag System (#2328) 2026-02-07 12:02:57 -08:00
FurnitureContainer.cs fix: Optimizes items to use default weights. (Part 1) (#2240) 2025-07-24 14:44:39 -07:00
LockableContainer.cs chore: Use var everywhere (#2294) 2025-12-27 16:47:28 -08:00
MarkContainer.cs fix: Adds command help, webpage, and fixes issues with other commands (#1669) 2024-02-10 00:19:19 -08:00
ParagonChest.cs fix: Optimizes OPL using string interpolation (#1041) 2022-06-02 10:09:53 -07:00
SalvageBag.cs fix: Fixes container enumeration not recycling pooled arrays (#2341) 2026-02-17 09:54:32 -08:00
Strongbox.cs fix: Eliminates List allocations in various places. (#2158) 2025-11-16 18:33:53 -08:00
TrappableContainer.cs feat: Adds SerializedCommandProperty (#1249) 2022-11-14 18:24:33 -08:00
TrappableContainer.ExecuteTrap.cs fix: Fixes crafter deserialize, cleans up bandages, and codegens misc items (#1350) 2023-02-25 00:54:12 -08:00
TreasureChest.cs fix: Updates serialization to use v2.0 (#998) 2022-04-17 08:02:15 -07:00
TreasureMapChest.cs perf: Migrate SoulStone and TMap chest gumps to DynamicGump (#2417) 2026-04-25 20:38:24 -07:00