mirror of
https://github.com/tribufu/node-gamedig
synced 2026-05-06 07:07:33 +00:00
fix(protocols/terraria): add missing maxplayers (and raw) to terraria protocol (#686)
* Add maxplayers to terraria protocol * Update CHANGELOG.md * Add raw to terraria state It returns multiple versions, so instead of choosing one I decided to do this. * Update CHANGELOG.md
This commit is contained in:
parent
1458aa0e36
commit
58f045dd36
2 changed files with 4 additions and 0 deletions
|
|
@ -8,6 +8,7 @@
|
|||
* Docs: Arma Reforger does not provide players data (#680)
|
||||
* Feat: Farming Simulator add response to raw object (#682)
|
||||
* Feat: Renown (2025) - Added support (#684 By @anthonyphysgun)
|
||||
* Fix: Terraria - add missing supported maxplayers field and raw field (By @GoodDays13 #686)
|
||||
|
||||
## 5.2.0
|
||||
* Fix: Palworld not respecting query output players schema (#666)
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@ export default class terraria extends Core {
|
|||
|
||||
if (json.status !== '200') throw new Error('Invalid status')
|
||||
|
||||
state.raw = json
|
||||
|
||||
for (const one of json.players) {
|
||||
state.players.push({ name: one.nickname, team: one.team })
|
||||
}
|
||||
|
|
@ -20,5 +22,6 @@ export default class terraria extends Core {
|
|||
state.name = json.name
|
||||
state.gamePort = json.port
|
||||
state.numplayers = json.playercount
|
||||
state.maxplayers = json.maxplayers
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue