diff --git a/src/components/ResourceBar.astro b/src/components/ResourceBar.astro index 43dae4e..d5cf005 100644 --- a/src/components/ResourceBar.astro +++ b/src/components/ResourceBar.astro @@ -11,14 +11,14 @@ const lang = await getLocales(Astro.cookies.get('language')?.value ?? await getH const planetId = new ObjectId(Astro.cookies.get('planetid')?.value ?? ''); -const resources = locationManager.getPlanet(planetId)?.resources; +const planet = locationManager.getPlanet(planetId); -if(!resources) return; +if(!planet) return; -resources.calculateCurrentAvailableResources(); +planet.resources.calculateCurrentAvailableResources(); const resourceArray: Resource[] = []; -for(const key of resources.resources) { +for(const key of planet.resources.resources) { resourceArray.push(key); } --- @@ -26,6 +26,9 @@ for(const key of resources.resources) {
+