Add Risk of Rain 2 support.

This commit is contained in:
CosminPerRam 2023-01-09 19:02:31 +02:00
parent 1e99aebbac
commit ededf93b38
6 changed files with 26 additions and 1 deletions

View file

@ -57,3 +57,5 @@ pub mod arma2oa;
pub mod doi;
/// Half-Life Deathmatch: Source
pub mod hldms;
/// Risk of Rain 2
pub mod ror2;

12
src/games/ror2.rs Normal file
View 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 => 27016,
Some(port) => port
}, SteamID::ROR2.as_app(), None, None)?;
Ok(game::Response::new_from_valve_response(valve_response))
}

View file

@ -199,6 +199,8 @@ pub enum SteamID {
INSS = 581320,
/// Alien Swarm: Reactive Drop
ASRD = 563560,
/// Risk of Rain 2
ROR2 = 632360,
}
impl SteamID {