mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-05-18 09:35:50 +00:00
Games: Don't Starve Together support.
This commit is contained in:
parent
dfe544c6aa
commit
bbd2dd7d97
6 changed files with 27 additions and 1 deletions
12
src/games/dst.rs
Normal file
12
src/games/dst.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 => 27016,
|
||||
Some(port) => port
|
||||
}, SteamID::DST.as_app(), None, None)?;
|
||||
|
||||
Ok(game::Response::new_from_valve_response(valve_response))
|
||||
}
|
||||
|
|
@ -67,3 +67,5 @@ pub mod bm;
|
|||
pub mod pz;
|
||||
/// Age of Chivalry
|
||||
pub mod aoc;
|
||||
/// Don't Starve Together
|
||||
pub mod dst;
|
||||
|
|
|
|||
|
|
@ -183,6 +183,8 @@ pub enum SteamID {
|
|||
SC = 225840,
|
||||
/// Rust
|
||||
RUST = 252490,
|
||||
/// Don't Starve Together
|
||||
DST = 322320,
|
||||
/// Black Mesa
|
||||
BM = 362890,
|
||||
/// Day of Infamy
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue