mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-06-01 09:42:41 +00:00
Games: Add Black Mesa support.
This commit is contained in:
parent
4a7eb400db
commit
328de37b2d
6 changed files with 22 additions and 3 deletions
12
src/games/bm.rs
Normal file
12
src/games/bm.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::BM.as_app(), None, None)?;
|
||||
|
||||
Ok(game::Response::new_from_valve_response(valve_response))
|
||||
}
|
||||
|
|
@ -61,3 +61,5 @@ pub mod hldms;
|
|||
pub mod ror2;
|
||||
/// Battalion 1944
|
||||
pub mod bat1944;
|
||||
/// Black Mesa
|
||||
pub mod bm;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue