feat: minetest support (#218)

* feat: initial minetest support

* move player to master, remove comments

* add markdown lines

* oops, change player namespace

* fix some edge cases

* add entry to responses, tweak field names
This commit is contained in:
CosminPerRam 2024-10-30 13:24:40 +02:00 committed by GitHub
parent 30ae60e4dc
commit bcc92d17df
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 246 additions and 59 deletions

View file

@ -23,6 +23,8 @@ pub enum ProprietaryProtocol {
Savage2,
Eco,
Mindustry,
#[cfg(all(feature = "services", feature = "tls", feature = "serde"))]
Minetest,
}
/// Enumeration of all valid protocol types
@ -63,6 +65,13 @@ pub enum GenericResponse<'a> {
Savage2(&'a crate::games::savage2::Response),
#[cfg(feature = "games")]
Eco(&'a crate::games::eco::Response),
#[cfg(all(
feature = "services",
feature = "tls",
feature = "serde",
feature = "games"
))]
Minetest(&'a crate::games::minetest::Response),
}
/// All player types
@ -84,6 +93,13 @@ pub enum GenericPlayer<'a> {
JCMP2(&'a crate::games::jc2m::Player),
#[cfg(feature = "games")]
Eco(&'a crate::games::eco::Player),
#[cfg(all(
feature = "services",
feature = "tls",
feature = "serde",
feature = "games"
))]
Minetest(&'a crate::games::minetest::Player),
}
pub trait CommonResponse {