mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-05-18 09:35:50 +00:00
[Games] V Rising support.
This commit is contained in:
parent
e26f0f871a
commit
cd4cbc09db
6 changed files with 24 additions and 2 deletions
|
|
@ -83,3 +83,5 @@ pub mod bb2;
|
|||
pub mod avorion;
|
||||
/// Operation: Harsh Doorstop
|
||||
pub mod ohd;
|
||||
/// V Rising
|
||||
pub mod vr;
|
||||
|
|
|
|||
12
src/games/vr.rs
Normal file
12
src/games/vr.rs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
use crate::GDResult;
|
||||
use crate::protocols::valve;
|
||||
use crate::protocols::valve::{game, SteamApp};
|
||||
|
||||
pub fn query(address: &str, port: Option<u16>) -> GDResult<game::Response> {
|
||||
let valve_response = valve::query(address, match port {
|
||||
None => 27016,
|
||||
Some(port) => port
|
||||
}, SteamApp::VR.as_engine(), None, None)?;
|
||||
|
||||
Ok(game::Response::new_from_valve_response(valve_response))
|
||||
}
|
||||
|
|
@ -218,6 +218,8 @@ pub enum SteamApp {
|
|||
OHD,
|
||||
/// Onset
|
||||
ONSET,
|
||||
/// V Rising
|
||||
VR,
|
||||
}
|
||||
|
||||
impl SteamApp {
|
||||
|
|
@ -263,7 +265,8 @@ impl SteamApp {
|
|||
SteamApp::ASRD => Engine::new_source(563560),
|
||||
SteamApp::ROR2 => Engine::new_source(632360),
|
||||
SteamApp::OHD => Engine::new_source_with_dedicated(736590, 950900),
|
||||
SteamApp::ONSET => Engine::new_source(1105810)
|
||||
SteamApp::ONSET => Engine::new_source(1105810),
|
||||
SteamApp::VR => Engine::new_source(1604030),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue