diff --git a/CHANGELOG.md b/CHANGELOG.md index 8349d34..905669e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ Games: - [Colony Survival](https://store.steampowered.com/app/366090/Colony_Survival/) support. - [Onset](https://store.steampowered.com/app/1105810/Onset/) support. - [Codename CURE](https://store.steampowered.com/app/355180/Codename_CURE/) support. +- [Ballistic Overkill](https://store.steampowered.com/app/296300/Ballistic_Overkill/) support. ### Breaking: Nothing. diff --git a/GAMES.md b/GAMES.md index 941fbc6..a5a9f94 100644 --- a/GAMES.md +++ b/GAMES.md @@ -40,6 +40,7 @@ Beware of the `Notes` column, as it contains information about query port offset | Colony Survival | COLU | Valve Protocol | | | Onset | ONSET | Valve Protocol | Query port is 7776. | | Codename CURE | CCURE | Valve Protocol | | +| Ballistic Overkill | BO | Valve Protocol | Query port is 27016. | ## Planned to add support: _ diff --git a/examples/master_querant.rs b/examples/master_querant.rs index 03112f1..a461300 100644 --- a/examples/master_querant.rs +++ b/examples/master_querant.rs @@ -1,6 +1,6 @@ use std::env; -use gamedig::{aliens, aoc, arma2oa, ase, asrd, bat1944, bm, ccure, cosu, cs, cscz, csgo, css, dod, dods, doi, dst, GDResult, gm, hl2dm, hldms, ins, insmic, inss, l4d, l4d2, mc, onset, pz, ror2, rust, sc, sdtd, tf, tf2, tfc, ts, unturned}; +use gamedig::{aliens, aoc, arma2oa, ase, asrd, bat1944, bm, bo, ccure, cosu, cs, cscz, csgo, css, dod, dods, doi, dst, GDResult, gm, hl2dm, hldms, ins, insmic, inss, l4d, l4d2, mc, onset, pz, ror2, rust, sc, sdtd, tf, tf2, tfc, ts, unturned}; use gamedig::protocols::minecraft::LegacyGroup; use gamedig::protocols::valve; use gamedig::protocols::valve::App; @@ -78,6 +78,7 @@ fn main() -> GDResult<()> { "cosu" => println!("{:#?}", cosu::query(ip, port)?), "onset" => println!("{:#?}", onset::query(ip, port)?), "ccure" => println!("{:#?}", ccure::query(ip, port)?), + "bo" => println!("{:#?}", bo::query(ip, port)?), _ => panic!("Undefined game: {}", args[1]) }; diff --git a/src/games/bo.rs b/src/games/bo.rs new file mode 100644 index 0000000..dcd9a54 --- /dev/null +++ b/src/games/bo.rs @@ -0,0 +1,12 @@ +use crate::GDResult; +use crate::protocols::valve; +use crate::protocols::valve::{game, SteamID}; + +pub fn query(address: &str, port: Option) -> GDResult { + let valve_response = valve::query(address, match port { + None => 27016, + Some(port) => port + }, SteamID::BO.as_app(), None, None)?; + + Ok(game::Response::new_from_valve_response(valve_response)) +} diff --git a/src/games/mod.rs b/src/games/mod.rs index 2038c42..7e1578b 100644 --- a/src/games/mod.rs +++ b/src/games/mod.rs @@ -75,3 +75,5 @@ pub mod cosu; pub mod onset; /// Codename CURE pub mod ccure; +/// Ballistic Overkill +pub mod bo; diff --git a/src/protocols/valve/types.rs b/src/protocols/valve/types.rs index c11049a..a98c61e 100644 --- a/src/protocols/valve/types.rs +++ b/src/protocols/valve/types.rs @@ -185,6 +185,8 @@ pub enum SteamID { SDTD = 251570, /// Rust RUST = 252490, + /// Vallistic Overkill + BO = 296300, /// Don't Starve Together DST = 322320, /// Codename CURE