mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-11 23:04:52 +09:00
* .jsx to .tsx * controller: tsc --build before webpack-cli * Type Annotation * disabled move into the <Input/> and <Checkbox/> * cleanup debug left over * documentation * default ModPack * modPackUpdateHandlers no undefined * PluginInfo changes proposition * PluginInfo changes proposition miss * ModRecord & ModInfo feedback loop at const mods = [ ? * ["connect", "drop", "resume", "close"] as const * .tsx to .ts when possible
39 lines
1.1 KiB
TypeScript
39 lines
1.1 KiB
TypeScript
import * as lib from "@clusterio/lib";
|
|
import * as messages from "./messages";
|
|
|
|
class ControllerConfigGroup extends lib.PluginConfigGroup {}
|
|
ControllerConfigGroup.defaultAccess = ["controller", "host", "control"];
|
|
ControllerConfigGroup.groupName = "player_auth";
|
|
ControllerConfigGroup.define({
|
|
name: "code_length",
|
|
title: "Code Length",
|
|
description: "Length in characters of the generated codes.",
|
|
type: "number",
|
|
initial_value: 6,
|
|
});
|
|
ControllerConfigGroup.define({
|
|
name: "code_timeout",
|
|
title: "Code Timeout",
|
|
description: "Time in seconds for the generated codes to stay valid.",
|
|
type: "number",
|
|
initial_value: 120,
|
|
});
|
|
ControllerConfigGroup.finalize();
|
|
|
|
const info: lib.PluginDeclaration = {
|
|
name: "player_auth",
|
|
title: "Player Auth",
|
|
description: "Provides authentication to the cluster via logging into a Factorio server.",
|
|
controllerEntrypoint: "dist/plugin/controller",
|
|
instanceEntrypoint: "dist/plugin/instance",
|
|
webEntrypoint: "./web",
|
|
ControllerConfigGroup,
|
|
|
|
messages: [
|
|
messages.FetchPlayerCodeRequest,
|
|
messages.SetVerifyCodeRequest,
|
|
],
|
|
};
|
|
|
|
export default info;
|