From 4de86f4e58b8c1fef474f374b159aa0fbb140c4a Mon Sep 17 00:00:00 2001 From: Tom Boullay Date: Tue, 2 Jun 2026 19:01:47 +0200 Subject: [PATCH] feat(repair): align mission data with new pylone glb and broken-part workflow - Update pylone path references from /models/pylone/model.gltf to .glb (galleryModels, mapInstancingConfig, repairMissions). The new glb exports a single cable node 'cable2' (no cable1). - Pylon brokenParts: drop lampe and panneau2; the pylon design no longer has detached broken pieces (the cable is just missing from the model). - Pylon replacement cables target the pylon's 'cable2' node world position via targetNodeName (used by the upcoming broken-anchor wiring). - Ebike refroidisseur replacement and brokenPart both target the bike's 'refroidisseur' node so the broken piece spawns from its original location and the replacement can install in the same slot. --- src/data/galleryModels.ts | 2 +- src/data/gameplay/repairMissions.ts | 21 ++++++--------------- src/data/world/mapInstancingConfig.ts | 2 +- 3 files changed, 8 insertions(+), 17 deletions(-) diff --git a/src/data/galleryModels.ts b/src/data/galleryModels.ts index 3b38774..026570d 100644 --- a/src/data/galleryModels.ts +++ b/src/data/galleryModels.ts @@ -135,7 +135,7 @@ export const galleryModels: GalleryModel[] = [ }, { id: "potager", name: "Potager", path: "/models/potager/potager.gltf" }, { id: "puce", name: "Puce", path: "/models/puce/model.gltf" }, - { id: "pylone", name: "Pylône", path: "/models/pylone/model.gltf" }, + { id: "pylone", name: "Pylône", path: "/models/pylone/model.glb" }, { id: "refroidisseur", name: "Refroidisseur", diff --git a/src/data/gameplay/repairMissions.ts b/src/data/gameplay/repairMissions.ts index 01b4e22..7cde660 100644 --- a/src/data/gameplay/repairMissions.ts +++ b/src/data/gameplay/repairMissions.ts @@ -32,6 +32,7 @@ export const REPAIR_MISSIONS: Record = { label: "Cooling core", modelPath: "/models/refroidisseur/model.gltf", nodeName: "refroidisseur", + targetNodeName: "refroidisseur", caseSlotName: "placeholder_1", }, ], @@ -41,6 +42,7 @@ export const REPAIR_MISSIONS: Record = { label: "Refroidisseur", modelPath: "/models/refroidisseur/model.gltf", caseAnchor: "refroidisseur", + targetNodeName: "refroidisseur", }, { id: "ebike-cable-right-distractor", @@ -73,7 +75,7 @@ export const REPAIR_MISSIONS: Record = { label: "Power pylon", description: "Restore the pylon lamp relay and damaged panel before reconnecting the grid", - modelPath: "/models/pylone/model.gltf", + modelPath: "/models/pylone/model.glb", stageUiPath: "/assets/world/UI/pylon-mission-notification.webm", interactUiPath: REPAIR_INTERACT_UI_PATH, brokenUiPath: REPAIR_BROKEN_UI_PATH, @@ -84,20 +86,7 @@ export const REPAIR_MISSIONS: Record = { "pylon-cable-left-replacement", ], scanPartSeconds: 1.4, - brokenParts: [ - { - id: "pylon-grid-relay", - label: "Grid relay", - nodeName: "lampe", - caseSlotName: "placeholder_1", - }, - { - id: "pylon-damaged-panel", - label: "Damaged solar panel", - nodeName: "panneau2", - caseSlotName: "placeholder_2", - }, - ], + brokenParts: [], replacementParts: [ { id: "pylon-cable-right-replacement", @@ -105,6 +94,7 @@ export const REPAIR_MISSIONS: Record = { modelPath: "/models/cable1/model.gltf", caseAnchor: "cabledroit", caseLockGroup: "pylon-cable", + targetNodeName: "cable2", }, { id: "pylon-cable-left-replacement", @@ -112,6 +102,7 @@ export const REPAIR_MISSIONS: Record = { modelPath: "/models/cable2/model.gltf", caseAnchor: "cablegauche", caseLockGroup: "pylon-cable", + targetNodeName: "cable2", }, { id: "pylon-cooling-distractor", diff --git a/src/data/world/mapInstancingConfig.ts b/src/data/world/mapInstancingConfig.ts index 0c8466c..99bc026 100644 --- a/src/data/world/mapInstancingConfig.ts +++ b/src/data/world/mapInstancingConfig.ts @@ -9,7 +9,7 @@ export const MAP_INSTANCING_ASSETS = { }, pylone: { mapName: "pylone", - modelPath: "/models/pylone/model.gltf", + modelPath: "/models/pylone/model.glb", scaleMultiplier: 1, castShadow: true, receiveShadow: true,