BLOBBO/src/machine/index.ts
type-two 856683832b feat(machine): colour-keyed gate — paint decides your route
createColorGate: a portcullis that stays shut unless an approaching blob
carries enough of a keyed colour (integration injects `qualifies()`, so the
part never imports the paint lane), then slides into the floor and closes
behind. GDD §5.4 colour-keyed shortcut — closes the core loop solo: the course
paints you, and being painted opens your route.

Placed a GREEN gate on the centre lane before the finish with short flank walls
(clear of the fork exits): roll over the green reward mine upstream → arrive
green → the gate opens for a straight shot; arrive un-green → detour around.

Door animation lives in the FIXED step, not onFrame — the door is a collider,
and onFrame stalls in a hidden tab (the lesson telegraph.ts/BucketDump already
learned; hit and fixed here). Browser-verified all three cases: opens on green
(59-74%), stays shut for a non-green blob in the zone, closes when the blob
leaves. typecheck + build green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-19 14:44:06 +10:00

40 lines
875 B
TypeScript

/**
* Lane C — Machine toolkit public surface.
* Contraptions chain via `world.events` ('machine:signal') and talk to the paint
* lane via 'paint:request-splat' / 'paint:request-cleanse' only.
*/
export { telegraph, isTelegraphing } from './telegraph'
export type { TelegraphOptions } from './telegraph'
export {
SURFACES,
SurfaceRegistry,
applySurface,
} from './surfaces'
export type { SurfaceName, SurfaceMaterial } from './surfaces'
export {
createPressurePlate,
createSpringBoot,
createSeeSaw,
createBucketDump,
createConveyorBelt,
createBubbleArch,
createFan,
createPaintMine,
createColorGate,
} from './parts'
export type {
Vec3,
MachinePart,
PressurePlateConfig,
SpringBootConfig,
SeeSawConfig,
BucketDumpConfig,
ConveyorBeltConfig,
BubbleArchConfig,
FanConfig,
PaintMineConfig,
ColorGateConfig,
} from './parts'