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:
GoodDays13 2025-04-22 16:23:50 -04:00 committed by GitHub
parent 1458aa0e36
commit 58f045dd36
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View file

@ -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)

View file

@ -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
}
}