From a62f6231342e8abe4ea018db1e47622dd30d86d8 Mon Sep 17 00:00:00 2001 From: CosminPerRam Date: Tue, 21 Jan 2025 19:30:01 +0200 Subject: [PATCH] fix: palworld not respecting response schema (#666) * fix: palworld not respecting schema * docs: add number to changelog --- CHANGELOG.md | 1 + GAMES_LIST.md | 2 +- lib/games.js | 4 +++- protocols/palworld.js | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fdfd68e..84aed2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ * Feat: Farming Simulator 25 (2024) - Added support (#660) * Feat: Exfil (2024) - Added support (#661) * Docs: Valheim numplayers being always 0 on crossplay servers (#668) +* Fix: Palworld not respecting query output schema (#666) ## 5.1.4 * Feat: Replaced `punycode` package usage with `url.domainToASCII` (#630). diff --git a/GAMES_LIST.md b/GAMES_LIST.md index 953ca26..37aa8da 100644 --- a/GAMES_LIST.md +++ b/GAMES_LIST.md @@ -223,7 +223,7 @@ | openarena | OpenArena | | | openttd | OpenTTD | | | painkiller | Painkiller | | -| palworld | Palworld | | +| palworld | Palworld | [Notes](#palworld) | | pce | Primal Carnage: Extinction | [Valve Protocol](#valve) | | pixark | PixARK | [Valve Protocol](#valve) | | postal2 | Postal 2 | | diff --git a/lib/games.js b/lib/games.js index e0def90..b2fb427 100644 --- a/lib/games.js +++ b/lib/games.js @@ -2183,7 +2183,9 @@ export const games = { release_year: 2024, options: { port: 8212, - protocol: 'palworld', + protocol: 'palworld' + }, + extra: { doc_notes: 'palworld' } }, diff --git a/protocols/palworld.js b/protocols/palworld.js index 33b8bb8..9807ea7 100644 --- a/protocols/palworld.js +++ b/protocols/palworld.js @@ -19,7 +19,7 @@ export default class palworld extends Core { const { players } = await this.makeCall('players') state.numplayers = players.length - state.players = players.map(p => p.name) + state.players = players.map((player) => ({ name: player.name, raw: player })) state.raw.players = players state.raw.settings = await this.makeCall('settings')