Files
factorio-clusterio/plugins/minimap/index.ts
T
Danielv123 fc466ec799 Add chart tag support
Also fixes react state management issues, moving a few things over to useRef and showing all instances instead of using a custom solution
2025-08-10 00:28:48 +02:00

34 lines
769 B
TypeScript

import * as lib from "@clusterio/lib";
import {
TileDataEvent,
ChartTagDataEvent,
GetRawTileRequest,
GetChartTagsRequest,
} from "./messages";
// Define permissions
lib.definePermission({
name: "minimap.view",
title: "View Minimap",
description: "View the interactive minimap of Factorio instances.",
grantByDefault: true,
});
export const plugin: lib.PluginDeclaration = {
name: "minimap",
title: "Minimap",
description: "Provides interactive minimaps of Factorio instances with real-time tile and entity data.",
instanceEntrypoint: "dist/node/instance",
controllerEntrypoint: "dist/node/controller",
webEntrypoint: "./web",
messages: [
TileDataEvent,
ChartTagDataEvent,
GetRawTileRequest,
GetChartTagsRequest,
],
routes: ["/minimap"],
};