mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-06-01 09:42:41 +00:00
Ark: Survival Evolved support
This commit is contained in:
parent
e689bc766e
commit
0a48b0e8eb
5 changed files with 20 additions and 2 deletions
|
|
@ -3,7 +3,8 @@ Who knows what the future holds...
|
|||
|
||||
# 0.0.6 - ??/??/2022
|
||||
[Minecraft](https://www.minecraft.com) implementation (bedrock not supported yet).
|
||||
[7 Days To Die](https://store.steampowered.com/app/251570/7_Days_to_Die/) implementation.
|
||||
[7 Days To Die](https://store.steampowered.com/app/251570/7_Days_to_Die/) support.
|
||||
[ARK: Survival Evolved](https://store.steampowered.com/app/346110/ARK_Survival_Evolved/) support.
|
||||
|
||||
# 0.0.5 - 15/11/2022
|
||||
Added `SocketBind` error, regarding failing to bind a socket.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
use std::env;
|
||||
use gamedig::{aliens, asrd, cscz, csgo, css, dod, dods, GDResult, gm, hl2dm, ins, insmic, inss, l4d, l4d2, mc, sdtd, tf2, ts};
|
||||
use gamedig::{aliens, ase, asrd, cscz, csgo, css, dod, dods, GDResult, gm, hl2dm, ins, insmic, inss, l4d, l4d2, mc, sdtd, tf2, ts};
|
||||
use gamedig::protocols::minecraft::{LegacyGroup, Server};
|
||||
use gamedig::protocols::valve;
|
||||
use gamedig::protocols::valve::App;
|
||||
|
|
@ -48,6 +48,7 @@ fn main() -> GDResult<()> {
|
|||
"mc_legacy_v1_4" => println!("{:#?}", mc::query_specific(Server::Legacy(LegacyGroup::V1_4), ip, port)?),
|
||||
"mc_legacy_v1_6" => println!("{:#?}", mc::query_specific(Server::Legacy(LegacyGroup::V1_6), ip, port)?),
|
||||
"7dtd" => println!("{:#?}", sdtd::query(ip, port)?),
|
||||
"ase" => println!("{:#?}", ase::query(ip, port)?),
|
||||
"_src" => println!("{:#?}", valve::query(ip, 27015, App::Source(None), None, None)?),
|
||||
"_gld" => println!("{:#?}", valve::query(ip, 27015, App::GoldSrc(false), None, None)?),
|
||||
"_gld_f" => println!("{:#?}", valve::query(ip, 27015, App::GoldSrc(true), None, None)?),
|
||||
|
|
|
|||
12
src/games/ase.rs
Normal file
12
src/games/ase.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 => 27015,
|
||||
Some(port) => port
|
||||
}, SteamID::ASE.as_app(), None, None)?;
|
||||
|
||||
Ok(game::Response::new_from_valve_response(valve_response))
|
||||
}
|
||||
|
|
@ -37,3 +37,5 @@ pub mod dod;
|
|||
pub mod mc;
|
||||
/// 7 Days To Die
|
||||
pub mod sdtd;
|
||||
/// ARK: Survival Evolved
|
||||
pub mod ase;
|
||||
|
|
|
|||
|
|
@ -175,6 +175,8 @@ pub enum SteamID {
|
|||
INS = 222880,
|
||||
/// 7 Days To Die
|
||||
SDTD = 251570,
|
||||
/// ARK: Survival Evolved
|
||||
ASE = 346110,
|
||||
/// Insurgency: Sandstorm
|
||||
INSS = 581320,
|
||||
/// Alien Swarm: Reactive Drop
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue