From 25f281028c55190e721611aad8585b37c362b628 Mon Sep 17 00:00:00 2001 From: Adrian Gaudebert Date: Thu, 24 Oct 2024 15:12:21 +0200 Subject: [PATCH] Add a building panel to upgrade them. --- src/board/BuildingTile.svelte | 7 ++++ src/board/Tile.svelte | 65 ++++++----------------------- src/board/Village.svelte | 13 ++++-- src/hud/BuildingPanel.svelte | 74 +++++++++++++++++++++++++++++++++ src/hud/Game.svelte | 2 + src/stores/showBuildingPanel.ts | 4 ++ src/utils.ts | 11 ++++- 7 files changed, 118 insertions(+), 58 deletions(-) create mode 100644 src/board/BuildingTile.svelte create mode 100644 src/hud/BuildingPanel.svelte create mode 100644 src/stores/showBuildingPanel.ts diff --git a/src/board/BuildingTile.svelte b/src/board/BuildingTile.svelte new file mode 100644 index 0000000..db46fad --- /dev/null +++ b/src/board/BuildingTile.svelte @@ -0,0 +1,7 @@ + + +

{ building.name }

diff --git a/src/board/Tile.svelte b/src/board/Tile.svelte index 82f6245..eebf700 100644 --- a/src/board/Tile.svelte +++ b/src/board/Tile.svelte @@ -1,5 +1,4 @@ @@ -7,10 +6,7 @@ class="invisible" on:click={ onTileClick } > -
+
@@ -18,70 +14,33 @@ diff --git a/src/hud/Game.svelte b/src/hud/Game.svelte index e8816d1..8530829 100644 --- a/src/hud/Game.svelte +++ b/src/hud/Game.svelte @@ -5,6 +5,7 @@ import update from "../update"; import BuildingCreator from "./BuildingCreator.svelte"; import Resources from "./Resources.svelte"; + import BuildingPanel from "./BuildingPanel.svelte"; onMount(() => { @@ -32,6 +33,7 @@
+