* 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>
* Add initial CONTRIBUTING.md file
* Update CONTRIBUTING.md
Co-authored-by: Tom <25043847+Douile@users.noreply.github.com>
* Specify to look whether there is an existing relevant issue first
* Specify that ids are lowercased only
* Fix tyope.
* Specify special case with multiple editions/versions
* Clarify an id already existing and fix typo
* Add new rule to specify what to do about names that being with numbers
* Simplify numbering rules
* Simplify numbering rules
* Specify on #1 unless #4 applies
* Specify naming for game names
* Add rule regarding mods that add ability for queries
* Remake rule 7 to include protocol naming
* Specify lowercase aplhanumeric
---------
Co-authored-by: Tom <25043847+Douile@users.noreply.github.com>
* [Protocol] Gamespy1 don't skip "playername" field (#88)
* [Protocol] Gamespy1 make more player fields optional (#88)
These fields seem to be missing from bf1942 queries so make them
optional.
* Add retry count to TimeoutSettings
This can be used to specify how many times to re-send requests that
fail. The default value is "1" so the if the first request fails, 1 more
attempt will be made.
* Add retries to valve queries
* [Protocol] &Optional<TimeoutSettings> add get_retries_or_default
Allow fetching the number of retries or the default retries value from a
borrowed optional TimeoutSettings.
* [Protocol] Add retries to minecraft protocol
* [Protocol] Add retries to quake
* [Protocol] Add retries to gamespy
* [Protocol] Update TimeoutSettings docs, and change default retries to 0
* Remove logging from retry_on_timeout
* [Protocol] TimeoutSettings make retries non-optional
* [Protocol] Move retry logic into lower level query functions
Retries are now implemented as wrappers on the single function that
would need to be retried on timeout.
In order to avoid cloning of TimeoutSettings, Socket::apply_timeouts()
was changed to accept a borrowed TimeoutSettings. And extra helpers were
added to the TimeoutSettings impl to reduce repetition.
* [Examples] Add retries to the generic example
* Also retry on PacketSend error
Sending packets could also timeout and until error_generic_member_access
is stable we have no way of determining the type of the underlying
`std::error::Error`.
* Add retry unit tests
* [Docs] Update changelog
* [Games] Update game definitions to match node-gamedig names
* Update game file names to match definitions
* [Games] rename minecraft definitions to better match node
* [Games] Add test that all game files match definition name
* Update SteamApp to match node names
* [Games] Update the forest to match node-GameDig#367
* Clippy fix in games test
* [Docs] Update GAMES.md with new names
* [DOCS] Update changelog
* [CI] Fix permissions on guest prs
* Revert last commit
* Revert last commit
* Don't specify branch name in pr target
* Properly space on line
* Specify branch
* Add quotes to labeler points
* Remove the quotes on files in labeler.yml
* [Generic] Add struct for all extra request settings
Adds a new struct `ExtraRequestSettings` that contains all possible
extra settings for all protocols, and can be implicitly converted with
`.into()` into each protocol's extra settings type.
This is then used in a new query method
`query_with_timeout_and_extra_settings()` that passes the object on to
the selected protocol.
This also updates the generic example to set some of these generic
settings so that it can be used for certain queries like
"mc.hypixel.net".
* [Minecraft] Add `request_settings` parameter to auto query
This allows generic queries to pass through request settings when using
the `mc` game so that servers like `mc.hypixel.net` will still work when
using auto query.
* Fix generic examples tests (and enable example tests in pre-commit)
* Make initial fix
* Fix imports
* Rename query_address to hostname and add this to the mc example
* Fix master_querant example not compiling
* Add extra safety on converting strings to Minecraft Varint strings
* Add docs to RequestSettings
* Fix formatting
* [Protocol] Standardize The Ship fields
* [Protocol] Standardize FFOW fields
* [Protocol] Rename Valve's protocol field to protocol_version
* [Protocol] Rename Minecraft's version_protocol field to protocol_version
* [Protocol] Rename Valve's version field to game_version
* [Protocol] Rename Minecraft java version_name to game_version
* [Crate] Reformat RESPONSES.md
* [Protocol] Renamed Minecraft Java players_sample to players
* [Protocol] Rename Quake (1,2,3) version field to game_version
* [Protocol] Rename quake (1 and 2) game_type field to game_mode
* [Protocol] Rename Valve, FFOW, TS game field to game_mode
* [Generics] Rename game field/function to game_mode
* [Protocol] Change players_minimum, _maximum and _bots from those who werent u8 or u32 to u32
* [Protocol] Change instances of player score field type from u32 to i32
* [Crate] Nicer gramar in CHANGELOG
* [Protocol] Apply clippy fixes
* Add rich error type with source and backtrace
Adds a rich error type that will take a backtrace and allow capturing
the source of the error. The best way to use this is with the included
helpers that will automatically capture the backtrace and convert the
source error:
```
GDRichError::packet_bad_from_into("Reason packet was bad")
```
* [Crate] Bump MSRV to 1.65.0
This is required for backtraces in rich errors.
* Remove leftover debug logging
* [Errors] Replace variant overloads with single .rich method on kind enum
This overhaul replaces the exhaustive impls of each variant as multiple
methods on the rich error type with a singular .rich() method on the
kind enum. This consumes the variant and converts it to a rich error
with a source (.into() can be used if a source is not needed).
I also took the liberty of replacing all usages with the this new method
as I saw fit (adding various error messages) and converting a few
PacketBad errors to TypeParse errors when they are the result of parse
failing.
* Fix problem with rustdoc
* Remove BadGame's owned string
* Rename GDError to GDErrorKind
* Rename GDRichError to GDError
* Remove error impl from GDErrorKind
* Fix tests not passing
* Use error context everywhere map_err is used
* Improve GDError display formatter
* Add tests for new error type