mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-06-01 09:42:41 +00:00
The Forest support.
This commit is contained in:
parent
ed2161a6da
commit
21b7d91ee6
6 changed files with 22 additions and 3 deletions
|
|
@ -41,3 +41,5 @@ pub mod sdtd;
|
|||
pub mod ase;
|
||||
/// Unturned
|
||||
pub mod unturned;
|
||||
/// The Forest
|
||||
pub mod tf;
|
||||
|
|
|
|||
12
src/games/tf.rs
Normal file
12
src/games/tf.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::TF.as_app(), None, None)?;
|
||||
|
||||
Ok(game::Response::new_from_valve_response(valve_response))
|
||||
}
|
||||
|
|
@ -173,6 +173,8 @@ pub enum SteamID {
|
|||
INSMIC = 17700,
|
||||
/// Insurgency
|
||||
INS = 222880,
|
||||
/// The Forrest
|
||||
TF = 556450, //this is the id for the dedicated server, for the game its 242760
|
||||
/// 7 Days To Die
|
||||
SDTD = 251570,
|
||||
/// Unturned
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue