2026-10-28 21:14:56 +00:00
|
|
|
<script setup lang="ts">
|
|
|
|
|
const route = useRoute()
|
|
|
|
|
const v = useVillageContext()
|
|
|
|
|
const village = computed(() => v.village.value!)
|
|
|
|
|
const resources = computed(() => v.resources.value!)
|
|
|
|
|
|
|
|
|
|
/** Show a building in the village overview, with its card open. */
|
feat: building portraits, screen headers and a livelier village: shadows, smoke, walkers, a pond
Each building screen opens with the building drawn as it stands, its level and what it
does; the HQ list and the building cards show the same portraits. In the village,
buildings and trees cast flat shadows, chimneys, forges and kilns smoke, villagers walk
the roads to the zones they work in (more where more work), and a pond lies in the
meadow. Motion stops for players who prefer reduced motion.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 23:46:15 +00:00
|
|
|
const hq = computed(() => village.value.buildings.find((b) => b.type === 'headquarters') ?? null)
|
|
|
|
|
|
2026-10-28 21:14:56 +00:00
|
|
|
const showInVillage = (id: number) => navigateTo({ path: `/village/${route.params.id}`, query: { b: id } })
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<!-- The headquarters screen: every building to construct, upgrade or tear down, and the queue. -->
|
|
|
|
|
<template>
|
feat: building portraits, screen headers and a livelier village: shadows, smoke, walkers, a pond
Each building screen opens with the building drawn as it stands, its level and what it
does; the HQ list and the building cards show the same portraits. In the village,
buildings and trees cast flat shadows, chimneys, forges and kilns smoke, villagers walk
the roads to the zones they work in (more where more work), and a pond lies in the
meadow. Motion stops for players who prefer reduced motion.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 23:46:15 +00:00
|
|
|
<div class="mx-auto max-w-[96rem] space-y-6 px-4 py-6 sm:px-6">
|
|
|
|
|
<VillageScreenHeader type="headquarters" :level="hq?.level ?? null" :title="$t('buildings.headquarters')" :description="$t('village.about.build')" />
|
|
|
|
|
<div class="grid gap-6 lg:grid-cols-[minmax(0,1fr)_22rem] 2xl:grid-cols-[minmax(0,1fr)_26rem]">
|
|
|
|
|
<VillageBuildForm
|
|
|
|
|
:options="village.buildable"
|
|
|
|
|
:buildings="village.buildings"
|
|
|
|
|
:space="village.space"
|
|
|
|
|
:resources="resources"
|
|
|
|
|
:can-afford="v.canAfford"
|
|
|
|
|
:busy="v.busy.value"
|
|
|
|
|
@build="v.build"
|
|
|
|
|
@upgrade="v.upgrade"
|
|
|
|
|
@demolish="v.demolish"
|
|
|
|
|
@select="showInVillage"
|
|
|
|
|
/>
|
|
|
|
|
<VillageBuildQueue
|
|
|
|
|
:queue="village.queue"
|
|
|
|
|
:builders="village.builders"
|
|
|
|
|
:seconds-until="v.secondsUntil"
|
|
|
|
|
:busy="v.busy.value"
|
|
|
|
|
@cancel="v.cancel"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
2026-10-28 21:14:56 +00:00
|
|
|
</div>
|
|
|
|
|
</template>
|