rust-gamedig/src/games/brainbread2.rs
Tom 52750fba76
[Games] Update game definitions to match node-gamedig names (#100)
* [Games] Update game definitions to match node-gamedig names

* Update game file names to match definitions

* [Games] rename minecraft definitions to better match node

* [Games] Add test that all game files match definition name

* Update SteamApp to match node names

* [Games] Update the forest to match node-GameDig#367

* Clippy fix in games test

* [Docs] Update GAMES.md with new names

* [DOCS] Update changelog
2023-09-23 00:20:01 +03:00

16 lines
437 B
Rust

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::BRAINBREAD2.as_engine(),
None,
None,
)?;
Ok(game::Response::new_from_valve_response(valve_response))
}