Refactored UPS monitor as clusterio plugin (#398)

* Refactor server ups

* Use catalogs

* Move to own plugin

* Use web config

* Remove External.get_server_ups

* Update workspace version requirement

* Remove need for storage

* Add locale

* Fix CI
This commit is contained in:
Cooldude2606
2025-08-08 16:36:22 +01:00
committed by GitHub
parent 69909e3202
commit ce80ae9021
34 changed files with 4620 additions and 167 deletions

30
exp_server_ups/index.ts Normal file
View File

@@ -0,0 +1,30 @@
import * as lib from "@clusterio/lib";
declare module "@clusterio/lib" {
export interface InstanceConfigFields {
"exp_server_ups.update_interval": number;
"exp_server_ups.average_interval": number;
}
}
export const plugin: lib.PluginDeclaration = {
name: "exp_server_ups",
title: "ExpGaming - Server UPS",
description: "Clusterio plugin providing in game server ups counter",
instanceEntrypoint: "./dist/node/instance",
instanceConfigFields: {
"exp_server_ups.update_interval": {
title: "Update Interval",
description: "Frequency at which updates are exchanged with factorio (ms)",
type: "number",
initialValue: 1000,
},
"exp_server_ups.average_interval": {
title: "Average Interval",
description: "Number of update intervals to average updates per second across",
type: "number",
initialValue: 60
},
},
};