mirror of
https://github.com/AsgardEternal/SquadJS.git
synced 2024-09-28 16:24:25 -05:00
commit
140c3c378e
@ -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**
|
||||
|
@ -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",
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
};
|
||||
|
@ -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) {
|
||||
|
@ -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' }
|
||||
);
|
||||
|
@ -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**
|
||||
|
Loading…
Reference in New Issue
Block a user