ModernUO/Projects/UOContent/Engines/Plants
Kamron Batman 2423950cca
perf: Migrate Plant gumps to DynamicGump/StaticGump (#2411)
## Summary

Second PR in the player-facing legacy gump migration. Converts the four Plants system gumps:

- `MainPlantGump`, `ReproductionGump`, `EmptyTheBowlGump` → `DynamicGump`. Layout varies by plant status, growth stage, health, and pollination/resource availability — cannot use cached `StaticGump<T>`.
- `SetToDecorativeGump` → `StaticGump<SetToDecorativeGump>`. Pure confirmation dialog with no per-instance variation.

All four:

- `Singleton => true` (auto-replace previous plant gump on re-open instead of stacking)
- Constructor `private`; entry is static `DisplayTo(Mobile, PlantItem)` per the empty-gump rule (CLAUDE.md §13)
- `OnResponse` self-refresh paths converted from `from.SendGump(new XGump(_plant))` to `from.SendGump(this)` — saves an allocation on every help/info button click and on every "gather resources/seeds/pollen" action
- Helper draw methods take `ref DynamicGumpBuilder builder` instead of mutating instance state
- Renamed legacy `m_Plant` to `_plant` per CLAUDE.md §12

Updated external callers to use the new entry points:

- `PlantItem.OnDoubleClick` → `MainPlantGump.DisplayTo(from, this)`
- `PlantPourTarget.OnTargetFinish` → `MainPlantGump.DisplayTo(from, m_Plant)` (also drops the now-redundant legacy `singleton: true` flag — `Singleton` property handles it)
- `PollinateTarget.OnTargetFinish` → `ReproductionGump.DisplayTo(from, m_Plant)`
2026-04-25 16:46:37 -07:00
..
MiscItems
MiscMobiles
EmptyTheBowlGump.cs perf: Migrate Plant gumps to DynamicGump/StaticGump (#2411) 2026-04-25 16:46:37 -07:00
MainPlantGump.cs perf: Migrate Plant gumps to DynamicGump/StaticGump (#2411) 2026-04-25 16:46:37 -07:00
PlantBowl.cs
PlantHue.cs
PlantItem.cs perf: Migrate Plant gumps to DynamicGump/StaticGump (#2411) 2026-04-25 16:46:37 -07:00
PlantPourTarget.cs perf: Migrate Plant gumps to DynamicGump/StaticGump (#2411) 2026-04-25 16:46:37 -07:00
PlantResources.cs
PlantSystem.cs
PlantType.cs
PollinateTarget.cs perf: Migrate Plant gumps to DynamicGump/StaticGump (#2411) 2026-04-25 16:46:37 -07:00
ReproductionGump.cs perf: Migrate Plant gumps to DynamicGump/StaticGump (#2411) 2026-04-25 16:46:37 -07:00
Seed.cs
SetToDecorativeGump.cs perf: Migrate Plant gumps to DynamicGump/StaticGump (#2411) 2026-04-25 16:46:37 -07:00