mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-06-01 09:42:41 +00:00
Games: Operation Harsh Doorstop support.
This commit is contained in:
parent
719ae9d591
commit
fe46359e47
6 changed files with 20 additions and 1 deletions
|
|
@ -81,3 +81,5 @@ pub mod bo;
|
|||
pub mod bb2;
|
||||
/// Avorion
|
||||
pub mod avorion;
|
||||
/// Operation: Harsh Doorstop
|
||||
pub mod ohd;
|
||||
|
|
|
|||
12
src/games/ohd.rs
Normal file
12
src/games/ohd.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 => 27005,
|
||||
Some(port) => port
|
||||
}, SteamID::OHD.as_app(), None, None)?;
|
||||
|
||||
Ok(game::Response::new_from_valve_response(valve_response))
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue