Skip to content

Commit

Permalink
πŸ’§πŸŽ« ↝ [SSG-69 SSG-64 SSG-78]: Merge pull request #165 from Signal-K/SS…
Browse files Browse the repository at this point in the history
…G-69

πŸš₯πŸ’§ ↝ [SSG-69 SSG-64 SSG-78]: New Community Missions, Beginning #Chapter-2 flow
  • Loading branch information
Gizmotronn authored Dec 1, 2024
2 parents c81717b + 0188958 commit 4758ea7
Show file tree
Hide file tree
Showing 55 changed files with 3,288 additions and 3,329 deletions.
7 changes: 3 additions & 4 deletions app/api/gameplay/missions/archive/route.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { NextRequest, NextResponse } from "next/server";
import { MineralDepositsNoAction } from "@/components/Structures/Mining/Archive/AvailableDeposits";

interface UserMissionInstance {
id: number;
Expand Down Expand Up @@ -131,7 +130,7 @@ const missions: Mission[] = [
chapter: 1,
classificationModule: "Zoodex",
sequence: 3,
component: MineralDepositsNoAction,
// component: MineralDepositsNoAction,
structure: 3104
},
// Telescope mission group (t.m.) (MG-T-##)
Expand Down Expand Up @@ -298,7 +297,7 @@ const missions: Mission[] = [
chapter: 1,
classificationModule: "Zoodex",
sequence: 3,
component: MineralDepositsNoAction,
// component: MineralDepositsNoAction,
},
// Telescope mission group (t.m.) (MG-T-##)
{
Expand All @@ -323,7 +322,7 @@ const missions: Mission[] = [
{
id: 1372002, name: "Repair your telescope", classificationModule: "Telescope", chapter: 1,
// sequence: 5+,
component: MineralDepositsNoAction,
// component: MineralDepositsNoAction,
},
{
id: 13712602, name: "Repair your Zoodex module", classificationModule: "Zoodex", chapter: 1,
Expand Down
1 change: 0 additions & 1 deletion app/api/gameplay/missions/route.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { NextRequest, NextResponse } from "next/server";
import { MineralDepositsNoAction } from "@/components/Structures/Mining/Archive/AvailableDeposits";

export interface Mission {
id: number;
Expand Down
49 changes: 0 additions & 49 deletions app/auth/onlineUsers.tsx

This file was deleted.

4 changes: 0 additions & 4 deletions app/metadata.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export default function Home() {
<div className="py-1">
<EnhancedWeatherEvents />
</div>
<center>
<center>
<OrbitalStructuresOnPlanet />
</center>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/scenes/earth/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import StructuresOnPlanet, {
import AllAutomatonsOnActivePlanet from "@/components/Structures/Auto/AllAutomatons";
import InventoryPage from "@/components/Inventory/Grid/Grid";
import EnhancedWeatherEventsComponent from "@/components/enhanced-weather-events";
import TopographicMap from "@/components/topographic-map";
// import TopographicMap from "@/components/topographic-map";

const EarthView: React.FC = () => {
const { activePlanet, updatePlanetLocation } = useActivePlanet();
Expand Down
64 changes: 35 additions & 29 deletions app/scenes/mars/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ import React, { useEffect, useState } from "react";
import { useSupabaseClient, useSession } from "@supabase/auth-helpers-react";
import { useActivePlanet } from "@/context/ActivePlanet";

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

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

const MarsStructures: React.FC = () => {
return (
<EarthViewLayout>
<div className="w-full">
<div className="flex flex-row space-y-4"></div>
<div className="py-3">
<div className="py-1">
<PlanetarySystem />
</div>
<center>
<OrbitalStructuresOnPlanet />
</center>
</div>
</div>
<div className="w-full">
<div className="py-2">
<center>
<AtmosphereStructuresOnPlanet />
</center>
</div>
</div>
<div className="w-full">
<center>
<StructuresOnPlanet />
</center>
</div>
<div className="relative flex-1">
<AllAutomatonsOnActivePlanet />
</div>
</EarthViewLayout>
<MarsActionSceneLayout>
<MiningComponentComponent />
<StructureMissionGuide />
</MarsActionSceneLayout>
// <EarthViewLayout>
// <div className="w-full">
// <div className="flex flex-row space-y-4"></div>
// <div className="py-3">
// <div className="py-1">
// <PlanetarySystem />
// </div>
// <center>
// <OrbitalStructuresOnPlanet />
// </center>
// </div>
// </div>
// <div className="w-full">
// <div className="py-2">
// <center>
// <AtmosphereStructuresOnPlanet />
// </center>
// </div>
// </div>
// <div className="w-full">
// <center>
// <StructuresOnPlanet />
// </center>
// </div>
// <div className="relative flex-1">
// <AllAutomatonsOnActivePlanet />
// </div>
// </EarthViewLayout>
);
};
53 changes: 3 additions & 50 deletions app/scenes/mining/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@

import React, { useState } from "react";
import { useActivePlanet } from "@/context/ActivePlanet";
import MineralDeposits from "@/components/Structures/Mining/Archive/AvailableDeposits";
import { SelectMineralPanel } from "@/components/Structures/Mining/Archive/MiningPanels";
import MineralsInventoryGrid from "@/components/Inventory/mineralsPanel";
import { MiningComponent } from "@/components/Structures/Mining/Mining";
import StarnetLayout from "@/components/Layout/Starnet";
import { EarthActionSceneLayout, EarthViewLayout } from "@/components/(scenes)/planetScene/layout";
import StructureMissionGuide from "@/components/Layout/Guide";
import { MiningComponentComponent } from "@/components/mining-component";

enum Step {
MineralDeposits = "MINERAL_DEPOSITS",
Expand All @@ -18,53 +16,8 @@ enum Step {
export default function Mining() {
return (
<EarthActionSceneLayout>
<MiningComponent />
<MiningComponentComponent />
<StructureMissionGuide />
</EarthActionSceneLayout>
);
};

function MiningScene() {
const { activePlanet } = useActivePlanet();

const [currentStep, setCurrentStep] = useState<Step>(Step.MineralDeposits);
const [selectedDeposit, setSelectedDeposit] = useState<null | any>(null);

const handleSelectDeposit = (deposit: any) => {
setSelectedDeposit(deposit);
setCurrentStep(Step.MineralDetails);
};

const handleBack = () => {
setCurrentStep(Step.MineralDeposits);
setSelectedDeposit(null);
};

return (
<StarnetLayout>
<div className="flex flex-col min-h-screen">
{currentStep === Step.MineralDeposits && (
<div className="flex flex-col md:flex-row">
<div className="flex-1 p-4 px-12 rounded-r-lg shadow-lg md:rounded-r-lg border-r border-red-300">
<MineralDeposits onSelectDeposit={handleSelectDeposit} />
</div>
</div>
)}

{currentStep === Step.MineralDetails && selectedDeposit && (
<div className="flex flex-col md:flex-row">
<div className="flex-1 md p-4 px-12 rounded-r-lg shadow-lg md:rounded-r-lg border-r border-red-300">
<button
className="mb-4 bg-[#2C3A4A] text-white px-4 py-2 rounded"
onClick={handleBack}
>
Back
</button>
<SelectMineralPanel deposit={selectedDeposit} />
</div>
</div>
)}
</div>
</StarnetLayout>
);
);
};
40 changes: 32 additions & 8 deletions app/scenes/travel/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,36 @@ import { useActivePlanet } from "@/context/ActivePlanet";
import SwitchPlanet from "@/components/(scenes)/travel/SolarSystem";
import StarnetLayout from "@/components/Layout/Starnet";

export default function Travel() {
import PlanetSelector from "@/components/(scenes)/travel/PlanetSelector";

export default function Home() {
const session = useSession();

const mockUser = {
id: "1",
name: session?.user?.id || "Guest",
avatar: "/placeholder.svg?height=40&width=40",
frequentFlyerNumber: "SF123456",
frequentFlyerStatus: "Gold" as "Gold",
};

return (
<StarnetLayout>
<main className="container mx-auto px-4 py-6 relative z-8">
<center><SwitchPlanet /></center>
</main>
</StarnetLayout>
)
};
<main className="min-h-screen bg-[#1D2833] text-[#F7F5E9] p-4 sm:p-6 md:p-8">
<PlanetSelector
user={mockUser}
onSelect={(planet) => console.log("Selected planet:", planet.name)}
/>
</main>
);
};


// export default function Travel() {
// return (
// <StarnetLayout>
// <main className="container mx-auto px-4 py-6 relative z-8">
// {/* <center><SwitchPlanet /></center> */}
// </main>
// </StarnetLayout>
// )
// };
Loading

0 comments on commit 4758ea7

Please sign in to comment.