Merge branch 'bra1n:develop' into develop

This commit is contained in:
eddgabriel 2022-02-05 21:18:27 +00:00 committed by GitHub
commit 2a0f025b0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 7 deletions

View File

@ -29,7 +29,7 @@ If you want to learn more about how to use the app as a player, [JayBotC](https:
### Custom Script Support
Any custom script generated by the official [Script Tool](https://bloodontheclocktower.com/script) is supported out of
Any custom script generated by the official [Script Tool](https://script.bloodontheclocktower.com/) is supported out of
the box and you only need to upload it to get the selected set of characters into your grimoire. If you want to customize
your script further, there is an additional `"_meta"` object that you can add to the script like you would add a normal
character:

View File

@ -12,10 +12,14 @@ register.setDefaultLabels({
const PING_INTERVAL = 30000; // 30 seconds
const server = https.createServer({
cert: fs.readFileSync("cert.pem"),
key: fs.readFileSync("key.pem")
});
const options = {};
if (process.env.NODE_ENV !== "development") {
options.cert = fs.readFileSync("cert.pem");
options.key = fs.readFileSync("key.pem");
}
const server = https.createServer(options);
const wss = new WebSocket.Server({
...(process.env.NODE_ENV === "development" ? { port: 8081 } : { server }),
verifyClient: info =>
@ -234,7 +238,7 @@ const interval = setInterval(function ping() {
ws.readyState === WebSocket.CONNECTING)
)
) {
metrics.channels_list.remove([channel]);
metrics.channels_list.remove({ name: channel });
delete channels[channel];
}
}

View File

@ -1,7 +1,7 @@
class LiveSession {
constructor(store) {
this._wss = "wss://live.clocktower.online:8080/";
//this._wss = "wss://localhost:8081/";
// this._wss = "ws://localhost:8081/"; // uncomment if using local server with NODE_ENV=development
this._socket = null;
this._isSpectator = true;
this._gamestate = [];