mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-05-06 15:27:28 +00:00
[Games] Add Hell Let Loose support.
This commit is contained in:
parent
06a2ceeda9
commit
b3ba7df6d9
6 changed files with 26 additions and 1 deletions
17
src/games/hll.rs
Normal file
17
src/games/hll.rs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
use std::net::IpAddr;
|
||||
use crate::{
|
||||
protocols::valve::{self, game, SteamApp},
|
||||
GDResult,
|
||||
};
|
||||
|
||||
pub fn query(address: &IpAddr, port: Option<u16>) -> GDResult<game::Response> {
|
||||
let valve_response = valve::query(
|
||||
address,
|
||||
port.unwrap_or(26420),
|
||||
SteamApp::HLL.as_engine(),
|
||||
None,
|
||||
None,
|
||||
)?;
|
||||
|
||||
Ok(game::Response::new_from_valve_response(valve_response))
|
||||
}
|
||||
|
|
@ -100,3 +100,5 @@ pub mod quake2;
|
|||
pub mod quake1;
|
||||
/// Quake 3: Arena
|
||||
pub mod quake3a;
|
||||
/// Hell Let Loose
|
||||
pub mod hll;
|
||||
|
|
|
|||
|
|
@ -308,6 +308,8 @@ pub enum SteamApp {
|
|||
ONSET,
|
||||
/// V Rising
|
||||
VR,
|
||||
/// Hell Let Loose
|
||||
HLL,
|
||||
}
|
||||
|
||||
impl SteamApp {
|
||||
|
|
@ -355,6 +357,7 @@ impl SteamApp {
|
|||
SteamApp::OHD => Engine::new_source_with_dedicated(736590, 950900),
|
||||
SteamApp::ONSET => Engine::new_source(1105810),
|
||||
SteamApp::VR => Engine::new_source(1604030),
|
||||
SteamApp::HLL => Engine::new_source(686810),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue