From 55edf7345b497aac9ddc9b3c1b466a70502afce3 Mon Sep 17 00:00:00 2001 From: skye Date: Thu, 4 May 2023 14:11:44 +0300 Subject: [PATCH] feat(client): add details fields for cards --- client/src/game_status/mod.rs | 4 ++++ client/src/plugins/game/ui/mod.rs | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/client/src/game_status/mod.rs b/client/src/game_status/mod.rs index 8fe39f9..8ab94f4 100644 --- a/client/src/game_status/mod.rs +++ b/client/src/game_status/mod.rs @@ -24,6 +24,10 @@ pub struct CardAction { #[derive(Deserialize, Serialize, Clone)] pub struct Card { pub name: String, + /// short details shown on the card, e.g. Draw 2 + pub short_details: Vec, + /// longer explanations of features of the card + pub long_details: Vec, pub cost: u32, /// if set, use this? //vp_cost: Option, diff --git a/client/src/plugins/game/ui/mod.rs b/client/src/plugins/game/ui/mod.rs index 6663b03..9c3d5f2 100644 --- a/client/src/plugins/game/ui/mod.rs +++ b/client/src/plugins/game/ui/mod.rs @@ -108,6 +108,8 @@ fn hardcoded_piles( &Command::InitSupplyPile { card: Card { name: "Test Card".to_string(), + short_details: vec![], + long_details: vec![], cost: 4, actions: vec![] }, @@ -124,6 +126,8 @@ fn hardcoded_piles( &Command::InitSupplyPile { card: Card { name: "Test Card 2".to_string(), + short_details: vec![], + long_details: vec![], cost: 4, actions: vec![] }, @@ -140,6 +144,8 @@ fn hardcoded_piles( &Command::InitSupplyPile { card: Card { name: "Test Card 3".to_string(), + short_details: vec![], + long_details: vec![], cost: 4, actions: vec![] }, @@ -156,6 +162,8 @@ fn hardcoded_piles( &Command::InitSupplyPile { card: Card { name: "Test Card 4".to_string(), + short_details: vec![], + long_details: vec![], cost: 4, actions: vec![] }, -- 2.44.1