Add support for Mindustry (#178)

* buffer: Add UTF8LengthPrefixed string decoder

* games: Use expression for default port

This allows us to refer to constants for the default ports if we want to
(literals will still work).

* games: Add support for mindustry
This commit is contained in:
Tom 2024-01-17 13:53:40 +00:00 committed by GitHub
parent ba92466ae1
commit 07de5168f4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 251 additions and 3 deletions

View file

@ -19,6 +19,7 @@ pub enum ProprietaryProtocol {
FFOW,
JC2M,
Savage2,
Mindustry,
}
/// Enumeration of all valid protocol types
@ -42,6 +43,8 @@ pub enum GenericResponse<'a> {
Valve(&'a valve::Response),
Unreal2(&'a unreal2::Response),
#[cfg(feature = "games")]
Mindustry(&'a crate::games::mindustry::types::ServerData),
#[cfg(feature = "games")]
Minecraft(minecraft::VersionedResponse<'a>),
#[cfg(feature = "games")]
TheShip(&'a crate::games::theship::Response),