import { BaseZoneScene } from './BaseZoneScene.js?v=20260427c';
import { recordLurk, recordPost } from '../systems/behavioral.js?v=20260427c';
import { ZONE_DEFINITIONS } from '../systems/session.js?v=20260427c';
export class Zone2Scene extends BaseZoneScene {
constructor() {
super('Zone2Scene', ZONE_DEFINITIONS[1]);
}
buildVerticalLevel() {
super.buildVerticalLevel();
for (let y = this.levelHeight - 360; y > 220; y -= 520) {
this.addSocialHub(y);
}
}
addSocialHub(y) {
const x = this.scale.width * 0.5;
const post = this.add.rectangle(x - 80, y, 116, 42, 0xff2d95, 0.95);
const lurk = this.add.rectangle(x + 80, y, 116, 42, 0x241233, 0.95);
this.add.text(post.x, y, 'POST', { fontFamily: 'system-ui', fontSize: '12px', color: '#fff', fontStyle: '700' }).setOrigin(0.5);
this.add.text(lurk.x, y, 'LURK', { fontFamily: 'system-ui', fontSize: '12px', color: '#fff', fontStyle: '700' }).setOrigin(0.5);
this.physics.add.existing(post, true);
this.physics.add.existing(lurk, true);
this.time.delayedCall(50, () => {
if (!this.player) return;
this.physics.add.overlap(this.player.sprite, post, () => {
if (post.used) return;
post.used = true;
recordPost(this.session);
this.session.currencies.cookies += 35;
this.algorithm.say('Your friends are helping. They are also expanding your social graph.');
});
this.physics.add.overlap(this.player.sprite, lurk, () => {
if (lurk.used) return;
lurk.used = true;
recordLurk(this.session);
this.algorithm.say('Lurking is private. It is also lonely, and there is no save animation.');
});
});
}
zonePrompts() {
return [
{
at: 12,
key: 'Sync contacts',
title: 'Sync your contacts?',
copy: 'Find friends, boost your score, and make the feed feel alive.',
accept: 'Sync',
decline: 'Skip',
onAccept: () => {
this.session.flags.syncedContacts = true;
this.session.currencies.cookies += 30;
recordPost(this.session);
this.algorithm.say('Wonderful. Your friends made the experience better for everyone watching.');
},
},
];
}
}