From eb799666cfc835fa9a90bee5833935edf88ff0ab Mon Sep 17 00:00:00 2001 From: "Fabian @ Blax Software" Date: Fri, 30 Oct 2026 13:54:57 +0100 Subject: [PATCH] feat: Lazarett: the hospital stands in the village (tent, timber infirmary, stone infirmary), its page lists the wounded with when they stand again, its tag shows beds taken, the units box and recruit screen count the wounded, defence reports name who was carried in Co-Authored-By: Claude Opus 5.5 (1M context) --- app/components/icon/Building.vue | 6 ++ app/components/report/Battle.vue | 11 ++- app/components/village/HospitalPanel.vue | 44 +++++++++++ app/components/village/OverviewSidebar.vue | 7 ++ app/components/village/TroopsPanel.vue | 13 +++- app/diorama/models.ts | 90 ++++++++++++++++++++++ app/mock/catalog.ts | 1 + app/mock/server.ts | 21 +++++ app/pages/village/[id]/building/[bid].vue | 2 + app/pages/village/[id]/recruit.vue | 1 + app/types/game.ts | 19 ++++- app/utils/buildingTags.ts | 10 +++ app/utils/demoVillage.ts | 2 +- app/utils/palette.ts | 1 + i18n/locales/en.ts | 1 + i18n/pages/reports.ts | 2 + i18n/pages/village.ts | 16 ++++ 17 files changed, 242 insertions(+), 5 deletions(-) create mode 100644 app/components/village/HospitalPanel.vue diff --git a/app/components/icon/Building.vue b/app/components/icon/Building.vue index 98fe1f2..9e35a3a 100644 --- a/app/components/icon/Building.vue +++ b/app/components/icon/Building.vue @@ -76,6 +76,12 @@ defineProps<{ type: BuildingType }>() + + + + + + diff --git a/app/components/report/Battle.vue b/app/components/report/Battle.vue index 9ccf0cf..5304c77 100644 --- a/app/components/report/Battle.vue +++ b/app/components/report/Battle.vue @@ -1,5 +1,5 @@ @@ -107,6 +108,14 @@ const luckAt = computed(() => Math.max(0, Math.min(100, ((props.report.luck + 25 {{ $t('reports.battle.haul_of', { loot: looted, capacity: report.capacity }) }} +
+ {{ $t('reports.battle.wounded') }} + + {{ count }} + + {{ $t('reports.battle.wounded_back', { when: woundedBack }) }} +
+
{{ $t('reports.battle.bounty') }} diff --git a/app/components/village/HospitalPanel.vue b/app/components/village/HospitalPanel.vue new file mode 100644 index 0000000..1fa9c7d --- /dev/null +++ b/app/components/village/HospitalPanel.vue @@ -0,0 +1,44 @@ + + + + diff --git a/app/components/village/OverviewSidebar.vue b/app/components/village/OverviewSidebar.vue index 6bd079a..723b90d 100644 --- a/app/components/village/OverviewSidebar.vue +++ b/app/components/village/OverviewSidebar.vue @@ -12,6 +12,12 @@ const { t } = useI18n() const production = computed(() => (['wood', 'clay', 'iron', 'food'] as const).map((r) => ({ r, rate: props.village.rates[r] }))) const troops = computed(() => (Object.entries(props.village.troops) as [UnitType, number][]).filter(([, n]) => n > 0)) +/** The wounded in the hospital and when the first of them stand again. */ +const wounded = computed(() => { + const list = props.village.hospital.wounded + if (!list.length) return null + return { count: props.village.hospital.occupied, next: list[0]!.heals_at } +}) const idle = computed(() => props.village.population.villagers - props.village.population.workers - props.village.levy.militia) const spaceShare = computed(() => props.village.space.used / props.village.space.max) const incoming = computed(() => props.village.movements.filter((m) => m.direction === 'in' && m.type === 'attack')) @@ -113,6 +119,7 @@ function order(o: BuildOrder) {

{{ $t('village.troops.none') }}

{{ $t('village.troops.training', { count: village.population.training }) }}

+

{{ $t('village.troops.wounded_back', { count: wounded.count, time: formatDuration(secondsUntil(wounded.next)) }) }}

{{ $t('village.side.commands') }}: {{ commands }}

{{ $t('village.side.recruit') }} diff --git a/app/components/village/TroopsPanel.vue b/app/components/village/TroopsPanel.vue index bc6fe6f..eaba44c 100644 --- a/app/components/village/TroopsPanel.vue +++ b/app/components/village/TroopsPanel.vue @@ -1,10 +1,11 @@