[Protocol] Valve: support app and dedicated app id

This commit is contained in:
CosminPerRam 2023-02-18 21:44:17 +02:00
parent fe46359e47
commit 150bc1762e
48 changed files with 259 additions and 179 deletions

View file

@ -1,7 +1,7 @@
use std::collections::HashMap;
use crate::GDResult;
use crate::protocols::valve;
use crate::protocols::valve::{Server, ServerPlayer, get_optional_extracted_data, SteamID};
use crate::protocols::valve::{Server, ServerPlayer, get_optional_extracted_data, SteamApp};
#[derive(Debug)]
pub struct TheShipPlayer {
@ -85,7 +85,7 @@ pub fn query(address: &str, port: Option<u16>) -> GDResult<Response> {
let valve_response = valve::query(address, match port {
None => 27015,
Some(port) => port
}, SteamID::TS.as_app(), None, None)?;
}, SteamApp::TS.as_engine(), None, None)?;
Ok(Response::new_from_valve_response(valve_response))
}