mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-05-18 09:35:50 +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;
|
||||
|
|
|
|||
|
|
@ -179,6 +179,8 @@ pub enum SteamID {
|
|||
SC = 225840,
|
||||
/// Rust
|
||||
RUST = 252490,
|
||||
/// Black Mesa
|
||||
BM = 362890,
|
||||
/// Day of Infamy
|
||||
DOI = 447820,
|
||||
/// The Forrest
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue