mirror of
https://github.com/Tribufu/rust-gamedig
synced 2026-08-18 19:31:05 +00:00
[Protocol] Valve: support app and dedicated app id
This commit is contained in:
parent
fe46359e47
commit
150bc1762e
48 changed files with 259 additions and 179 deletions
|
|
@ -1,13 +1,13 @@
|
|||
use crate::GDError::TypeParse;
|
||||
use crate::GDResult;
|
||||
use crate::protocols::valve;
|
||||
use crate::protocols::valve::{game, SteamID};
|
||||
use crate::protocols::valve::{game, SteamApp};
|
||||
|
||||
pub fn query(address: &str, port: Option<u16>) -> GDResult<game::Response> {
|
||||
let mut valve_response = valve::query(address, match port {
|
||||
None => 7780,
|
||||
Some(port) => port
|
||||
}, SteamID::BAT1944.as_app(), None, None)?;
|
||||
}, SteamApp::BAT1944.as_engine(), None, None)?;
|
||||
|
||||
if let Some(rules) = &mut valve_response.rules {
|
||||
if let Some(bat_max_players) = rules.get("bat_max_players_i") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue