mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-05-18 09:35:50 +00:00
Games: BrainBread 2 support.
This commit is contained in:
parent
eca9757421
commit
e16efee488
6 changed files with 20 additions and 1 deletions
12
src/games/bb2.rs
Normal file
12
src/games/bb2.rs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
use crate::GDResult;
|
||||
use crate::protocols::valve;
|
||||
use crate::protocols::valve::{game, SteamID};
|
||||
|
||||
pub fn query(address: &str, port: Option<u16>) -> GDResult<game::Response> {
|
||||
let valve_response = valve::query(address, match port {
|
||||
None => 27015,
|
||||
Some(port) => port
|
||||
}, SteamID::BB2.as_app(), None, None)?;
|
||||
|
||||
Ok(game::Response::new_from_valve_response(valve_response))
|
||||
}
|
||||
|
|
@ -77,3 +77,5 @@ pub mod onset;
|
|||
pub mod ccure;
|
||||
/// Ballistic Overkill
|
||||
pub mod bo;
|
||||
/// BrainBread 2
|
||||
pub mod bb2;
|
||||
|
|
|
|||
|
|
@ -189,6 +189,8 @@ pub enum SteamID {
|
|||
BO = 296300,
|
||||
/// Don't Starve Together
|
||||
DST = 322320,
|
||||
/// BrainBread 2
|
||||
BB2 = 346330,
|
||||
/// Codename CURE
|
||||
CCURE = 355180,
|
||||
/// Black Mesa
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue