MCPcopy Create free account
hub / github.com/YGYOOO/WorldX / addEvents

Method addEvents

client/src/systems/EventQueue.ts:7–16  ·  view source on GitHub ↗
(events: SimulationEvent[])

Source from the content-addressed store, hash-verified

5 private emittedIds = new Set<string>();
6
7 addEvents(events: SimulationEvent[]): void {
8 for (const e of events) {
9 if (!this.emittedIds.has(e.id)) {
10 this.buffer.push(e);
11 }
12 }
13 this.buffer.sort((a, b) =>
14 a.gameDay !== b.gameDay ? a.gameDay - b.gameDay : a.gameTick - b.gameTick
15 );
16 }
17
18 releaseUpTo(day: number, tick: number): SimulationEvent[] {
19 const toRelease: SimulationEvent[] = [];

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected