mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-05-18 09:35:50 +00:00
Add Risk of Rain 2 support.
This commit is contained in:
parent
1e99aebbac
commit
ededf93b38
6 changed files with 26 additions and 1 deletions
|
|
@ -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
12
src/games/ror2.rs
Normal 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))
|
||||
}
|
||||
|
|
@ -199,6 +199,8 @@ pub enum SteamID {
|
|||
INSS = 581320,
|
||||
/// Alien Swarm: Reactive Drop
|
||||
ASRD = 563560,
|
||||
/// Risk of Rain 2
|
||||
ROR2 = 632360,
|
||||
}
|
||||
|
||||
impl SteamID {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue