fix(ui): restore radar, retail wield switching, and protection meshes

Late-bind radar snapshots to the canonical LiveEntityRuntime maps so the retained radar survives bootstrap and session replacement instead of capturing empty sentinels.

Route paperdoll drops through the retail AutoWield blocker transaction. Move conflicting held weapons, shields, explicit jewelry destinations, and mismatched ammo to the backpack one authoritative confirmation at a time; preserve compatible arrows when switching to melee.

Render mode-1 and no-degrade particle GfxObjs as their authored modern-pipeline meshes, retain Always2D billboards, interleave both paths back-to-front, balance emitter mesh ownership, and fail safely on corrupt DAT material metadata. This restores the closed apex on Armor Self/protection effects.

Retain Studio fixture controller lifetimes, add installed-DAT and adversarial regression coverage, synchronize retail research/divergence bookkeeping, and pass all three review tracks plus the full Release suite.

Co-Authored-By: Codex <noreply@openai.com>
This commit is contained in:
Erik 2026-07-14 20:52:45 +02:00
parent 8d63e5c28a
commit b26f84cc69
26 changed files with 1361 additions and 141 deletions

View file

@ -46,7 +46,7 @@ public static class FixtureProvider
/// <see cref="SampleData.BuildObjectTable"/>.</param>
/// <param name="dats">The live DAT collection used to resolve per-list empty-slot sprites
/// (same lookup GameWindow.OnLoad performs for the production binding).</param>
public static void Populate(
public static IRetainedPanelController? Populate(
uint layoutId,
ImportedLayout layout,
RenderStack stack,
@ -63,10 +63,10 @@ public static class FixtureProvider
healthText: () => "80/100",
staminaText: () => "60/100",
manaText: () => "90/100");
break;
return null;
case RadarController.LayoutId: // gmRadarUI
RadarController.Bind(
return RadarController.Bind(
layout,
() => new UiRadarSnapshot(
PlayerHeadingDegrees: 32f,
@ -88,7 +88,6 @@ public static class FixtureProvider
],
CoordinatesText: "42.1N,33.3E"),
datFont: stack.VitalsDatFont);
break;
case CombatUiController.LayoutId:
{
@ -99,7 +98,7 @@ public static class FixtureProvider
sendAttack: (_, _) => true,
autoRepeatAttack: () => false);
GameplaySettings gameplay = GameplaySettings.Default;
CombatUiController.Bind(
CombatUiController? controller = CombatUiController.Bind(
layout,
combat,
attacks,
@ -110,11 +109,11 @@ public static class FixtureProvider
"High", "Medium", "Low"),
visible => layout.Root.Visible = visible);
combat.SetCombatMode(CombatMode.Melee);
break;
return controller;
}
case 0x21000016u: // toolbar
ToolbarController.Bind(
return ToolbarController.Bind(
layout,
objects,
shortcuts: () => System.Array.Empty<ShortcutEntry>(),
@ -126,7 +125,6 @@ public static class FixtureProvider
emptyDigits: null,
sendAddShortcut: null,
sendRemoveShortcut: null);
break;
case 0x21000023u: // inventory + paperdoll
{
@ -140,8 +138,15 @@ public static class FixtureProvider
var iconIds = MakeIconIds(stack);
var selection = new AcDream.Core.Selection.SelectionState();
var itemInteraction = new ItemInteractionController(
objects,
() => SampleData.PlayerGuid,
sendUse: null,
sendUseWithTarget: null,
sendWield: null,
sendDrop: null);
InventoryController.Bind(
InventoryController inventory = InventoryController.Bind(
layout,
objects,
playerGuid: () => SampleData.PlayerGuid,
@ -154,17 +159,18 @@ public static class FixtureProvider
mainPackEmptySprite: mainPackEmpty);
// Bind the paperdoll equip slots with their authored per-location UIItem prototypes.
PaperdollController.Bind(
PaperdollController paperdoll = PaperdollController.Bind(
layout,
objects,
playerGuid: () => SampleData.PlayerGuid,
iconIds: iconIds,
selection: selection,
sendWield: null, // no live session in the studio
itemInteraction: itemInteraction,
emptySlotSprite: contentsEmpty,
datFont: stack.VitalsDatFont,
emptySlotSprites: paperdollEmpty);
break;
emptySlotSprites: paperdollEmpty,
ownsItemInteraction: true);
return new RetainedPanelControllerGroup(inventory, paperdoll);
}
case 0x2100002Eu: // gmStatManagementUI — Attributes/Skills/Titles window (LayoutDesc 0x2100002E)
@ -179,11 +185,11 @@ public static class FixtureProvider
datFont: stack.VitalsDatFont,
rowDatFont: stack.LargeDatFont ?? stack.VitalsDatFont,
spriteResolve: stack.ResolveChrome);
break;
return null;
default:
// Unknown layout — no-op; the panel renders structurally.
break;
return null;
}
}