Merge pull request #149 from Thomas-Smyth/beta

SquadJS v2.0.3 Release
This commit is contained in:
Thomas Smyth 2021-02-27 10:28:58 +00:00 committed by GitHub
commit 140c3c378e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 10 additions and 6 deletions

View File

@ -38,6 +38,8 @@ SquadJS relies on being able to access the Squad server log directory in order t
3. Configure the `config.json` file. See below for more details.
4. Start SquadJS: `node index.js`.
**Note** - We use Yarn Workspaces so `npm install` will not work and will break stuff!
<br>
## **Configuring SquadJS**

View File

@ -1,6 +1,6 @@
{
"name": "SquadJS",
"version": "2.0.2",
"version": "2.0.3",
"repository": "https://github.com/Thomas-Smyth/SquadJS.git",
"author": "Thomas Smyth <https://github.com/Thomas-Smyth>",
"license": "BSL-1.0",

View File

@ -438,7 +438,7 @@ export default class SquadServer extends EventEmitter {
queryPort: this.options.queryPort,
name: this.serverName,
playerCount: this.players.length
playerCount: this.a2sPlayerCount + this.publicQueue + this.reserveQueue
},
// Send information about SquadJS.
@ -470,7 +470,7 @@ export default class SquadServer extends EventEmitter {
`Successfully pinged the SquadJS API. Got back message: ${data.message}`
);
} catch (err) {
Logger.verbose('SquadServer', 1, 'Failed to ping the SquadJS API: ', err);
Logger.verbose('SquadServer', 1, 'Failed to ping the SquadJS API: ', err.message);
}
this.pingSquadJSAPITimeout = setTimeout(this.pingSquadJSAPI, this.pingSquadJSAPIInterval);

View File

@ -1,7 +1,7 @@
export default class Layer {
constructor(data) {
this.name = data.Name;
this.classname = data.rawName;
this.classname = data.levelName;
this.map = {
name: data.mapName
};

View File

@ -22,7 +22,7 @@ class Layers {
Logger.verbose('Layers', 1, 'Pulling layers...');
const response = await axios.get(
'https://raw.githubusercontent.com/Squad-Wiki-Editorial/squad-wiki-pipeline-map-data/dev/completed_output/2.0/finished_2.0.json'
'https://raw.githubusercontent.com/Squad-Wiki-Editorial/squad-wiki-pipeline-map-data/dev/completed_output/_Current%20Version/finished.json'
);
for (const layer of response.data.Maps) {

View File

@ -69,7 +69,7 @@ export default class DiscordServerStatus extends BasePlugin {
await this.options.discordClient.user.setActivity(
`(${this.server.a2sPlayerCount}/${this.server.publicSlots}) ${
this.server.layerHistory[0].layer.name || 'Unknown'
this.server.currentLayer.name || 'Unknown'
}`,
{ type: 'WATCHING' }
);

View File

@ -38,6 +38,8 @@ SquadJS relies on being able to access the Squad server log directory in order t
3. Configure the `config.json` file. See below for more details.
4. Start SquadJS: `node index.js`.
**Note** - We use Yarn Workspaces so `npm install` will not work and will break stuff!
<br>
## **Configuring SquadJS**