[Game] Apply new id naming (#114)

* Apply new id naming

* Fix failing CI on all features

* Update changelog

* Rename tf2 example to teamfortress2

* Fix typo in steamapp game names

* Rename minecraft legacy versions

* Apply CI node badge fix by Douile

* Add/Update badge

---------

Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
CosminPerRam 2023-10-06 17:20:30 +03:00 committed by GitHub
parent b4c61781fb
commit 5280ecb3c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
38 changed files with 231 additions and 232 deletions

View file

@ -99,13 +99,13 @@ mod test {
}
#[test]
fn battlefield() { test_game("bf1942"); }
fn battlefield1942() { test_game("battlefield1942"); }
#[test]
fn minecraft() { test_game("minecraft"); }
#[test]
fn tf2() { test_game("tf2"); }
fn teamfortress2() { test_game("teamfortress2"); }
#[test]
fn quake() { test_game("quake3"); }

View file

@ -1,10 +1,10 @@
use gamedig::games::mc;
use gamedig::games::minecraft;
use gamedig::protocols::minecraft::RequestSettings;
fn main() {
// or Some(<port>), None is the default protocol port (which is 25565 for java
// and 19132 for bedrock)
let response = mc::query(&"127.0.0.1".parse().unwrap(), None);
let response = minecraft::query(&"127.0.0.1".parse().unwrap(), None);
// This will fail if no server is available locally!
match response {
@ -15,7 +15,7 @@ fn main() {
// This is an example to query a server with a hostname to be specified in the
// packet. Passing -1 on the protocol_version means anything, note that
// an invalid value here might result in server not responding.
let response = mc::query_java(
let response = minecraft::query_java(
&"209.222.114.62".parse().unwrap(),
Some(25565),
Some(RequestSettings {

View file

@ -1,7 +1,7 @@
use gamedig::games::tf2;
use gamedig::games::teamfortress2;
fn main() {
let response = tf2::query(&"127.0.0.1".parse().unwrap(), None);
let response = teamfortress2::query(&"127.0.0.1".parse().unwrap(), None);
// or Some(27015), None is the default protocol port (which is 27015)
match response {