--- import { ObjectId } from "mongodb"; import LoggedIn from "../../../../layouts/LoggedIn.astro"; import locationManager from "../../../../lib/classes/managers/LocationManager"; const { token, lang } = Astro.locals; const currentSystemId = Astro.cookies.get('currentSystem')?.value ?? null; if(currentSystemId === null) return Astro.redirect('/game/systemManager/select'); const currentSystem = locationManager.getSystem(new ObjectId(currentSystemId)); if(currentSystem === undefined) { Astro.cookies.delete('currentSystem'); return Astro.redirect('/game/systemManager/select'); } const discoveredAsteroids = currentSystem.asteroids.asteroids; --- Selected system: {currentSystem.data.name} (change) Overview System-wide structures Space stations Asteroids Avaliable asteroids Scan for new {discoveredAsteroids.map((asteroid) => {asteroid.name} Send Resources left: {asteroid.resources.map((resource) => {resource.id} - {resource.amount})} )}
{resource.id} - {resource.amount}