fix(ui): preserve retail item titles and spacing

Carry PublicWeenieDesc material type into the live object model so examination titles use the DAT-authored material prefix. Preserve retail AddItemInfo empty appends and embedded armor separator, restoring the deliberate blank rows between appraisal sections.

Co-authored-by: Codex <codex@openai.com>
This commit is contained in:
Erik 2026-07-24 05:21:01 +02:00
parent d78d09cfbc
commit 6718ee45a0
19 changed files with 341 additions and 46 deletions

View file

@ -224,12 +224,21 @@ public sealed class ClientObject
public int Structure { get; set; } // charges/uses remaining
public int MaxStructure { get; set; }
public float Workmanship { get; set; } // 0..10 (fractional on the wire)
/// <summary>
/// Retail <c>PublicWeenieDesc._material_type</c>. The appropriate-name
/// path resolves this through the DAT material enum and prefixes it to
/// the base object name.
/// </summary>
public uint? MaterialType { get; set; }
public PropertyBundle Properties { get; } = new();
/// <summary>
/// Ports <c>ACCWeenieObject::GetObjectName(NAME_APPROPRIATE) @ 0x0058E6E0</c>:
/// stacked objects prefer <see cref="PluralName"/>; when the wire omitted it,
/// retail appends <c>s</c>, or <c>es</c> when the singular already ends in lowercase s.
/// Ports the singular/plural selection inside
/// <c>ACCWeenieObject::GetObjectName(NAME_APPROPRIATE) @ 0x0058E6E0</c>.
/// Stacked objects prefer <see cref="PluralName"/>; when the wire omitted it,
/// retail appends <c>s</c>, or <c>es</c> when the singular already ends in
/// lowercase s. DAT-backed material decoration belongs to the presentation
/// resolver because Core intentionally has no content-reader dependency.
/// </summary>
public string GetAppropriateName()
{
@ -285,7 +294,8 @@ public readonly record struct WeenieData(
uint? CooldownId = null,
double? CooldownDuration = null,
uint? HookItemTypes = null,
uint? HookType = null);
uint? HookType = null,
uint? MaterialType = null);
/// <summary>
/// Retail ITEM_USEABLE helpers (acclient.h:6478, ItemUses::* at 0x004fccd0).

View file

@ -773,6 +773,7 @@ public sealed class ClientObjectTable
if (d.Structure is { } st) obj.Structure = st;
if (d.MaxStructure is { } ms) obj.MaxStructure = ms;
if (d.Workmanship is { } wm) obj.Workmanship = wm;
if (d.MaterialType is { } materialType) obj.MaterialType = materialType;
List<uint>? changedContainers = RemoveFromOtherContainerIndexes(
obj.ObjectId,