mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-06-01 09:42:41 +00:00
[Game] Apply new id naming (#114)
* Apply new id naming * Fix failing CI on all features * Update changelog * Rename tf2 example to teamfortress2 * Fix typo in steamapp game names * Rename minecraft legacy versions * Apply CI node badge fix by Douile * Add/Update badge --------- Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
parent
b4c61781fb
commit
5280ecb3c6
38 changed files with 231 additions and 232 deletions
16
src/games/teamfortress2.rs
Normal file
16
src/games/teamfortress2.rs
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
use crate::{
|
||||
protocols::valve::{self, game, SteamApp},
|
||||
GDResult,
|
||||
};
|
||||
use std::net::{IpAddr, SocketAddr};
|
||||
|
||||
pub fn query(address: &IpAddr, port: Option<u16>) -> GDResult<game::Response> {
|
||||
let valve_response = valve::query(
|
||||
&SocketAddr::new(*address, port.unwrap_or(27015)),
|
||||
SteamApp::TEAMFORTRESS2.as_engine(),
|
||||
None,
|
||||
None,
|
||||
)?;
|
||||
|
||||
Ok(game::Response::new_from_valve_response(valve_response))
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue