Skip to content

Commit

Permalink
feat: add counter-strike 2 support
Browse files Browse the repository at this point in the history
  • Loading branch information
CosminPerRam committed Mar 10, 2024
1 parent b2e34b3 commit 82b7a5f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Games:
- [Mindustry](https://mindustrygame.github.io/) support.
- Eco support (by @CosminPerRam).
- [Call Of Duty: Black Ops 3](https://store.steampowered.com/agecheck/app/311210/) support.
- [Counter-Strike 2](https://store.steampowered.com/app/730/CounterStrike_2/) support.

Crate:
- Changed the serde feature to only enable serde derive for some types: serde and serde_json is now a dependecy by default.
Expand Down
1 change: 1 addition & 0 deletions GAMES.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ Beware of the `Notes` column, as it contains information about query port offset
| Base Defense | BASEDEFENSE | Valve | Query port: 27015. Does not respond to the rules query. |
| Zombie Panic: Source | ZPS | Valve | Query port: 27015. |
| Call Of Duty: Black Ops 3 | CODBO3 | Valve | Query port: 27017. |
| Counter-Strike 2 | CS2 | Valve | |

## Planned to add support:
_
1 change: 1 addition & 0 deletions crates/lib/src/games/definitions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ pub static GAMES: Map<&'static str, Game> = phf_map! {
check_app_id: true,
}.into_extra()),
"counterstrike" => game!("Counter-Strike", 27015, Protocol::Valve(Engine::new_gold_src(false))),
"cs2" => game!("Counter-Strike 2", 27015, Protocol::Valve(Engine::new(730))),
"cscz" => game!("Counter Strike: Condition Zero", 27015, Protocol::Valve(Engine::new_gold_src(false))),
"csgo" => game!("Counter-Strike: Global Offensive", 27015, Protocol::Valve(Engine::new(730))),
"css" => game!("Counter-Strike: Source", 27015, Protocol::Valve(Engine::new(240))),
Expand Down
1 change: 1 addition & 0 deletions crates/lib/src/games/valve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ game_query_mod!(
Engine::new_gold_src(false),
27015
);
game_query_mod!(cs2, "Counter-Strike 2", Engine::new(730), 27015);
game_query_mod!(creativerse, "Creativerse", Engine::new(280_790), 26901);
game_query_mod!(
cscz,
Expand Down

0 comments on commit 82b7a5f

Please sign in to comment.