From 67090f53faeea423ce60c6ddc43c24beef882bad Mon Sep 17 00:00:00 2001 From: Jon Eugster Date: Tue, 18 Jun 2024 15:40:35 +0200 Subject: [PATCH] add basic infos to inventory --- client/src/components/inventory.tsx | 10 ++++++++++ server/GameServer/EnvExtensions.lean | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/client/src/components/inventory.tsx b/client/src/components/inventory.tsx index 09074097..67c31283 100644 --- a/client/src/components/inventory.tsx +++ b/client/src/components/inventory.tsx @@ -229,6 +229,16 @@ export function Documentation() {

{docTile.displayName}

{docEntry.data?.statement}

{t(docEntry.data?.content, {ns: gameId})} + {/* TODO: The condition below should be updated so that the section + is displayed whenever it's non-empty. */} + {docTile.proven && <> +

Further details

+ + + } + } diff --git a/server/GameServer/EnvExtensions.lean b/server/GameServer/EnvExtensions.lean index cbe3f045..831bb914 100644 --- a/server/GameServer/EnvExtensions.lean +++ b/server/GameServer/EnvExtensions.lean @@ -109,7 +109,7 @@ structure InventoryTile where hidden := false /-- hover text -/ altTitle : String := default -deriving ToJson, FromJson, Repr, Inhabited +deriving ToJson, FromJson, Repr, Inhabited, BEq def InventoryItem.toTile (item : InventoryItem) : InventoryTile := { name := item.name,