feat: show equipped items on character sheet and public profile

This commit is contained in:
2026-03-07 14:57:53 -08:00
committed by Naomi Carrigan
parent b886928e49
commit bbdacf272c
6 changed files with 208 additions and 2 deletions
+5
View File
@@ -75,6 +75,10 @@ profileRouter.get("/:discordId", async (context) => {
return { id, name: title?.name ?? id };
});
const equippedItems = (state?.equipment ?? [])
.filter((e) => e.owned && e.equipped)
.map(({ name, type, rarity, bonus }) => ({ name, type, rarity, bonus }));
return context.json({
characterName: player.characterName,
pronouns: player.pronouns ?? "",
@@ -106,6 +110,7 @@ profileRouter.get("/:discordId", async (context) => {
achievementsUnlocked,
unlockedTitles,
activeTitle: player.activeTitle ?? "",
equippedItems,
});
});