Commit graph

361 commits

Author SHA1 Message Date
CosminPerRam
45f05aec13
feat: add Squad support (#164)
* feat: add Squad support

* Add/Update badge

---------

Co-authored-by: GitHub Action <action@github.com>
2023-12-03 20:59:46 +02:00
CosminPerRam
decff82318
feat: add Post Scriptum support (#163)
* feat: add post scriptum support

* Add/Update badge

---------

Co-authored-by: GitHub Action <action@github.com>
2023-12-03 20:51:43 +02:00
Tom
7510fe3de0
Various improvements for the CLI (#159)
* cli: Do DNS lookup if host is not an IP address

* cli: Add option to output as JSON

* cli: Pass hostname to ExtraRequestSettings if it isn't an IP

* cli: Add help docs to all arguments

* cli: Add options for all extra request settings

* cli: Use a CLI only error for DNS

* cli: Add option to set timeout settings

* docs: Update CHANGELOG

* cli: Add default values to TimeoutSettings

* cli: Refactor finding game definition into its own function

Co-Authored-By: Cain <75994858+cainthebest@users.noreply.github.com>

* cli: Refactor IP resolution into its own set of functions

Co-Authored-By: Cain <75994858+cainthebest@users.noreply.github.com>

* cli: Refactor output formatting into its own functions

Co-Authored-By: Cain <75994858+cainthebest@users.noreply.github.com>

* cli: Improve doc comments for CLI args and derive Debug

Co-Authored-By: Cain <75994858+cainthebest@users.noreply.github.com>

* protocols: Derive Serialize for versioned generic responses

This allows for serializing the output of as_original(). We cannot also
derive Deserialize here because the enums use references to the inner
types, which is unavoidable in the current implementation because
as_original() takes a reference to self.

* cli: Add the output mode options

This allows selected whether to use CommonResponse or the original
response struct when outputting.

* cli: Fix ExtraRequestSettings docs showing up in help output

* cli: Add help headings for timeouts and extra request settings

---------

Co-authored-by: Cain <75994858+cainthebest@users.noreply.github.com>
2023-11-26 22:59:59 +00:00
Tom
b3a29b15b1
[CI] Improvement and fixes (#161)
* protocols: Fix building without the "games" feature

* crate/lib: Add required features for examples

This prevents cargo from running the examples if the required features
aren't enabled.

* ci: Run if ANY Cargo.toml files are changed

* ci: Make sure to run unit tests

* ci: Separate checks for library and CLI

* ci: Add slightly better comments

* ci: Only run deeper tests for CLI or LIB when their files were changed

* ci: Improve act arguments for testing actions locally

* ci: Fix pre-commit not running tests

* ci: Only update shared cache after the initial build

* ci: Make sure that rustup downloads get cached

* tidy: Clean up file formatting

* ci: Fix issue with audit
2023-11-25 00:34:26 +02:00
Tom
0c7dbe76d7
ci: Update node coverage badge to work without games.txt (#156)
* ci: Update node coverage badge to work without games.txt

Fixes #155 using a new node script that should be more robust than the
old shell script.

* ci: Change badge cron time to less common time

By doing at a less common time we should reduce action time usage as
the runners will be under less load.

* Add/Update badge

* ci: Improve node-badge script

Co-Authored-By: CosminPerRam <cosmin.p@live.com>

* ci: Run node badge action if script changes

* ci: Update node badge path for workspaces

* ci: Revert loading games from index in node badge script

---------

Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: CosminPerRam <cosmin.p@live.com>
2023-11-23 11:48:24 +02:00
Tom
3f1164ef5d
docs: Add info about commits to CONTRIBUTING (#157)
* docs: Add info about commits to CONTRIBUTING

* docs: Improve commits wording
2023-11-22 13:48:01 +02:00
Tom
e3bdbc2a41
feat: Add connect timeout to TimeoutSettings (#158)
Because TcpSocket connects in Socket::new TimeoutSettings are now
required for Socket::new. Since we already have TimeoutSettings there
Sockets are now expected to apply timeout settings in Socket::new.
2023-11-22 12:40:22 +02:00
CosminPerRam
7416d54b14
chore: Move minecraft protocol to games. (#153)
* chore: initial move and refactor of minecraft

* fix: glob re-exports

* fix: failing example sample

* docs: update changelog to note the mc protocol implementation to games

* docs: add back the reference query standard reference
2023-11-18 19:44:09 +02:00
CosminPerRam
bd73b657c7
fix: minecraft id naming inconsistencies (#152)
* fix: minecraft id naming inconsistencies

* fix: minecraft legacy beta 1.8 being wrongly id named in definitions

* docs: Update CHANGELOG to document minecraft legacy renames

* docs: Update CHANGELOG to note removal of legacy versions game names being prefixed with 'v'
2023-11-16 15:18:15 +02:00
CosminPerRam
13f1c2bf35 docs: Add the initial addition of the CLI notice to CHANGELOG. 2023-11-09 01:21:29 +02:00
CosminPerRam
0d27882150
feat(unreal2): Add password rule check (#149)
* feat: add initial password checking

* feat: add password string check and made the field a bool

* chore: fix formatting

* feat: add password to has_password common response
2023-11-09 01:18:52 +02:00
dependabot[bot]
f01cac8fed
Bump actions/checkout from 3 to 4 in /.github/workflows (#151)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-09 01:15:38 +02:00
Cain
c9c8e700cb
chore: add dependabot config (#150) 2023-11-08 23:56:58 +02:00
Cain
89222b1f44
Feat: merge gamedig-cli partially & monorepo conversion
Related issue: #125
2023-11-08 21:31:02 +00:00
Cain
a11ca7f9aa chore: add release opts 2023-11-08 21:11:25 +00:00
Cain
338df9144c chore: update cargo.toml 2023-11-08 20:44:31 +00:00
Cain
963040fb84 Merge branch 'main' into feat/cli 2023-11-08 20:42:07 +00:00
Cain
92ad618723 chore: remove un-needed fmt skip 2023-11-08 20:22:04 +00:00
Douile
1d7cb31bc4
protocols/unreal2: Only compile game impl macros when needed
Unreal2 hadn't been added when #144 was merged so this got missed out.
2023-10-30 13:50:17 +00:00
Tom
529abe9d76
feat: Add the unreal2 protocol (#124)
* WIP: Add unreal2 protocol

* Add/Update badge

* protocols/unreal2: Update doc comments and TODOs

* protocols/unreal2: Don't pre-allocate as many bot players

* protocols/unreal2: Use "encoding-rs" for decoding unreal2 strings

* Add/Update badge

* protocols/unreal2: Add constants for player pre-allocation.

Also improve some doc comments and update PACKET_SIZE.

* protocols/unreal2: Early break when enough players have been parsed

Add a fast-path to avoid waiting for packet timeout when we have parsed
as many players as specified in the server info packet.

* protocols/unreal2: Use HashSet to store mutators

* protocols/unreal2: Handle server sending multiple values for a rule

* protocols/unreal2: Add GatheringSettings to control what to query

GatheringSettings allows skipping querying rules and/or players which
can make the query return much faster. This also required moving each
individual query into its own helper.

* protocols/unreal2: Add more derives to types

* protocols/unreal2: Simplify ServerInfo::parse()

Co-Authored-By: CosminPerRam <cosmin.p@live.com>

* Docs: Add unreal2 protocol documentation

I used a website to generate the markdown RESPONSES table, the save file
from this website is included to make updating the table easier in the
future.

https://www.tablesgenerator.com/markdown_tables

* Add/Update badge

* protocols/unreal2: Use the correct encoding for UCS2 strings

* Docs: Remove unnecessary TGN file

---------

Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: CosminPerRam <cosmin.p@live.com>
2023-10-30 13:37:15 +02:00
Tom
5c1568251a
feat: Only compile game impl macros when they are needed (#144)
These macros are only required when compiling the code gated behind the
games feature, they are unused if that feature is not and are also crate
only.
2023-10-30 11:30:16 +02:00
CosminPerRam
4bbe7e1780 fix: run proper formatting on valve_protocol_query example 2023-10-29 14:49:49 +02:00
CosminPerRam
a3740c5424 fix: remove double similar use on minecraft mod 2023-10-29 14:44:21 +02:00
CosminPerRam
adb2109aea feat: add valve protocol query example 2023-10-29 14:43:35 +02:00
CosminPerRam
f11a50a415 feat: Add Conan Exiles support. 2023-10-29 00:10:47 +03:00
CosminPerRam
1145a064a9 feat: Add The Front support. 2023-10-29 00:00:48 +03:00
CosminPerRam
e3dd7cd1c7
Fix some game ids and clarify rules 6 and 7. (#143)
* Fix wrongly named game ids of l4d, l4d2 and q3a

* Specify how edition/protocol names are appended to games, rule 7

* Clarify rule 6 regarding numbers

* Add/Update badge

* Fix rule 7 misswording

* Fix 7 Days to Die

* List id changes in the changelog

* Forgot to fix test

* Apply Douile suggestion regarding rule 6

Co-authored-by: Tom <25043847+Douile@users.noreply.github.com>

* Fix typo on rule 6 and wrap text

* Clarify further rule 7

---------

Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Tom <25043847+Douile@users.noreply.github.com>
2023-10-24 22:39:36 +03:00
CosminPerRam
2cc9e56168
feat: Remove SteamApp (#142)
* Remove the SteamApp enum.

* Further removal

* Replace SteamApp with Engine on game! usage

* Add removal of SteamApp in changelog

* docs: Update reference of SteamApp to Engine

* Update the docs of the Engine type to be more descriptive.
2023-10-21 23:13:14 +03:00
CosminPerRam
501524b0da
feat: Add GatheringSettings on Valve macros (#128)
* Initial macro modification for gathering settings

* Initial Valheim support

* Remove unused use

* Fix macro

Thanks bunch @Douile

* docs: Add Valheim to CHANGELOG and GAMES

* Add commentary regarding gathering settings comment generation

* Add GatheringSettings to game!

* Remove unused stuff

* Fix tests and add comment regarding the game argument
2023-10-19 23:15:10 +03:00
GitHub Action
6b92e883ef Add/Update badge 2023-10-17 23:31:19 +00:00
Douile
9644163c8c
[fmt] Run rustfmt on crates/cli/src/error.rs 2023-10-18 00:29:21 +01:00
Douile
d34d615784
[CI] Update CI to work with workspaces 2023-10-18 00:29:21 +01:00
Tom
1ca6e6e85c
[Clippy] Remove .clone() from timeout_settings as it is now Copy (#127)
These clones are unnecessary when the type implements Copy and this was
generating clippy warnings.
2023-10-17 19:26:03 +03:00
Douile
8a88e826fa
[Repo] Link to CONTRIBUTING.md in README 2023-10-17 13:37:48 +01:00
Cain
7d4649b6f5 refactor: cli to work next to lib 2023-10-17 00:05:32 +01:00
GitHub Action
6084c56d4f Add/Update badge 2023-10-16 22:21:11 +00:00
Cain
80f6b87991 refator: copy cli into mono 2023-10-16 23:20:47 +01:00
CosminPerRam
66ae3c296e [Crate] Bump version to 0.4.1 2023-10-13 00:43:22 +03:00
GitHub Action
ef29ba8eb4 Add/Update badge 2023-10-12 21:40:31 +00:00
CosminPerRam
5b5c41b468 Add Barotrauma support. 2023-10-13 00:40:08 +03:00
Tom
3b9c784e70
Reduce game implementation repetition (#122)
* [Games] Add macro to replace valve game query implementations

This somewhat reduces repeated code (#120), and also adds auto-generated
doc comments to all valve game query functions.

* [Games] Add macro to replace gamespy game query implementations

This somewhat reduces repeated code (#120), and also adds auto-generated
doc comments to all gamespy game query functions.

* [Games] Add macro to replace quake game query implementations

This somewhat reduces repeated code (#120), and also adds auto-generated
doc comments to all quake game query functions.

* [Games] Move all valve game modules into a single file using macros

Vastly reduces the number of files. However does break the game
definition-per-file test, so that was removed.

* [Games] Move all quake game modules into a single file using macros

* [Games] Move all gamespy game modules into a single file using macros

* [Docs] Update CHANGELOG

* [Docs] Improve game query function generation macro documentation

* [Games] Add missed Halo: Combat Evolved to gamespy
2023-10-10 09:26:35 +03:00
CosminPerRam
c8a93357cf
Add Send and Sync on Error Source (#118)
* Add Send and Sync on Error Source and remove 'static

* Add back 'static

* Update the changelog
2023-10-09 19:11:34 +03:00
GitHub Action
b7e1eff9b7 Add/Update badge 2023-10-09 01:12:54 +00:00
CosminPerRam
b584e11336 Remove serde derives Generic Player and Response 2023-10-08 22:26:25 +03:00
CosminPerRam
1e083c2df7 [Generic] Add missing derives to types 2023-10-08 19:45:24 +03:00
CosminPerRam
7164ab5f64 [Protocol] Add derives to RequestSettings and new_just_hostname function 2023-10-08 00:37:11 +03:00
CosminPerRam
2106e965e4 [Crate] Bump version to 0.4.0 2023-10-07 19:27:43 +03:00
CosminPerRam
53fe402f05 [Repo] Fix typo in README. 2023-10-07 19:26:31 +03:00
CosminPerRam
a3800f3ba4 [Crate] Update byteorder from 1.4 to 1.5 2023-10-07 18:58:21 +03:00
CosminPerRam
40d4be2ceb Remove CosminPerRam from authors as he is not the sole maintainer anymore 2023-10-07 18:36:32 +03:00