From 109a3db13e43681bf48d2878085aa6a9797318ba Mon Sep 17 00:00:00 2001 From: CosminPerRam Date: Sun, 7 Jan 2024 23:34:26 +0200 Subject: [PATCH] feat(games): add americas army proving grounds support --- CHANGELOG.md | 1 + GAMES.md | 1 + crates/lib/src/games/definitions.rs | 5 +++++ crates/lib/src/games/valve.rs | 5 +++++ 4 files changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ab5756c..5c9478e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ Games: - [Savage 2](https://savage2.net/) support. - [Rising World](https://store.steampowered.com/app/324080/Rising_World/) support. - [ATLAS](https://store.steampowered.com/app/834910/ATLAS/) support. +- [America's Army: Proving Grounds](https://store.steampowered.com/app/203290/Americas_Army_Proving_Grounds/) support. - Added a valve protocol query example. - Made all of Just Cause 2: Multiplayer Response and Player fields public. diff --git a/GAMES.md b/GAMES.md index 68d2e22..7c43258 100644 --- a/GAMES.md +++ b/GAMES.md @@ -76,6 +76,7 @@ Beware of the `Notes` column, as it contains information about query port offset | Savage 2 | SAVAGE2 | Proprietary | | | Rising World | RISINGWORLD | Valve | Query port offset: -1 | | ATLAS | ATLAS | Valve | Query port offset: 51800 | +| America's Army: Proving Grounds | AAPG | Valve | Query port: 27020. Does not respond to the rules query. | ## Planned to add support: _ diff --git a/crates/lib/src/games/definitions.rs b/crates/lib/src/games/definitions.rs index 69ff791..6272e81 100644 --- a/crates/lib/src/games/definitions.rs +++ b/crates/lib/src/games/definitions.rs @@ -39,6 +39,11 @@ pub static GAMES: Map<&'static str, Game> = phf_map! { "minecraftlegacy16" => game!("Minecraft (legacy 1.6)", 25565, Protocol::PROPRIETARY(ProprietaryProtocol::Minecraft(Some(Server::Legacy(LegacyGroup::V1_6))))), "minecraftlegacy14" => game!("Minecraft (legacy 1.4)", 25565, Protocol::PROPRIETARY(ProprietaryProtocol::Minecraft(Some(Server::Legacy(LegacyGroup::V1_4))))), "minecraftlegacyb18" => game!("Minecraft (legacy b1.8)", 25565, Protocol::PROPRIETARY(ProprietaryProtocol::Minecraft(Some(Server::Legacy(LegacyGroup::VB1_8))))), + "aapg" => game!("America's Army: Proving Grounds", 27020, Protocol::Valve(Engine::new(203_290)), GatheringSettings { + players: true, + rules: false, + check_app_id: true, + }.into_extra()), "alienswarm" => game!("Alien Swarm", 27015, Protocol::Valve(Engine::new(630))), "aoc" => game!("Age of Chivalry", 27015, Protocol::Valve(Engine::new(17510))), "a2oa" => game!("ARMA 2: Operation Arrowhead", 2304, Protocol::Valve(Engine::new(33930))), diff --git a/crates/lib/src/games/valve.rs b/crates/lib/src/games/valve.rs index 3400c65..69d6418 100644 --- a/crates/lib/src/games/valve.rs +++ b/crates/lib/src/games/valve.rs @@ -10,6 +10,11 @@ game_query_mod!( ); game_query_mod!(alienswarm, "Alien Swarm", Engine::new(630), 27015); game_query_mod!(aoc, "Age of Chivalry", Engine::new(17510), 27015); +game_query_mod!(aapg, "America's Army: Proving Grounds", Engine::new(203_290), 27020, GatheringSettings { + players: true, + rules: false, + check_app_id: true, + }); game_query_mod!(ase, "ARK: Survival Evolved", Engine::new(346_110), 27015); game_query_mod!( asrd,