From 73bf96ee8c6204489a070f31f7def4aa0bd42132 Mon Sep 17 00:00:00 2001 From: Aelita4 Date: Thu, 21 Nov 2024 10:51:25 +0100 Subject: [PATCH] Add "add all" button for sending resources --- src/components/ResourceBar.astro | 1 + src/pages/game/fleet.astro | 72 ++++++++++++++++++++++---------- 2 files changed, 51 insertions(+), 22 deletions(-) diff --git a/src/components/ResourceBar.astro b/src/components/ResourceBar.astro index 8b81b93..939ce33 100644 --- a/src/components/ResourceBar.astro +++ b/src/components/ResourceBar.astro @@ -34,6 +34,7 @@ for(const key of planet.resources.resources) { {resourceArray.map(res =>
x.id === res.id)?.type ?? "solid"} + data-res-id={res.id} data-res-amount={res.amount} data-res-mining-rate={res.perHourMiningRate} style={(resourceTypes.find(x => x.id === res.id)?.type ?? "solid") === "solid" ? "" : "display: none;"} diff --git a/src/pages/game/fleet.astro b/src/pages/game/fleet.astro index 82a4884..f3067f8 100644 --- a/src/pages/game/fleet.astro +++ b/src/pages/game/fleet.astro @@ -182,6 +182,7 @@ const sectorsList = galaxies.map(galaxy => { +
Add new +
@@ -316,15 +317,16 @@ label { color: black; } - \ No newline at end of file