mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-06-01 09:42:41 +00:00
Day of Infamy support.
This commit is contained in:
parent
1ad5031c6f
commit
1c173b76ca
6 changed files with 20 additions and 1 deletions
12
src/games/doi.rs
Normal file
12
src/games/doi.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::DOI.as_app(), None, None)?;
|
||||
|
||||
Ok(game::Response::new_from_valve_response(valve_response))
|
||||
}
|
||||
|
|
@ -53,3 +53,5 @@ pub mod rust;
|
|||
pub mod cs;
|
||||
/// ARMA 2: Operation Arrowhead
|
||||
pub mod arma2oa;
|
||||
/// Day of Infamy
|
||||
pub mod doi;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue