Skip to content

Commit 4758ea7

Browse files
authored
πŸ’§πŸŽ« ↝ [SSG-69 SSG-64 SSG-78]: Merge pull request #165 from Signal-K/SSG-69
πŸš₯πŸ’§ ↝ [SSG-69 SSG-64 SSG-78]: New Community Missions, Beginning #Chapter-2 flow
2 parents c81717b + 0188958 commit 4758ea7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+3288
-3329
lines changed

β€Žapp/api/gameplay/missions/archive/route.ts

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { NextRequest, NextResponse } from "next/server";
2-
import { MineralDepositsNoAction } from "@/components/Structures/Mining/Archive/AvailableDeposits";
32

43
interface UserMissionInstance {
54
id: number;
@@ -131,7 +130,7 @@ const missions: Mission[] = [
131130
chapter: 1,
132131
classificationModule: "Zoodex",
133132
sequence: 3,
134-
component: MineralDepositsNoAction,
133+
// component: MineralDepositsNoAction,
135134
structure: 3104
136135
},
137136
// Telescope mission group (t.m.) (MG-T-##)
@@ -298,7 +297,7 @@ const missions: Mission[] = [
298297
chapter: 1,
299298
classificationModule: "Zoodex",
300299
sequence: 3,
301-
component: MineralDepositsNoAction,
300+
// component: MineralDepositsNoAction,
302301
},
303302
// Telescope mission group (t.m.) (MG-T-##)
304303
{
@@ -323,7 +322,7 @@ const missions: Mission[] = [
323322
{
324323
id: 1372002, name: "Repair your telescope", classificationModule: "Telescope", chapter: 1,
325324
// sequence: 5+,
326-
component: MineralDepositsNoAction,
325+
// component: MineralDepositsNoAction,
327326
},
328327
{
329328
id: 13712602, name: "Repair your Zoodex module", classificationModule: "Zoodex", chapter: 1,

β€Žapp/api/gameplay/missions/route.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { NextRequest, NextResponse } from "next/server";
2-
import { MineralDepositsNoAction } from "@/components/Structures/Mining/Archive/AvailableDeposits";
32

43
export interface Mission {
54
id: number;

β€Žapp/auth/onlineUsers.tsx

-49
This file was deleted.

β€Žapp/metadata.tsx

-4
This file was deleted.

β€Žapp/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export default function Home() {
7676
<div className="py-1">
7777
<EnhancedWeatherEvents />
7878
</div>
79-
<center>
79+
<center>
8080
<OrbitalStructuresOnPlanet />
8181
</center>
8282
</div>

β€Žapp/scenes/earth/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import StructuresOnPlanet, {
1313
import AllAutomatonsOnActivePlanet from "@/components/Structures/Auto/AllAutomatons";
1414
import InventoryPage from "@/components/Inventory/Grid/Grid";
1515
import EnhancedWeatherEventsComponent from "@/components/enhanced-weather-events";
16-
import TopographicMap from "@/components/topographic-map";
16+
// import TopographicMap from "@/components/topographic-map";
1717

1818
const EarthView: React.FC = () => {
1919
const { activePlanet, updatePlanetLocation } = useActivePlanet();

β€Žapp/scenes/mars/page.tsx

+35-29
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ import React, { useEffect, useState } from "react";
44
import { useSupabaseClient, useSession } from "@supabase/auth-helpers-react";
55
import { useActivePlanet } from "@/context/ActivePlanet";
66

7-
import { EarthViewLayout } from "@/components/(scenes)/planetScene/layout";
7+
import { EarthActionSceneLayout, EarthViewLayout, MarsActionSceneLayout } from "@/components/(scenes)/planetScene/layout";
88
import InitialisePlanet from "@/components/(scenes)/planetScene/initialisePlanet";
99
import StructuresOnPlanet, { AtmosphereStructuresOnPlanet, OrbitalStructuresOnPlanet } from "@/components/Structures/Structures";
1010
import { InventoryStructureItem } from "@/types/Items";
1111
import { PlanetarySystem } from "@/components/(scenes)/planetScene/orbitals/system";
1212
import AllAutomatonsOnActivePlanet from "@/components/Structures/Auto/AllAutomatons";
13+
import { MiningComponentComponent } from "@/components/mining-component";
14+
import StructureMissionGuide from "@/components/Layout/Guide";
1315

1416
const MarsView: React.FC = () => {
1517
const supabase = useSupabaseClient();
@@ -53,33 +55,37 @@ export default MarsView;
5355

5456
const MarsStructures: React.FC = () => {
5557
return (
56-
<EarthViewLayout>
57-
<div className="w-full">
58-
<div className="flex flex-row space-y-4"></div>
59-
<div className="py-3">
60-
<div className="py-1">
61-
<PlanetarySystem />
62-
</div>
63-
<center>
64-
<OrbitalStructuresOnPlanet />
65-
</center>
66-
</div>
67-
</div>
68-
<div className="w-full">
69-
<div className="py-2">
70-
<center>
71-
<AtmosphereStructuresOnPlanet />
72-
</center>
73-
</div>
74-
</div>
75-
<div className="w-full">
76-
<center>
77-
<StructuresOnPlanet />
78-
</center>
79-
</div>
80-
<div className="relative flex-1">
81-
<AllAutomatonsOnActivePlanet />
82-
</div>
83-
</EarthViewLayout>
58+
<MarsActionSceneLayout>
59+
<MiningComponentComponent />
60+
<StructureMissionGuide />
61+
</MarsActionSceneLayout>
62+
// <EarthViewLayout>
63+
// <div className="w-full">
64+
// <div className="flex flex-row space-y-4"></div>
65+
// <div className="py-3">
66+
// <div className="py-1">
67+
// <PlanetarySystem />
68+
// </div>
69+
// <center>
70+
// <OrbitalStructuresOnPlanet />
71+
// </center>
72+
// </div>
73+
// </div>
74+
// <div className="w-full">
75+
// <div className="py-2">
76+
// <center>
77+
// <AtmosphereStructuresOnPlanet />
78+
// </center>
79+
// </div>
80+
// </div>
81+
// <div className="w-full">
82+
// <center>
83+
// <StructuresOnPlanet />
84+
// </center>
85+
// </div>
86+
// <div className="relative flex-1">
87+
// <AllAutomatonsOnActivePlanet />
88+
// </div>
89+
// </EarthViewLayout>
8490
);
8591
};

β€Žapp/scenes/mining/page.tsx

+3-50
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@
22

33
import React, { useState } from "react";
44
import { useActivePlanet } from "@/context/ActivePlanet";
5-
import MineralDeposits from "@/components/Structures/Mining/Archive/AvailableDeposits";
6-
import { SelectMineralPanel } from "@/components/Structures/Mining/Archive/MiningPanels";
75
import MineralsInventoryGrid from "@/components/Inventory/mineralsPanel";
8-
import { MiningComponent } from "@/components/Structures/Mining/Mining";
96
import StarnetLayout from "@/components/Layout/Starnet";
107
import { EarthActionSceneLayout, EarthViewLayout } from "@/components/(scenes)/planetScene/layout";
118
import StructureMissionGuide from "@/components/Layout/Guide";
9+
import { MiningComponentComponent } from "@/components/mining-component";
1210

1311
enum Step {
1412
MineralDeposits = "MINERAL_DEPOSITS",
@@ -18,53 +16,8 @@ enum Step {
1816
export default function Mining() {
1917
return (
2018
<EarthActionSceneLayout>
21-
<MiningComponent />
19+
<MiningComponentComponent />
2220
<StructureMissionGuide />
2321
</EarthActionSceneLayout>
24-
);
25-
};
26-
27-
function MiningScene() {
28-
const { activePlanet } = useActivePlanet();
29-
30-
const [currentStep, setCurrentStep] = useState<Step>(Step.MineralDeposits);
31-
const [selectedDeposit, setSelectedDeposit] = useState<null | any>(null);
32-
33-
const handleSelectDeposit = (deposit: any) => {
34-
setSelectedDeposit(deposit);
35-
setCurrentStep(Step.MineralDetails);
36-
};
37-
38-
const handleBack = () => {
39-
setCurrentStep(Step.MineralDeposits);
40-
setSelectedDeposit(null);
41-
};
42-
43-
return (
44-
<StarnetLayout>
45-
<div className="flex flex-col min-h-screen">
46-
{currentStep === Step.MineralDeposits && (
47-
<div className="flex flex-col md:flex-row">
48-
<div className="flex-1 p-4 px-12 rounded-r-lg shadow-lg md:rounded-r-lg border-r border-red-300">
49-
<MineralDeposits onSelectDeposit={handleSelectDeposit} />
50-
</div>
51-
</div>
52-
)}
53-
54-
{currentStep === Step.MineralDetails && selectedDeposit && (
55-
<div className="flex flex-col md:flex-row">
56-
<div className="flex-1 md p-4 px-12 rounded-r-lg shadow-lg md:rounded-r-lg border-r border-red-300">
57-
<button
58-
className="mb-4 bg-[#2C3A4A] text-white px-4 py-2 rounded"
59-
onClick={handleBack}
60-
>
61-
Back
62-
</button>
63-
<SelectMineralPanel deposit={selectedDeposit} />
64-
</div>
65-
</div>
66-
)}
67-
</div>
68-
</StarnetLayout>
69-
);
22+
);
7023
};

β€Žapp/scenes/travel/page.tsx

+32-8
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,36 @@ import { useActivePlanet } from "@/context/ActivePlanet";
66
import SwitchPlanet from "@/components/(scenes)/travel/SolarSystem";
77
import StarnetLayout from "@/components/Layout/Starnet";
88

9-
export default function Travel() {
9+
import PlanetSelector from "@/components/(scenes)/travel/PlanetSelector";
10+
11+
export default function Home() {
12+
const session = useSession();
13+
14+
const mockUser = {
15+
id: "1",
16+
name: session?.user?.id || "Guest",
17+
avatar: "/placeholder.svg?height=40&width=40",
18+
frequentFlyerNumber: "SF123456",
19+
frequentFlyerStatus: "Gold" as "Gold",
20+
};
21+
1022
return (
11-
<StarnetLayout>
12-
<main className="container mx-auto px-4 py-6 relative z-8">
13-
<center><SwitchPlanet /></center>
14-
</main>
15-
</StarnetLayout>
16-
)
17-
};
23+
<main className="min-h-screen bg-[#1D2833] text-[#F7F5E9] p-4 sm:p-6 md:p-8">
24+
<PlanetSelector
25+
user={mockUser}
26+
onSelect={(planet) => console.log("Selected planet:", planet.name)}
27+
/>
28+
</main>
29+
);
30+
};
31+
32+
33+
// export default function Travel() {
34+
// return (
35+
// <StarnetLayout>
36+
// <main className="container mx-auto px-4 py-6 relative z-8">
37+
// {/* <center><SwitchPlanet /></center> */}
38+
// </main>
39+
// </StarnetLayout>
40+
// )
41+
// };

0 commit comments

Comments
Β (0)