Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🪶🌻 ↝ [SSG-1 SSG-19]: Chapter 1/2 Integration #156

Merged
merged 11 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .DS_Store
Binary file not shown.
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
up:
docker-compose up

build:
docker-compose build && yarn build

up-full:
yarn && yarn build && supabase start && docker-compose up --build

down:
docker-compose down

down-full:
docker-compose build && yarn build && docker-compose down && supabase stop
27 changes: 27 additions & 0 deletions app/api/gameplay/inventory/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,33 @@ const inventoryItems: InventoryItem[] = [
ItemCategory: "Structure",
locationType: 'Surface',
},
{
id: 3107,
name: "Launchpad",
description: "Launch rockets and satellites",
icon_url: "/assets/Items/Launchpad.jpg",
ItemCategory: "Structure",
locationType: 'Surface',
},
{
id: 3108,
name: "First rocket",
description: "Travel the solar-system",
icon_url: "/assets/Items/Rocket.png",
ItemCategory: "Structure",
locationType: 'Atmosphere',
},


// Classification structures introduced in C2
{
id: 31010,
name: "Physics Lab",
description: "Catalogue results from different particle experiments across the universe",
icon_url: "/assets/Items/PhysicsLab.png",
ItemCategory: "Structure",
locationType: 'Surface',
},

// Tests
{
Expand Down
23 changes: 21 additions & 2 deletions app/api/gameplay/missions/planets/initialisation/route.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { NextRequest, NextResponse } from "next/server";
// import { Mission } from "@/types/Missions";

export interface Mission {
id: number;
Expand All @@ -14,7 +13,7 @@ const planetInitialisationMissions: Mission[] = [
id: 100001,
name: "Initialise Mercury",
anomaly: 10,
},
},
{
id: 200001,
name: "Initialise Venus",
Expand All @@ -35,6 +34,16 @@ const planetInitialisationMissions: Mission[] = [
name: "Initialise Mars",
anomaly: 40,
},
{
id: 400011,
name: "Initialise Phobos",
anomaly: 41,
},
{
id: 400021,
name: "Initialise Deimos",
anomaly: 42,
},
{
id: 500001,
name: "Initialise Jupiter",
Expand Down Expand Up @@ -70,6 +79,16 @@ const planetInitialisationMissions: Mission[] = [
name: "Initialise Saturn",
anomaly: 60,
},
{
id: 600011,
name: "Initialise Enceladus",
anomaly: 61,
},
{
id: 600021,
name: "Initialise Titan",
anomaly: 62,
},
{
id: 700001,
name: "Initialise Uranus",
Expand Down
77 changes: 76 additions & 1 deletion app/api/gameplay/missions/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,84 @@ const missions: Mission[] = [
{
id: 100000005,
name: "Pick new planet and travel",
},
}, // Plus planet initialisation missions

// Any resource collection missions...


// Citizen science missions introduced in #Chapter-2
{
id: 20000001,
name: "Complete Count That Neutrino tutorial",
},
{
id: 200000012,
name: "Make your first CTN classification",
},
{
id: 20000002,
name: 'Complete Cosmic Muon tutorial',
},
{
id: 200000022,
name: 'Make your first CM classification',
},
{
id: 20000003,
name: 'Complete Minor Planet tutorial'
},
{
id: 200000032,
name: 'Make your first MP classification',
},
{
id: 20000004,
name: 'Complete the DMP tutorial',
},
{
id: 200000042,
name: 'Make your first DMP classification',
},
{
id: 20000005,
name: 'Complete the Planet Four tutorial',
},
{
id: 200000052,
name: 'Make your first P4 classification',
},
{
id: 20000006,
name: 'Complete the AI for Mars tutorial',
},
{
id: 200000062,
name: 'Make your first AI4M classification',
},
{
id: 20000007,
name: 'Complete the JVH tutorial',
},
{
id: 200000072,
name: 'Make your first JVH classification',
},
{
id: 20000008,
name: 'Complete the SFNZ tutorial',
},
{
id: 200000082,
name: 'Make your first SFNZ classification',
},
{
id: 20000009,
name: 'Complete Solar Storm Watch tutorial',
},
{
id: 200000092,
name: 'Make your first SSW classification',
},
];

export async function GET(req: NextRequest) {
Expand Down
24 changes: 21 additions & 3 deletions app/api/gameplay/research/structures/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const ResearchedStructures: ResearchedStructureItem[] = [
name: "Rover camera receiver",
description: 'Used to decode messages from your rover and learn more about the terrain of your planet',
icon_url: '/assets/Items/CameraReceiver.png',
requiresMission: 1370203,
// requiresMission: 1370203,
usedFor: 13714101,
classificationType: 'roverImg',
item: 3102,
Expand All @@ -41,7 +41,7 @@ const ResearchedStructures: ResearchedStructureItem[] = [
name: "Lidar module",
description: 'Collect and study weather events and entitie',
icon_url: '/assets/Items/Scoper.png',
requiresMission: 1370203,
// requiresMission: 1370203,
usedFor: 137121301,
classificationType: 'clouds',
item: 3105,
Expand All @@ -52,12 +52,30 @@ const ResearchedStructures: ResearchedStructureItem[] = [
name: "Zoodex",
description: "Used to discover and collate animal & plant data",
icon_url: '/assets/Items/Pokedex.png',
requiresMission: 1370203,
// requiresMission: 1370203,
usedFor: 137121301,
classificationType: 'zoodex',
item: 3104,
chapter: 1,
},
{
id: 5,
name: "Launchpad",
description: "Launch rockets and satellites using your launchpad",
icon_url: '/assets/Items/Launchpad.jpg',
requiresMission: 10000004,
usedFor: 100000042,
item: 3107,
chapter: 1,
},
{
id: 6,
name: "Physics Lab",
description: 'Catalogue results from different particle experiments across the universe',
icon_url: '/assets/Items/PhysicsLab.png',
item: 31010,
chapter: 2,
}
];

export async function GET(req: NextRequest) {
Expand Down
30 changes: 30 additions & 0 deletions app/api/gameplay/research/travel/route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { NextRequest, NextResponse } from "next/server";

interface ResearchedTravelMethod {
id: number;
name: string;
description?: string;
icon_url: string;
requires?: number; // Does it require a research ticket previously?
requiresMission?: number;
// usedFor?: number; // Mission
};

const ResearchedTravelMethods: ResearchedTravelMethod[] = [
{
id: 94,
name: "Intra-Solar System Travel",
description: 'Travel to planets & moons within the solar system',
icon_url: '/assets/Items/Rocket.png',
},
{
id: 95,
name: "Unmanned Probe Deployments",
description: 'Deploy probes to planets & moons within the solar system',
icon_url: '/assets/Items/Probe.png',
},
];

export async function GET(req: NextRequest) {
return NextResponse.json(ResearchedTravelMethods);
};
7 changes: 0 additions & 7 deletions app/auth/UserProfileFields.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,7 @@ export function ProfileCard() {
}
};

const fetchMissions = async () => {
const res = await fetch('/api/gameplay/missions');
const data = await res.json();
setMissions(data);
};

fetchProfile();
fetchMissions();
}, [session]);

const handleFieldChange = (e: { target: { name: any; value: any; }; }) => {
Expand Down
Loading