Skip to content

Commit

Permalink
feat(games): add base defense support
Browse files Browse the repository at this point in the history
  • Loading branch information
CosminPerRam committed Jan 7, 2024
1 parent c71e783 commit 94102d0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Games:
- [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.
- [Base Defense](https://store.steampowered.com/app/632730/Base_Defense/) support.
- Added a valve protocol query example.
- Made all of Just Cause 2: Multiplayer Response and Player fields public.

Expand Down
1 change: 1 addition & 0 deletions GAMES.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ Beware of the `Notes` column, as it contains information about query port offset
| 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. |
| Base Defense | BASEDEFENSE | Valve | Query port: 27015. Does not respond to the rules query. |

## Planned to add support:
_
5 changes: 5 additions & 0 deletions crates/lib/src/games/definitions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ pub static GAMES: Map<&'static str, Game> = phf_map! {
"atlas" => game!("ATLAS", 57561, Protocol::Valve(Engine::new(834_910))),
"avorion" => game!("Avorion", 27020, Protocol::Valve(Engine::new(445_220))),
"barotrauma" => game!("Barotrauma", 27016, Protocol::Valve(Engine::new(602_960))),
"basedefense" => game!("Base Defense", 27015, Protocol::Valve(Engine::new(632_730)), GatheringSettings {
players: true,
rules: false,
check_app_id: true,
}.into_extra()),
"battalion1944" => game!("Battalion 1944", 7780, Protocol::Valve(Engine::new(489_940))),
"brainbread2" => game!("BrainBread 2", 27015, Protocol::Valve(Engine::new(346_330))),
"battlefield1942" => game!("Battlefield 1942", 23000, Protocol::Gamespy(GameSpyVersion::One)),
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 @@ -8,6 +8,7 @@ game_query_mod!(
Engine::new(33930),
2304
);
game_query_mod!(basedefense, "Base Defense", Engine::new(632_730), 27015);
game_query_mod!(alienswarm, "Alien Swarm", Engine::new(630), 27015);
game_query_mod!(aoc, "Age of Chivalry", Engine::new(17510), 27015);
game_query_mod!(
Expand Down

0 comments on commit 94102d0

Please sign in to comment.