mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-05-06 15:27:28 +00:00
Games: Add Battalion 1944 support.
This commit is contained in:
parent
018935fd29
commit
9bcbfbc198
6 changed files with 24 additions and 5 deletions
12
src/games/bat1944.rs
Normal file
12
src/games/bat1944.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 => 7780,
|
||||
Some(port) => port
|
||||
}, SteamID::BAT1944.as_app(), None, None)?;
|
||||
|
||||
Ok(game::Response::new_from_valve_response(valve_response))
|
||||
}
|
||||
|
|
@ -59,3 +59,5 @@ pub mod doi;
|
|||
pub mod hldms;
|
||||
/// Risk of Rain 2
|
||||
pub mod ror2;
|
||||
/// Battalion 1944
|
||||
pub mod bat1944;
|
||||
|
|
|
|||
|
|
@ -189,6 +189,8 @@ pub enum SteamID {
|
|||
UNTURNED = 304930,
|
||||
/// ARK: Survival Evolved
|
||||
ASE = 346110,
|
||||
/// Battalion 1944
|
||||
BAT1944 = 489940,
|
||||
/// Insurgency: Sandstorm
|
||||
INSS = 581320,
|
||||
/// Alien Swarm: Reactive Drop
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue