mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-06-01 09:42:41 +00:00
7 Days To Die support.
This commit is contained in:
parent
2f640e93d5
commit
e689bc766e
8 changed files with 38 additions and 20 deletions
|
|
@ -35,3 +35,5 @@ pub mod cscz;
|
|||
pub mod dod;
|
||||
/// Minecraft
|
||||
pub mod mc;
|
||||
/// 7 Days To Die
|
||||
pub mod sdtd;
|
||||
|
|
|
|||
12
src/games/sdtd.rs
Normal file
12
src/games/sdtd.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 => 26900,
|
||||
Some(port) => port
|
||||
}, SteamID::SDTD.as_app(), None, None)?;
|
||||
|
||||
Ok(game::Response::new_from_valve_response(valve_response))
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue