Add Week 3 polish and late-game features

VC funding system (seed through IPO with requirements gating), 15
achievements with engine checker, model tuning presets and unlockable
sliders, overload policy controls, open-source mechanic with reputation
boost, enhanced Recharts analytics (subscriber/reputation/revenue vs
expenses charts), M&A acquisition system, sidebar NEW badges on era
transitions, tutorial hints, and wired-up settings toggles.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-24 17:56:40 -04:00
parent 8ea6c771a1
commit 8a8b49d934
20 changed files with 907 additions and 75 deletions
+20 -4
View File
@@ -4,8 +4,17 @@ import { useGameStore } from '@/store';
export function SettingsPage() {
const settings = useGameStore((s) => s.meta.settings);
const companyName = useGameStore((s) => s.meta.companyName);
const updateState = useGameStore((s) => s.updateState);
const fileInputRef = useRef<HTMLInputElement>(null);
const toggleSound = () => {
updateState({ meta: { ...useGameStore.getState().meta, settings: { ...settings, soundEnabled: !settings.soundEnabled } } });
};
const setMusicVolume = (v: number) => {
updateState({ meta: { ...useGameStore.getState().meta, settings: { ...settings, musicVolume: v } } });
};
const handleReset = () => {
if (confirm('Are you sure you want to reset all progress? This cannot be undone.')) {
localStorage.removeItem('ai-tycoon-save');
@@ -62,15 +71,22 @@ export function SettingsPage() {
<div className="text-sm">Sound Effects</div>
<div className="text-xs text-surface-400">Play UI sounds and notifications</div>
</div>
<ToggleSwitch checked={settings.soundEnabled} onChange={() => {}} />
<ToggleSwitch checked={settings.soundEnabled} onChange={toggleSound} />
</div>
<div className="flex items-center justify-between">
<div>
<div className="text-sm">Music</div>
<div className="text-xs text-surface-400">Background music (coming soon)</div>
<div className="text-sm">Music Volume</div>
<div className="text-xs text-surface-400">Background music level</div>
</div>
<ToggleSwitch checked={settings.soundEnabled} onChange={() => {}} />
<input
type="range"
min={0}
max={100}
value={settings.musicVolume * 100}
onChange={(e) => setMusicVolume(Number(e.target.value) / 100)}
className="w-32 accent-accent"
/>
</div>
</div>