From 40cc94d99cc4d11ac814363833b4f89cda25918c Mon Sep 17 00:00:00 2001 From: Nicolai Cornelis Date: Tue, 19 Jul 2022 23:53:53 +0200 Subject: [PATCH] Use enum for app id --- protocols/valve.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/protocols/valve.js b/protocols/valve.js index d7f3861..00f71f9 100644 --- a/protocols/valve.js +++ b/protocols/valve.js @@ -8,7 +8,8 @@ const AppId = { Bat1944: 489940, Ship: 2400, DayZ: 221100, - Rust: 252490 + Rust: 252490, + CSGO: 730 }; class Valve extends Core { @@ -226,7 +227,7 @@ class Valve extends Core { if(!name) continue; // CSGO sometimes adds a bot named 'Max Players' if host_players_show is not 2 - if (state.raw.appId === 730 && name === 'Max Players') continue; + if (state.raw.appId === AppId.CSGO && name === 'Max Players') continue; state.raw.players.push({ name:name, score:score, time:time