fix: prod-bundle boot, cloud-existence leak, observation gating (final review)
- Wrap main.js body in async main() to eliminate top-level await deadlock in Rollup - Add npc.lastPlan so clouds persist after hidden arrival/destruction until analytic envelope expires - Add maxEnvelopeArrival() helper; rewrite playerClouds() to use lastPlan for envelope-gated clouds - Block markSeen() while player is mid-lane (no observation from hyperspace) - Pass obsSys=null to playerClouds when player is in a lane (don't exclude visible band from hyperspace) - Galaxy map clicks now select-only (intel); jumps via Nav buttons / gate diamonds only - Add preview script, favicon no-op, .playwright-mcp/ and *.png to .gitignore, update README controls text
This commit is contained in:
@@ -5,7 +5,7 @@ import { playerSystem } from '../sim/player.js';
|
||||
import { otherEnd } from '../sim/galaxy.js';
|
||||
|
||||
export class GalaxyView {
|
||||
// onSelectSystem(systemId) -> UI intel panel; onJump(laneId) -> goTo lane
|
||||
// onSelectSystem(systemId) -> UI intel panel
|
||||
constructor(renderer, world, { onSelectSystem, onJump }) {
|
||||
this.renderer = renderer;
|
||||
this.world = world;
|
||||
@@ -56,13 +56,6 @@ export class GalaxyView {
|
||||
}
|
||||
|
||||
handleSystemTap(systemId) {
|
||||
const sim = this.world;
|
||||
const cur = playerSystem(sim);
|
||||
// Clicking a neighbor = jump intent; clicking anything = intel selection.
|
||||
const lane = sim.galaxy.lanes.find(
|
||||
(l) => (l.a === cur && l.b === systemId) || (l.b === cur && l.a === systemId)
|
||||
);
|
||||
if (lane) this.onJump(lane.id);
|
||||
this.onSelectSystem(systemId);
|
||||
}
|
||||
|
||||
@@ -77,11 +70,13 @@ export class GalaxyView {
|
||||
const sim = this.world;
|
||||
const v = this.v;
|
||||
const cur = playerSystem(sim);
|
||||
// Mid-lane the player observes nothing; don't exclude any visible band.
|
||||
const obsSys = sim.player.loc.kind === 'lane' ? null : cur;
|
||||
|
||||
// Probability clouds: glowing strokes along lane segments, alpha ~ weight.
|
||||
const cg = this.cloudG;
|
||||
cg.clear();
|
||||
for (const cloud of playerClouds(sim, cur)) {
|
||||
for (const cloud of playerClouds(sim, obsSys)) {
|
||||
for (const seg of cloud.segs) {
|
||||
const lane = sim.galaxy.lanes[seg.laneId];
|
||||
const p0 = this.lanePoint(lane, seg.fromSys, seg.f0);
|
||||
|
||||
Reference in New Issue
Block a user