mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-05-06 15:27:28 +00:00
Games: Onset support.
This commit is contained in:
parent
2312ba9114
commit
649dfd81ed
6 changed files with 20 additions and 1 deletions
|
|
@ -71,3 +71,5 @@ pub mod aoc;
|
|||
pub mod dst;
|
||||
/// Colony Survival
|
||||
pub mod cosu;
|
||||
/// Onset
|
||||
pub mod onset;
|
||||
|
|
|
|||
12
src/games/onset.rs
Normal file
12
src/games/onset.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 => 7776,
|
||||
Some(port) => port
|
||||
}, SteamID::ONSET.as_app(), None, None)?;
|
||||
|
||||
Ok(game::Response::new_from_valve_response(valve_response))
|
||||
}
|
||||
|
|
@ -207,6 +207,8 @@ pub enum SteamID {
|
|||
ASRD = 563560,
|
||||
/// Risk of Rain 2
|
||||
ROR2 = 632360,
|
||||
/// Onset
|
||||
ONSET = 1105810,
|
||||
}
|
||||
|
||||
impl SteamID {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue