fix(ui): restore modern spell formula presentation
Resolve spell-examination component cells through their DAT icon DIDs, project scarab and prismatic-taper formulas when ACE disables component enforcement, and version authored window geometry so stale examination sizes reset once without losing user layout behavior. Co-authored-by: Codex <codex@openai.com>
This commit is contained in:
parent
3e31b0ac70
commit
d4ce64f56b
22 changed files with 307 additions and 41 deletions
|
|
@ -717,6 +717,17 @@ public sealed class AppraisalUiControllerTests
|
|||
new SpellComponentDescriptor(101u, "Malar Herb", 1u, 0x06000011u),
|
||||
Owned: false),
|
||||
};
|
||||
var componentTemplate = new SpellExamineComponentTemplateFactory(
|
||||
new ElementInfo
|
||||
{
|
||||
Id = SpellExamineComponentTemplateFactory.TemplateId,
|
||||
Type = 3,
|
||||
Width = 20,
|
||||
Height = 20,
|
||||
},
|
||||
NoTexture,
|
||||
defaultFont: null);
|
||||
var resolvedComponentIcons = new List<uint>();
|
||||
int shown = 0;
|
||||
using AppraisalUiController controller = Bind(
|
||||
layout,
|
||||
|
|
@ -730,8 +741,14 @@ public sealed class AppraisalUiControllerTests
|
|||
selection: selection,
|
||||
spellbook: spellbook,
|
||||
resolveSpellIcon: id => id + 1_000u,
|
||||
resolveComponentIcon: did =>
|
||||
{
|
||||
resolvedComponentIcons.Add(did);
|
||||
return did + 2_000u;
|
||||
},
|
||||
spellComponents: _ => components,
|
||||
magicSkill: _ => 200u)!;
|
||||
magicSkill: _ => 200u,
|
||||
spellComponentTemplates: componentTemplate)!;
|
||||
|
||||
Assert.True(interaction.ExamineSelectedOrEnterMode(ObjectId));
|
||||
Assert.Equal(1, interaction.BusyCount);
|
||||
|
|
@ -784,6 +801,17 @@ public sealed class AppraisalUiControllerTests
|
|||
UiTextureElement icon = Assert.Single(
|
||||
iconHost.Children.OfType<UiTextureElement>());
|
||||
Assert.Equal(metadata.SpellId + 1_000u, icon.Texture);
|
||||
Assert.Equal(
|
||||
new uint[] { 0x06000010u, 0x06000011u },
|
||||
resolvedComponentIcons);
|
||||
UiElement formula = layout.FindElement(
|
||||
AppraisalUiController.SpellFormulaListId)!;
|
||||
Assert.Equal(
|
||||
new uint[] { 0x06000010u + 2_000u, 0x06000011u + 2_000u },
|
||||
formula.Children
|
||||
.SelectMany(cell => cell.Children)
|
||||
.OfType<UiTextureElement>()
|
||||
.Select(texture => texture.Texture));
|
||||
}
|
||||
|
||||
private static AppraisalUiController? Bind(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue