chore: update typings for bootstrapper for 0.11.13 #2900
@ -1,16 +1,9 @@
|
|||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
|
import type { ITunables } from "../../types/bootstrapperTypes.ts";
|
||||||
|
|
||||||
// This endpoint is specific to the OpenWF Bootstrapper: https://openwf.io/bootstrapper-manual
|
// This endpoint is specific to the OpenWF Bootstrapper: https://openwf.io/bootstrapper-manual
|
||||||
|
|
||||||
interface ITunables {
|
export const tunablesController: RequestHandler = (_req, res) => {
|
||||||
prohibit_skip_mission_start_timer?: boolean;
|
|
||||||
prohibit_fov_override?: boolean;
|
|
||||||
prohibit_freecam?: boolean;
|
|
||||||
prohibit_teleport?: boolean;
|
|
||||||
prohibit_scripts?: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
const tunablesController: RequestHandler = (_req, res) => {
|
|
||||||
const tunables: ITunables = {};
|
const tunables: ITunables = {};
|
||||||
//tunables.prohibit_skip_mission_start_timer = true;
|
//tunables.prohibit_skip_mission_start_timer = true;
|
||||||
//tunables.prohibit_fov_override = true;
|
//tunables.prohibit_fov_override = true;
|
||||||
@ -19,5 +12,3 @@ const tunablesController: RequestHandler = (_req, res) => {
|
|||||||
//tunables.prohibit_scripts = true;
|
//tunables.prohibit_scripts = true;
|
||||||
res.json(tunables);
|
res.json(tunables);
|
||||||
};
|
};
|
||||||
|
|
||||||
export { tunablesController };
|
|
||||||
|
|||||||
@ -8,6 +8,7 @@ import type { IDatabaseAccountJson } from "../types/loginTypes.ts";
|
|||||||
import type { HydratedDocument } from "mongoose";
|
import type { HydratedDocument } from "mongoose";
|
||||||
import { logError, logger } from "../utils/logger.ts";
|
import { logError, logger } from "../utils/logger.ts";
|
||||||
import type { Request } from "express";
|
import type { Request } from "express";
|
||||||
|
import type { ITunables } from "../types/bootstrapperTypes.ts";
|
||||||
|
|
||||||
let wsServer: WebSocketServer | undefined;
|
let wsServer: WebSocketServer | undefined;
|
||||||
let wssServer: WebSocketServer | undefined;
|
let wssServer: WebSocketServer | undefined;
|
||||||
@ -89,8 +90,9 @@ interface IWsMsgToClient {
|
|||||||
logged_out?: boolean;
|
logged_out?: boolean;
|
||||||
have_game_ws?: boolean;
|
have_game_ws?: boolean;
|
||||||
|
|
||||||
// to game
|
// to game/bootstrapper (https://openwf.io/bootstrapper-manual)
|
||||||
sync_inventory?: boolean;
|
sync_inventory?: boolean;
|
||||||
|
tunables?: ITunables;
|
||||||
}
|
}
|
||||||
|
|
||||||
const wsOnConnect = (ws: WebSocket, req: http.IncomingMessage): void => {
|
const wsOnConnect = (ws: WebSocket, req: http.IncomingMessage): void => {
|
||||||
|
|||||||
9
src/types/bootstrapperTypes.ts
Normal file
9
src/types/bootstrapperTypes.ts
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
// This is specific to the OpenWF Bootstrapper: https://openwf.io/bootstrapper-manual
|
||||||
|
export interface ITunables {
|
||||||
|
token?: string;
|
||||||
|
prohibit_skip_mission_start_timer?: boolean;
|
||||||
|
prohibit_fov_override?: boolean;
|
||||||
|
prohibit_freecam?: boolean;
|
||||||
|
prohibit_teleport?: boolean;
|
||||||
|
prohibit_scripts?: boolean;
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user