mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-13 23:14:53 +09:00
Also fixes react state management issues, moving a few things over to useRef and showing all instances instead of using a custom solution
34 lines
769 B
TypeScript
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"],
|
|
};
|