wip mission 2 refine
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
import type { Vector3Tuple } from "@/types/three/three";
|
||||
|
||||
export const PYLON_WORLD_POSITION: Vector3Tuple = [43, 5, 45];
|
||||
|
||||
export const PYLON_DOWNED_ROTATION: Vector3Tuple = [0, 0, -1.4];
|
||||
|
||||
export const PYLON_UPRIGHT_ROTATION: Vector3Tuple = [0, 0, 0];
|
||||
|
||||
export const PYLON_FARMER_NPC_POSITION: Vector3Tuple = [
|
||||
PYLON_WORLD_POSITION[0] - 6,
|
||||
PYLON_WORLD_POSITION[1],
|
||||
PYLON_WORLD_POSITION[2] + 4,
|
||||
];
|
||||
|
||||
export const PYLON_FARMER_NPC_AFTER_POSITION: Vector3Tuple = [
|
||||
PYLON_WORLD_POSITION[0] + 1,
|
||||
PYLON_WORLD_POSITION[1],
|
||||
PYLON_WORLD_POSITION[2] - 2,
|
||||
];
|
||||
|
||||
export const PYLON_NARRATIVE_INTERACT_RADIUS = 3.5;
|
||||
|
||||
export const PYLON_STRAIGHTEN_ANIMATION_DURATION_MS = 2200;
|
||||
|
||||
export const PYLON_NARRATIVE_DIALOGUES = {
|
||||
electricOutage: "narrateur_coupureelec",
|
||||
searchCentral: "narrateur_fouillelecentre",
|
||||
brokenPylon: "narrateur_poteaueleccasse",
|
||||
farmerHelp: "fermier_coupdemain",
|
||||
powerRestored: "narrateur_courantrepare",
|
||||
} as const;
|
||||
@@ -10,6 +10,9 @@ const REPAIR_MISSION_ID_VALUES: ReadonlySet<string> = new Set(
|
||||
|
||||
export const MISSION_STEPS = [
|
||||
"locked",
|
||||
"approaching",
|
||||
"arrived",
|
||||
"npc-return",
|
||||
"waiting",
|
||||
"inspected",
|
||||
"fragmented",
|
||||
@@ -17,6 +20,7 @@ export const MISSION_STEPS = [
|
||||
"repairing",
|
||||
"reassembling",
|
||||
"done",
|
||||
"narrator-outro",
|
||||
] as const satisfies readonly MissionStep[];
|
||||
const MISSION_STEP_VALUES: ReadonlySet<string> = new Set(MISSION_STEPS);
|
||||
|
||||
@@ -28,9 +32,18 @@ export function isMissionStep(value: string): value is MissionStep {
|
||||
return MISSION_STEP_VALUES.has(value);
|
||||
}
|
||||
|
||||
export function getNextMissionStep(step: MissionStep): MissionStep {
|
||||
export function getNextMissionStep(
|
||||
step: MissionStep,
|
||||
mission?: RepairMissionId,
|
||||
): MissionStep {
|
||||
switch (step) {
|
||||
case "locked":
|
||||
return mission === "pylon" ? "approaching" : "waiting";
|
||||
case "approaching":
|
||||
return "arrived";
|
||||
case "arrived":
|
||||
return "npc-return";
|
||||
case "npc-return":
|
||||
return "waiting";
|
||||
case "waiting":
|
||||
return "inspected";
|
||||
@@ -43,16 +56,29 @@ export function getNextMissionStep(step: MissionStep): MissionStep {
|
||||
case "repairing":
|
||||
return "reassembling";
|
||||
case "reassembling":
|
||||
case "done":
|
||||
return "done";
|
||||
case "done":
|
||||
return mission === "pylon" ? "narrator-outro" : "done";
|
||||
case "narrator-outro":
|
||||
return "narrator-outro";
|
||||
}
|
||||
}
|
||||
|
||||
export function getPreviousMissionStep(step: MissionStep): MissionStep {
|
||||
export function getPreviousMissionStep(
|
||||
step: MissionStep,
|
||||
mission?: RepairMissionId,
|
||||
): MissionStep {
|
||||
switch (step) {
|
||||
case "locked":
|
||||
case "waiting":
|
||||
return "locked";
|
||||
case "approaching":
|
||||
return "locked";
|
||||
case "arrived":
|
||||
return "approaching";
|
||||
case "npc-return":
|
||||
return "arrived";
|
||||
case "waiting":
|
||||
return mission === "pylon" ? "npc-return" : "locked";
|
||||
case "inspected":
|
||||
return "waiting";
|
||||
case "fragmented":
|
||||
@@ -65,5 +91,7 @@ export function getPreviousMissionStep(step: MissionStep): MissionStep {
|
||||
return "repairing";
|
||||
case "done":
|
||||
return "reassembling";
|
||||
case "narrator-outro":
|
||||
return "done";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
import type { ZoneConfig } from "@/types/gameplay/zone";
|
||||
import { PYLON_WORLD_POSITION } from "@/data/gameplay/pylonConfig";
|
||||
|
||||
export const PYLON_APPROACH_ZONE: ZoneConfig = {
|
||||
id: "pylon-approach",
|
||||
position: [
|
||||
PYLON_WORLD_POSITION[0] - 20,
|
||||
PYLON_WORLD_POSITION[1],
|
||||
PYLON_WORLD_POSITION[2] - 5,
|
||||
],
|
||||
radius: 12,
|
||||
height: 18,
|
||||
oneShot: true,
|
||||
};
|
||||
|
||||
export const PYLON_ARRIVED_ZONE: ZoneConfig = {
|
||||
id: "pylon-arrived",
|
||||
position: [
|
||||
PYLON_WORLD_POSITION[0] - 3,
|
||||
PYLON_WORLD_POSITION[1],
|
||||
PYLON_WORLD_POSITION[2] + 2,
|
||||
],
|
||||
radius: 8,
|
||||
height: 15,
|
||||
oneShot: true,
|
||||
};
|
||||
Reference in New Issue
Block a user