mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-06-01 09:42:41 +00:00
[Games] Add Crysis Wars support.
This commit is contained in:
parent
3ef599056a
commit
33e8f43cb8
5 changed files with 13 additions and 49 deletions
|
|
@ -14,6 +14,7 @@ Protocols:
|
||||||
Games:
|
Games:
|
||||||
- [Serious Sam](https://www.gog.com/game/serious_sam_the_first_encounter) support.
|
- [Serious Sam](https://www.gog.com/game/serious_sam_the_first_encounter) support.
|
||||||
- [Frontlines: Fuel of War](https://store.steampowered.com/app/9460/Frontlines_Fuel_of_War/) support.
|
- [Frontlines: Fuel of War](https://store.steampowered.com/app/9460/Frontlines_Fuel_of_War/) support.
|
||||||
|
- [Crysis Wars](https://steamcommunity.com/app/17340) support.
|
||||||
|
|
||||||
Services:
|
Services:
|
||||||
- [Valve Master Server Query](https://developer.valvesoftware.com/wiki/Master_Server_Query_Protocol) support.
|
- [Valve Master Server Query](https://developer.valvesoftware.com/wiki/Master_Server_Query_Protocol) support.
|
||||||
|
|
|
||||||
1
GAMES.md
1
GAMES.md
|
|
@ -49,6 +49,7 @@ Beware of the `Notes` column, as it contains information about query port offset
|
||||||
| Battlefield 1942 | BF1942 | GameSpy 1 | Query port is 23000. |
|
| Battlefield 1942 | BF1942 | GameSpy 1 | Query port is 23000. |
|
||||||
| Serious Sam | SS | GameSpy 1 | Query Port offset: 1. |
|
| Serious Sam | SS | GameSpy 1 | Query Port offset: 1. |
|
||||||
| Frontlines: Fuel of War | FFOW | Valve Protocol (Proprietary) | Query Port offset: 2. |
|
| Frontlines: Fuel of War | FFOW | Valve Protocol (Proprietary) | Query Port offset: 2. |
|
||||||
|
| Crysis Wars | CW | GameSpy 3 | |
|
||||||
|
|
||||||
## Planned to add support:
|
## Planned to add support:
|
||||||
_
|
_
|
||||||
|
|
|
||||||
|
|
@ -2,55 +2,7 @@ use gamedig::protocols::gamespy;
|
||||||
use gamedig::protocols::minecraft::LegacyGroup;
|
use gamedig::protocols::minecraft::LegacyGroup;
|
||||||
use gamedig::protocols::valve;
|
use gamedig::protocols::valve;
|
||||||
use gamedig::protocols::valve::Engine;
|
use gamedig::protocols::valve::Engine;
|
||||||
use gamedig::{
|
use gamedig::{aliens, aoc, arma2oa, ase, asrd, avorion, bat1944, bb2, bf1942, bm, bo, ccure, cosu, cs, cscz, csgo, css, dod, dods, doi, dst, ffow, gm, hl2dm, hldms, ins, insmic, inss, l4d, l4d2, mc, ohd, onset, pz, ror2, rust, sc, sdtd, ss, tf, tf2, tfc, ts, unturned, ut, vr, GDResult, cw};
|
||||||
aliens,
|
|
||||||
aoc,
|
|
||||||
arma2oa,
|
|
||||||
ase,
|
|
||||||
asrd,
|
|
||||||
avorion,
|
|
||||||
bat1944,
|
|
||||||
bb2,
|
|
||||||
bf1942,
|
|
||||||
bm,
|
|
||||||
bo,
|
|
||||||
ccure,
|
|
||||||
cosu,
|
|
||||||
cs,
|
|
||||||
cscz,
|
|
||||||
csgo,
|
|
||||||
css,
|
|
||||||
dod,
|
|
||||||
dods,
|
|
||||||
doi,
|
|
||||||
dst,
|
|
||||||
ffow,
|
|
||||||
gm,
|
|
||||||
hl2dm,
|
|
||||||
hldms,
|
|
||||||
ins,
|
|
||||||
insmic,
|
|
||||||
inss,
|
|
||||||
l4d,
|
|
||||||
l4d2,
|
|
||||||
mc,
|
|
||||||
ohd,
|
|
||||||
onset,
|
|
||||||
pz,
|
|
||||||
ror2,
|
|
||||||
rust,
|
|
||||||
sc,
|
|
||||||
sdtd,
|
|
||||||
ss,
|
|
||||||
tf,
|
|
||||||
tf2,
|
|
||||||
tfc,
|
|
||||||
ts,
|
|
||||||
unturned,
|
|
||||||
ut,
|
|
||||||
vr,
|
|
||||||
GDResult,
|
|
||||||
};
|
|
||||||
use std::env;
|
use std::env;
|
||||||
|
|
||||||
fn main() -> GDResult<()> {
|
fn main() -> GDResult<()> {
|
||||||
|
|
@ -169,6 +121,7 @@ fn main() -> GDResult<()> {
|
||||||
"_gamespy3" => println!("{:#?}", gamespy::three::query(ip, port.unwrap(), None)),
|
"_gamespy3" => println!("{:#?}", gamespy::three::query(ip, port.unwrap(), None)),
|
||||||
"_gamespy3_vars" => println!("{:#?}", gamespy::three::query_vars(ip, port.unwrap(), None)),
|
"_gamespy3_vars" => println!("{:#?}", gamespy::three::query_vars(ip, port.unwrap(), None)),
|
||||||
"ffow" => println!("{:#?}", ffow::query(ip, port)),
|
"ffow" => println!("{:#?}", ffow::query(ip, port)),
|
||||||
|
"cw" => println!("{:#?}", cw::query(ip, port)),
|
||||||
_ => panic!("Undefined game: {}", args[1]),
|
_ => panic!("Undefined game: {}", args[1]),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
7
src/games/cw.rs
Normal file
7
src/games/cw.rs
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
use crate::protocols::gamespy;
|
||||||
|
use crate::protocols::gamespy::three::Response;
|
||||||
|
use crate::GDResult;
|
||||||
|
|
||||||
|
pub fn query(address: &str, port: Option<u16>) -> GDResult<Response> {
|
||||||
|
gamespy::three::query(address, port.unwrap_or(64100), None)
|
||||||
|
}
|
||||||
|
|
@ -92,3 +92,5 @@ pub mod unturned;
|
||||||
pub mod ut;
|
pub mod ut;
|
||||||
/// V Rising
|
/// V Rising
|
||||||
pub mod vr;
|
pub mod vr;
|
||||||
|
/// Crysis Wars
|
||||||
|
pub mod cw;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue