feat: night freight container yard works through the additional work chapter

This commit is contained in:
2026-10-11 11:52:27 +03:00
parent 4e097e5ef9
commit ca12cfda44
13 changed files with 831 additions and 0 deletions

View File

@@ -41,6 +41,7 @@ import { createMilestones } from '@/scene/world/milestones';
import { billboardNear, createBillboard, textureSize } from '@/scene/world/billboard';
import { BILLBOARD_NUDGE, RELAY_NUDGE } from '@/scene/world/composition';
import { createRelayMasts } from '@/scene/world/relay-masts';
import { createYard } from '@/scene/world/yard';
import { isMilestoneSection, sectionLocalProgress } from '@/journey/route-log';
import { dawnStep, type DawnStep } from '@/journey/dawn';
import { dawnLightUniforms } from '@/scene/world/dawn-light';
@@ -207,12 +208,16 @@ export async function createProceduralSceneGeneration(
&& (globalThis.navigator as { connection?: { saveData?: boolean } } | undefined)?.connection?.saveData !== true,
fogColor: scene.fog.color,
});
// NIGHT FREIGHT: a gantry crane works the Additional work container yard.
// Low tier and touch: crane, stacks and plates; no floods, lamps or pulse.
const yard = createYard(context.resources, maintenanceTier === 'full');
let underpassShade = 0;
let underpassKey = '';
let underpassAttr = false;
scene.add(
underpass.group,
relay.group,
yard.group,
billboard.mesh,
maintenance.group,
milestones.mesh,
@@ -427,6 +432,16 @@ export async function createProceduralSceneGeneration(
musicPulse,
deltaSeconds,
);
// The deck from the previous frame (underpass updates after the sign).
const yardDeck = underpass.inspect();
yard.update(
snapshot.activeSectionId,
sectionLocalProgress(snapshot, 'additional-work'),
musicPulse,
deltaSeconds,
yardDeck.visible ? yardDeck.z : null,
camera.aspect,
);
const relayNudge = relay.update(
snapshot.activeSectionId,
snapshot.activeSectionId === 'toolkit' ? sectionLocalProgress(snapshot, 'toolkit') : null,