From da9751c089b0bcaae4863ed31c079602da48f598 Mon Sep 17 00:00:00 2001 From: Lazzexus Date: Mon, 12 Oct 2026 18:16:20 +0200 Subject: [PATCH] Fix '/kafkatorio chunks' not sending most chunks - EventDataQueue.enqueue: `key ! in storage.store` parses as a non-null assertion followed by `in`, so the check was inverted: a key was only queued if it was already in the store. A first enqueue stored the event but never queued it, so it was never sent. - The chunks command keyed the queue with `${surface}${x}${y}`, so different chunks collided (e.g. surface 1, (1,12) and (11,2) both became "1112"). Separate the parts with '_'. Saves that ran the broken version keep orphaned queue entries; run `/kafkatorio init_global` once to clear them. Co-Authored-By: Claude Opus 5.5 --- .../src/main/typescript/main/commands/kafkatorioCommands.ts | 2 +- .../src/main/typescript/main/emitting/EventDataQueue.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/events-mod/src/main/typescript/main/commands/kafkatorioCommands.ts b/modules/events-mod/src/main/typescript/main/commands/kafkatorioCommands.ts index 09db2fc..9b06456 100644 --- a/modules/events-mod/src/main/typescript/main/commands/kafkatorioCommands.ts +++ b/modules/events-mod/src/main/typescript/main/commands/kafkatorioCommands.ts @@ -60,7 +60,7 @@ commands.add_command( } EventDataQueue.enqueue( - `${surface.index}${chunk.x}${chunk.y}`, + `${surface.index}_${chunk.x}_${chunk.y}`, data, 50 ) diff --git a/modules/events-mod/src/main/typescript/main/emitting/EventDataQueue.ts b/modules/events-mod/src/main/typescript/main/emitting/EventDataQueue.ts index d4e52ec..9158214 100644 --- a/modules/events-mod/src/main/typescript/main/emitting/EventDataQueue.ts +++ b/modules/events-mod/src/main/typescript/main/emitting/EventDataQueue.ts @@ -29,7 +29,7 @@ export class EventDataQueueManager { enqueue(key: string, event: EventData, weight: int = 1) { - if (key ! in storage.store) { + if (storage.store[key] == undefined) { let node = new Node(key, weight) if (storage.head == null) { storage.head = node