mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-11 23:04:52 +09:00
- QueueUpdateEvent, QueueEvent and QueueSyncRequest messages. - The controller keeps one queue (max 7 names) in research_queue.json, saved with the other data. - An update that changes the queue replaces it and is broadcast as QueueEvent; an equal update is ignored. - QueueSyncRequest returns the queue and seeds it from the request when the queue is empty. - A finished technology (completing contribution, advancing FinishedEvent, technology sync) drops its first queue entry without a broadcast. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
27 lines
635 B
TypeScript
27 lines
635 B
TypeScript
import type * as lib from "@clusterio/lib";
|
|
|
|
import * as messages from "./messages.js";
|
|
|
|
export const plugin: lib.PluginDeclaration = {
|
|
name: "research_sync",
|
|
title: "Research Sync",
|
|
description: "Synchronises technology research progress between instances.",
|
|
instanceEntrypoint: "dist/node/instance.js",
|
|
controllerEntrypoint: "dist/node/controller.js",
|
|
|
|
features: [
|
|
"SavePatching",
|
|
"ScriptCommands",
|
|
],
|
|
|
|
messages: [
|
|
messages.ContributionEvent,
|
|
messages.ProgressEvent,
|
|
messages.FinishedEvent,
|
|
messages.SyncTechnologiesRequest,
|
|
messages.QueueUpdateEvent,
|
|
messages.QueueEvent,
|
|
messages.QueueSyncRequest,
|
|
],
|
|
};
|