Files
factorio-clusterio/plugins/player_auth/info.js
T
Luciole 50f12c719b Port global_chat plugin to typescript (#497)
* .js to .ts

* translate

* update paths to dist/plugin

* add "tsc --build" to prepare

* use field main in package.json de find info

* tsc --build need to append before webpack

* update test and use for plugins package.main
2023-08-18 00:06:49 +02:00

39 lines
1.0 KiB
JavaScript

"use strict";
const lib = require("@clusterio/lib");
let messages = require("./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();
module.exports.default = {
name: "player_auth",
title: "Player Auth",
description: "Provides authentication to the cluster via logging into a Factorio server.",
controllerEntrypoint: "controller",
instanceEntrypoint: "instance",
webEntrypoint: "./web",
ControllerConfigGroup,
messages: [
messages.FetchPlayerCodeRequest,
messages.SetVerifyCodeRequest,
],
};