Items are titled by their product: ItemManager.Title, read by every title site

Title derives the brand's product name and falls back to the design name.
The trade list, buy dialog and properties title read it; the product name
line leaves the properties body. Build not yet verified at this commit.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-08 14:34:47 +02:00
commit 7f700d3c78
4 changed files with 85 additions and 7 deletions

View file

@ -221,6 +221,11 @@ public class ItemManager
return (ItemData.Get(maker), product);
}
// What the player reads an item as: its product's name when its lot's maker has a product of this design,
// otherwise the design's own name (unbranded, console-given and extracted lots, and commodities).
public string Title(ItemInstance item) =>
(item is CraftedItemInstance crafted ? Brand(crafted).Product?.Name : null) ?? GetData(item).Name;
public (RarityTier tier, int upgrades) GetTier(CraftedItemInstance item)
{
var quality = GetLot(item).Quality;