feat(ui): port retail creature appraisal presentation
Render assessed creatures through the shared private viewport with retail heading, bounding-box camera, and light. Build the exact authored nine-row stat list and resolve creature names from the retail EnumMapper while keeping remaining font/sequencer adaptations explicit. Co-authored-by: Codex <codex@openai.com>
This commit is contained in:
parent
f1a7912160
commit
7eaa68a5f4
26 changed files with 2780 additions and 237 deletions
|
|
@ -94,6 +94,8 @@ internal sealed record LivePresentationResult(
|
|||
RetainedUiGameplayBinding? RetainedGameplay,
|
||||
PaperdollViewportRenderer? PaperdollRenderer,
|
||||
PaperdollFramePresenter? PaperdollPresenter,
|
||||
CreatureAppraisalViewportRenderer? CreatureAppraisalRenderer,
|
||||
CreatureAppraisalFramePresenter? CreatureAppraisalPresenter,
|
||||
WbFrustum EnvCellFrustum,
|
||||
EnvCellRenderer EnvCellRenderer,
|
||||
LandblockPresentationPipeline LandblockPipeline,
|
||||
|
|
@ -120,7 +122,7 @@ internal enum LivePresentationCompositionPoint
|
|||
EffectRoutingBound,
|
||||
SelectionAndRadarBound,
|
||||
RetainedGameplayBound,
|
||||
PaperdollCreated,
|
||||
PrivateCreatureViewportsCreated,
|
||||
EnvironmentCellsCreated,
|
||||
LandblockPipelineCreated,
|
||||
PortalResourcesCreated,
|
||||
|
|
@ -694,7 +696,48 @@ internal sealed class LivePresentationCompositionPhase
|
|||
content.AnimationLoader,
|
||||
d.DatLock)));
|
||||
}
|
||||
Fault(LivePresentationCompositionPoint.PaperdollCreated);
|
||||
|
||||
CompositionAcquisitionScope.CompositionAcquisitionLease<
|
||||
CreatureAppraisalViewportRenderer>? creatureAppraisalLease = null;
|
||||
CreatureAppraisalFramePresenter? creatureAppraisalPresenter = null;
|
||||
if (interaction.RetainedUi?.Runtime.CreatureAppraisalViewportWidget
|
||||
is { } creatureViewport
|
||||
&& interaction.RetainedUi.Runtime.ExaminationFrame
|
||||
is { } examinationFrame
|
||||
&& interaction.RetainedUi.Runtime.AppraisalController
|
||||
is { } appraisalController)
|
||||
{
|
||||
creatureAppraisalLease = scope.Acquire(
|
||||
"creature appraisal viewport",
|
||||
() => new CreatureAppraisalViewportRenderer(
|
||||
d.Gl,
|
||||
dispatcherLease.Resource,
|
||||
foundation.SceneLighting,
|
||||
foundation.TextureCache),
|
||||
static value => value.Dispose());
|
||||
IUiViewportRenderer? previousRenderer = creatureViewport.Renderer;
|
||||
creatureViewport.Renderer = creatureAppraisalLease.Resource;
|
||||
bindings.AdoptRelease(
|
||||
"creature appraisal viewport target",
|
||||
() =>
|
||||
{
|
||||
if (ReferenceEquals(
|
||||
creatureViewport.Renderer,
|
||||
creatureAppraisalLease.Resource))
|
||||
{
|
||||
creatureViewport.Renderer = previousRenderer;
|
||||
}
|
||||
});
|
||||
creatureAppraisalPresenter = new CreatureAppraisalFramePresenter(
|
||||
creatureAppraisalLease.Resource,
|
||||
new RetailCreatureAppraisalFrameView(
|
||||
creatureViewport,
|
||||
examinationFrame,
|
||||
appraisalController),
|
||||
new RetailCreatureAppraisalCloneFactory(
|
||||
new LiveCreatureAppraisalEntityLookup(liveEntities)));
|
||||
}
|
||||
Fault(LivePresentationCompositionPoint.PrivateCreatureViewportsCreated);
|
||||
|
||||
var envCellFrustum = new WbFrustum();
|
||||
var envCellLease = scope.Acquire(
|
||||
|
|
@ -890,6 +933,8 @@ internal sealed class LivePresentationCompositionPhase
|
|||
retainedGameplayLease?.Resource,
|
||||
paperdollLease?.Resource,
|
||||
paperdollPresenter,
|
||||
creatureAppraisalLease?.Resource,
|
||||
creatureAppraisalPresenter,
|
||||
envCellFrustum,
|
||||
envCellLease.Resource,
|
||||
landblockPipeline,
|
||||
|
|
@ -910,6 +955,7 @@ internal sealed class LivePresentationCompositionPhase
|
|||
dispatcherLease.Transfer();
|
||||
retainedGameplayLease?.Transfer();
|
||||
paperdollLease?.Transfer();
|
||||
creatureAppraisalLease?.Transfer();
|
||||
envCellLease.Transfer();
|
||||
clipFrameLease.Transfer();
|
||||
portalDepthLease.Transfer();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue