M0
Some checks failed
CI / validate (push) Has been cancelled

This commit is contained in:
2026-03-22 23:33:24 -05:00
parent 27dac51b5c
commit 177be6332b
47 changed files with 7287 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
export interface Mission {
id: string;
title: string;
description: string;
rewardXp: number;
completed: boolean;
}
const missions: Mission[] = [
{
id: "first-growth",
title: "First Growth",
description: "Reach a stable absorber prototype.",
rewardXp: 50,
completed: false
},
{
id: "field-test",
title: "Field Test",
description: "Prepare the first sandbox sector.",
rewardXp: 100,
completed: false
}
];
export function listMissions() {
return missions;
}
export function completeMission(id: string) {
const mission = missions.find((entry) => entry.id === id);
if (!mission) {
return null;
}
mission.completed = true;
return mission;
}

View File

@@ -0,0 +1,30 @@
export interface PlayerProfile {
id: string;
mass: number;
xp: number;
evolutions: string[];
}
const defaultProfile: PlayerProfile = {
id: "local-player",
mass: 12,
xp: 0,
evolutions: []
};
let profile = { ...defaultProfile };
export function getPlayerProfile() {
return profile;
}
export function savePlayerProfile(nextProfile: Partial<PlayerProfile>) {
profile = {
...profile,
...nextProfile,
evolutions: nextProfile.evolutions ?? profile.evolutions
};
return profile;
}