Remove events system entirely
CI / build-and-push (push) Successful in 36s

The random events (GPU shortages, regulatory hearings, PR crises, etc.)
added interruption without enough gameplay value. Removed all event
types, definitions (~1800 lines of event data), the event processor,
EventModal UI, store actions, and tick integration. Updated docs to
reflect the removal. Bundle size drops ~47kB.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-24 19:54:44 -04:00
parent 0005e580a7
commit 95f2f97121
16 changed files with 16 additions and 2191 deletions
+1 -21
View File
@@ -1,4 +1,4 @@
import type { GameState, EventDefinition, AchievementDefinition } from '@ai-tycoon/shared';
import type { GameState, AchievementDefinition } from '@ai-tycoon/shared';
import { processEconomy } from './systems/economySystem';
import { processInfrastructure } from './systems/infrastructureSystem';
import { processCompute } from './systems/computeSystem';
@@ -7,7 +7,6 @@ import { processModels } from './systems/modelSystem';
import { processMarket } from './systems/marketSystem';
import { processReputation } from './systems/reputationSystem';
import { processTalent } from './systems/talentSystem';
import { processEvents } from './systems/eventSystem';
import { processCompetitors } from './systems/competitorSystem';
import { processData } from './systems/dataSystem';
import { checkEraTransition } from './systems/eraSystem';
@@ -25,13 +24,8 @@ export interface TickNotification {
type: 'info' | 'success' | 'warning' | 'danger';
}
let cachedEventDefs: EventDefinition[] | null = null;
let cachedAchievementDefs: AchievementDefinition[] | null = null;
export function setEventDefinitions(defs: EventDefinition[]) {
cachedEventDefs = defs;
}
export function setAchievementDefinitions(defs: AchievementDefinition[]) {
cachedAchievementDefs = defs;
}
@@ -88,18 +82,6 @@ export function processTick(state: GameState): Partial<GameState> {
const data = processData(stateWithTalent);
const competitors = processCompetitors(stateWithTalent);
const eventResult = cachedEventDefs
? processEvents(stateWithTalent, cachedEventDefs)
: { events: state.events, newEvents: [] };
for (const evt of eventResult.newEvents) {
notifications.push({
title: evt.title,
message: evt.description,
type: evt.category === 'regulatory' ? 'warning' : 'info',
});
}
const tickCount = state.meta.tickCount + 1;
let meta = {
@@ -137,7 +119,6 @@ export function processTick(state: GameState): Partial<GameState> {
reputation,
data,
competitors,
events: eventResult.events,
achievements: state.achievements,
};
@@ -165,7 +146,6 @@ export function processTick(state: GameState): Partial<GameState> {
reputation,
data,
competitors,
events: eventResult.events,
achievements: achievementResult.achievements,
};