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:
parent
8d63e5c28a
commit
b26f84cc69
26 changed files with 1361 additions and 141 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,8 @@ internal static class MockupDesktop
|
|||
var layout = Import(dats, 0x2100006Cu, stack);
|
||||
if (layout is null) return null;
|
||||
|
||||
FixtureProvider.Populate(0x2100006Cu, layout, stack, objects, dats);
|
||||
IRetainedPanelController? controller =
|
||||
FixtureProvider.Populate(0x2100006Cu, layout, stack, objects, dats);
|
||||
|
||||
return RetailWindowFrame.Mount(
|
||||
stack.UiHost.Root,
|
||||
|
|
@ -61,6 +62,7 @@ internal static class MockupDesktop
|
|||
ResizeY = false,
|
||||
MinWidth = 40f,
|
||||
ContentClickThrough = false,
|
||||
Controller = controller,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -69,7 +71,8 @@ internal static class MockupDesktop
|
|||
var layout = Import(dats, 0x21000016u, stack);
|
||||
if (layout is null) return null;
|
||||
|
||||
FixtureProvider.Populate(0x21000016u, layout, stack, objects, dats);
|
||||
IRetainedPanelController? controller =
|
||||
FixtureProvider.Populate(0x21000016u, layout, stack, objects, dats);
|
||||
|
||||
const int border = RetailChromeSprites.Border;
|
||||
var toolbarRoot = layout.Root;
|
||||
|
|
@ -93,6 +96,7 @@ internal static class MockupDesktop
|
|||
ResizableEdges = ResizeEdges.Bottom,
|
||||
ContentAnchors = AnchorEdges.Left | AnchorEdges.Top | AnchorEdges.Right,
|
||||
ContentClickThrough = true,
|
||||
Controller = controller,
|
||||
});
|
||||
var frame = (UiCollapsibleFrame)handle.OuterFrame;
|
||||
|
||||
|
|
@ -137,7 +141,8 @@ internal static class MockupDesktop
|
|||
var layout = Import(dats, 0x2100002Eu, stack);
|
||||
if (layout is null) return null;
|
||||
|
||||
FixtureProvider.Populate(0x2100002Eu, layout, stack, objects, dats);
|
||||
IRetainedPanelController? controller =
|
||||
FixtureProvider.Populate(0x2100002Eu, layout, stack, objects, dats);
|
||||
|
||||
return RetailWindowFrame.Mount(
|
||||
stack.UiHost.Root,
|
||||
|
|
@ -155,6 +160,7 @@ internal static class MockupDesktop
|
|||
ResizableEdges = ResizeEdges.Bottom,
|
||||
ContentAnchors = AnchorEdges.Left | AnchorEdges.Top | AnchorEdges.Bottom,
|
||||
ContentClickThrough = false,
|
||||
Controller = controller,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -163,7 +169,8 @@ internal static class MockupDesktop
|
|||
var layout = Import(dats, 0x21000023u, stack);
|
||||
if (layout is null) return null;
|
||||
|
||||
FixtureProvider.Populate(0x21000023u, layout, stack, objects, dats);
|
||||
IRetainedPanelController? controller =
|
||||
FixtureProvider.Populate(0x21000023u, layout, stack, objects, dats);
|
||||
|
||||
var inventoryRoot = layout.Root;
|
||||
float contentW = inventoryRoot.Width;
|
||||
|
|
@ -187,6 +194,7 @@ internal static class MockupDesktop
|
|||
contentH + 2f * RetailChromeSprites.Border,
|
||||
stack.UiHost.Root.Height - 18f),
|
||||
ContentAnchors = AnchorEdges.Left | AnchorEdges.Top | AnchorEdges.Bottom,
|
||||
Controller = controller,
|
||||
});
|
||||
|
||||
StretchV(layout, 0x100001D0u);
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ public sealed class StudioWindow : IDisposable
|
|||
// Task 4: sample data table — built once in OnLoad and kept alive for the window's lifetime
|
||||
// so the controller subscriptions (ObjectAdded/ObjectMoved etc.) fire correctly.
|
||||
private AcDream.Core.Items.ClientObjectTable? _objects;
|
||||
private IRetainedPanelController? _fixtureController;
|
||||
|
||||
// Headless screenshot mode: set when --screenshot was passed.
|
||||
// True after the first OnRender fires the screenshot (guard against repeat).
|
||||
|
|
@ -184,7 +185,8 @@ public sealed class StudioWindow : IDisposable
|
|||
{
|
||||
uint layoutId = _opts.LayoutId ?? 0x2100006Cu;
|
||||
_objects = SampleData.BuildObjectTable();
|
||||
FixtureProvider.Populate(layoutId, _source.CurrentLayout, _stack, _objects, _dats);
|
||||
_fixtureController = FixtureProvider.Populate(
|
||||
layoutId, _source.CurrentLayout, _stack, _objects, _dats);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -431,7 +433,10 @@ public sealed class StudioWindow : IDisposable
|
|||
return;
|
||||
}
|
||||
|
||||
// Remove the existing panel root from the tree.
|
||||
// Remove the existing panel root from the tree. Fixture controllers
|
||||
// own subscriptions into the sample table and end with their panel.
|
||||
_fixtureController?.Dispose();
|
||||
_fixtureController = null;
|
||||
if (_panelRoot is not null)
|
||||
{
|
||||
_stack.UiHost.Root.RemoveChild(_panelRoot);
|
||||
|
|
@ -467,6 +472,8 @@ public sealed class StudioWindow : IDisposable
|
|||
|
||||
private void OnClosing()
|
||||
{
|
||||
_fixtureController?.Dispose();
|
||||
_fixtureController = null;
|
||||
_imgui?.Dispose();
|
||||
_panelFbo?.Dispose();
|
||||
_imgui = null;
|
||||
|
|
@ -479,6 +486,8 @@ public sealed class StudioWindow : IDisposable
|
|||
|
||||
public void Dispose()
|
||||
{
|
||||
_fixtureController?.Dispose();
|
||||
_fixtureController = null;
|
||||
_imgui?.Dispose();
|
||||
_panelFbo?.Dispose();
|
||||
_imgui = null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue