From 1885463132eec35686efc5d91730913807914c86 Mon Sep 17 00:00:00 2001 From: Adrian Gaudebert Date: Tue, 5 Nov 2024 11:03:34 +0100 Subject: [PATCH] Show units being recruited in the University panel. --- src/hud/RecruitmentQueue.svelte | 20 ++++++++++++++++++++ src/hud/UniversityPanel.svelte | 7 +++++++ 2 files changed, 27 insertions(+) create mode 100644 src/hud/RecruitmentQueue.svelte diff --git a/src/hud/RecruitmentQueue.svelte b/src/hud/RecruitmentQueue.svelte new file mode 100644 index 0000000..cc4823b --- /dev/null +++ b/src/hud/RecruitmentQueue.svelte @@ -0,0 +1,20 @@ + + +{ #if unitsCount > 0 } +
+ { unitsCount } + ({ prettyDuration }’) +
+{ /if } diff --git a/src/hud/UniversityPanel.svelte b/src/hud/UniversityPanel.svelte index fdebe7d..b557699 100644 --- a/src/hud/UniversityPanel.svelte +++ b/src/hud/UniversityPanel.svelte @@ -5,6 +5,7 @@ import type { VillageState } from "../village"; import village from "../village"; import Cost from "./Cost.svelte"; + import RecruitmentQueue from "./RecruitmentQueue.svelte"; export let building: BuildingType; @@ -42,6 +43,10 @@ return res; } + + function setMaxUnits() { + numberOfUnits = maximumUnits; + }
@@ -65,8 +70,10 @@ max={ maximumUnits } bind:value={ numberOfUnits } /> +
+