mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-06-01 09:42:41 +00:00
feat: add Ark: Survival Ascended support (#197)
* feat: add initial epic client auth call * fix: working client auth * feat: unfinished initial EOS query * first successful query * first successful server query * run fmt * be a bit more detailed about servers * properly run fmt for sure this time fr fr * port of what node gamedig has done * feat: remove query_raw_values to query_raw * feat: add raw field to epic response * feat: pass SocketAddr to epic * feat: remove unused pub access to internal only struct * feat: add initial generic impl * fix: possibly conditional comp * feat: add epic to the protocol list * feat: add version and add epic to RESPONSES.md * feat: add asa to definitions * feat: add initial protocol macros * feat: conditional serde ser and des * fix: cfg serde stuff * fix: epic macro warn dead code * partial feature gate epic to tls * fix: remove asa from game definitions
This commit is contained in:
parent
1620ba36b8
commit
45ffa53de3
15 changed files with 434 additions and 81 deletions
|
|
@ -8,6 +8,9 @@ use crate::protocols::types::{GatherToggle, ProprietaryProtocol};
|
|||
use crate::protocols::valve::GatheringSettings;
|
||||
use phf::{phf_map, Map};
|
||||
|
||||
#[cfg(feature = "tls")]
|
||||
use crate::protocols::epic::Credentials;
|
||||
|
||||
macro_rules! game {
|
||||
($name: literal, $default_port: expr, $protocol: expr) => {
|
||||
game!(
|
||||
|
|
|
|||
15
crates/lib/src/games/epic.rs
Normal file
15
crates/lib/src/games/epic.rs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
//! Unreal2 game query modules
|
||||
|
||||
use crate::protocols::epic::game_query_mod;
|
||||
|
||||
game_query_mod!(
|
||||
asa,
|
||||
"Ark: Survival Ascended",
|
||||
7777,
|
||||
Credentials {
|
||||
deployment: "ad9a8feffb3b4b2ca315546f038c3ae2",
|
||||
id: "xyza7891muomRmynIIHaJB9COBKkwj6n",
|
||||
secret: "PP5UGxysEieNfSrEicaD1N2Bb3TdXuD7xHYcsdUHZ7s",
|
||||
auth_by_external: false,
|
||||
}
|
||||
);
|
||||
|
|
@ -1,10 +1,14 @@
|
|||
//! Currently supported games.
|
||||
|
||||
#[cfg(feature = "tls")]
|
||||
pub mod epic;
|
||||
pub mod gamespy;
|
||||
pub mod quake;
|
||||
pub mod unreal2;
|
||||
pub mod valve;
|
||||
|
||||
#[cfg(feature = "tls")]
|
||||
pub use epic::*;
|
||||
pub use gamespy::*;
|
||||
pub use quake::*;
|
||||
pub use unreal2::*;
|
||||
|
|
|
|||
|
|
@ -48,6 +48,10 @@ pub fn query_with_timeout_and_extra_settings(
|
|||
)
|
||||
.map(Box::new)?
|
||||
}
|
||||
#[cfg(feature = "tls")]
|
||||
Protocol::Epic(credentials) => {
|
||||
protocols::epic::query_with_timeout(credentials.clone(), &socket_addr, timeout_settings).map(Box::new)?
|
||||
}
|
||||
Protocol::Gamespy(version) => {
|
||||
match version {
|
||||
GameSpyVersion::One => protocols::gamespy::one::query(&socket_addr, timeout_settings).map(Box::new)?,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue