mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-05-18 01:25:51 +00:00
Games: Avorion support.
This commit is contained in:
parent
3231653e4c
commit
719ae9d591
6 changed files with 20 additions and 1 deletions
12
src/games/avorion.rs
Normal file
12
src/games/avorion.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 => 27020,
|
||||
Some(port) => port
|
||||
}, SteamID::AVORION.as_app(), None, None)?;
|
||||
|
||||
Ok(game::Response::new_from_valve_response(valve_response))
|
||||
}
|
||||
|
|
@ -79,3 +79,5 @@ pub mod ccure;
|
|||
pub mod bo;
|
||||
/// BrainBread 2
|
||||
pub mod bb2;
|
||||
/// Avorion
|
||||
pub mod avorion;
|
||||
|
|
|
|||
|
|
@ -197,6 +197,8 @@ pub enum SteamID {
|
|||
BM = 362890,
|
||||
/// Colony Survival
|
||||
COSU = 366090,
|
||||
/// Avorion
|
||||
AVORION = 445220,
|
||||
/// Day of Infamy
|
||||
DOI = 447820,
|
||||
/// The Forrest
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue