Skip to content

Commit ce1fe85

Browse files
committed
🎍⛑ ↝ [SSP-36 SSC-41]: Removing some old mining components and a final mission list with increased relevance is in the final stages️
1 parent ecb6ace commit ce1fe85

File tree

15 files changed

+9
-1486
lines changed

15 files changed

+9
-1486
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/scenes/mining/page.tsx

+2-49
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>
2422
);
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-
);
7023
};

‎app/tests/page.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import React from "react";
44
import StarnetLayout from "@/components/Layout/Starnet";
55
import { MiningComponentComponent } from "@/components/mining-component";
6-
import { MiningComponent } from "@/components/Structures/Mining/Mining";
76
// import { TopographicMap } from "@/components/topographic-map";
87

98
export default function TestPage() {

‎components/Structures/Auto/AllAutomatons.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import React, { useState, useEffect } from "react";
44
import { useSession, useSupabaseClient } from "@supabase/auth-helpers-react";
55
import { useActivePlanet } from "@/context/ActivePlanet";
6-
import { MiningComponent } from "../Mining/Mining";
6+
import { MiningComponentComponent } from "@/components/mining-component";
77

88
interface InventoryItem {
99
id: number;
@@ -116,7 +116,7 @@ export default function AllAutomatonsOnActivePlanet() {
116116
&times;
117117
</button>
118118

119-
<MiningComponent />
119+
<MiningComponentComponent />
120120
</div>
121121
</div>
122122
)}

‎components/Structures/Mining/Archive/AvailableDeposits.tsx

-206
This file was deleted.

0 commit comments

Comments
 (0)