mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 03:25:23 +09:00
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:
30
exp_server_ups/index.ts
Normal file
30
exp_server_ups/index.ts
Normal 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
|
||||
},
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user