[Protocol] Standardize fields (#84)

* [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
This commit is contained in:
CosminPerRam 2023-08-15 20:44:18 +03:00 committed by GitHub
parent 65c56dc196
commit 9d8fb1ba94
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 249 additions and 200 deletions

View file

@ -5,50 +5,50 @@ In the case that a field that performs the same function exists in the current c
# Response table
| Field | Generic | GameSpy(1) | GameSpy(2) | GameSpy(3) | Minecraft(Java) | Minecraft(Bedrock) | Valve | Quake | Proprietary: FFOW | Proprietary: TheShip |
| :--------------- | ---------------- | ------------ | ------------ | ------------ | ----------------- | -------------------- | -------- | -------- | -------- | --------- |
| name | `Option<String>` | `String` | `String` | `String` | | `String` | `String` | `String` | `String` | `String` |
| description | `Option<String>` | | | | `String` | | | | `String` | |
| game | `Option<String>` | `String` (game_type) | | `String` (game_type) | | `Option<GameMode>` (game_mode) | `String` | | `String` (game_mode) | `String` |
| game_version | `Option<String>` | `String` | | `String` | `String` (version_name) | | `String` (version) | `String` (version) | `String` (version) | `String` (version) |
| map | `Option<String>` | `String` | `String` | `String` | | `Option<String>` | `String` | `String` | `String` | `String` |
| players_maxmimum | `u64` | `usize` | `usize` | `usize` | `u32` | `u32` | `u8` | `u8` | `u8` | `u8` (max_players) |
| players_online | `u64` | `usize` | `usize` | `usize` | `u32` | `u32` | `u8` | `u8` | `u8` | `u8` (players) |
| players_bots | `Option<u64>` | | | | | | `u8` | | | `u8` (bots) |
| has_password | `Option<bool>` | `bool` | `bool` | `bool` | | | `bool` | | `bool` | `bool` |
| map_title | | `Option<String>` | | | | | | | | |
| admin_contact | | `Option<String>` | | | | | | | | |
| admin_name | | `Option<String>` | | | | | | | | |
| players_minimum | | `Option<u8>` | `Option<u8>` | `Option<u8>` | | | | | | |
| players | | `Vec<Player>` | `Vec<Player>` | `Vec<Player>` | | | `Option<Vec<ServerPlayer>>` | `Vec<P>` | | `Vec<TheShipPlayer>` (player_details) |
| tournament | | `bool` | |`bool` | | | | | | |
| unused_entries | | `Hashmap<String, String>` | | `HashMap<String, String>` | | | `Option<ExtraData>` (extra_data) | `HashMap<String, String>` | | |
| teams | | | `Vec<Team>` | `Vec<Team>` | | | | | | |
| version_protocol | | | | | `i32` | `String` | `u8` (protocol) | | `u8` (protocol) | `u8` (protocol) |
| players_sample | | | | | `Option<Vec<Player>>` | | | | | |
| favicon | | | | | `Option<String>` | | | | | |
| previews_chat | | | | | `Option<bool>` | | | | | |
| enforces_secure_chat | | | | | `Option<bool>` | | | | | |
| server_type | | | | | `Server` | `Server` | `Server` | | | `Server` |
| edition | | | | | | `String` | | | | |
| id | | | | | | `String` | | | | |
| rules | | | | | | | `Option<HashMap<String,String>>` | | | `HashMap<String,String>` |
| folder | | | | | | | `String` | | | |
| appid | | | | | | | `u32` | | | |
| environment_type | | | | | | | `Environment` | | `Environment` | |
| vac_secured | | | | | | | `bool` | | `bool` | `bool` |
| the_ship | | | | | | | `Option<TheShip>` | | | |
| is_mod | | | | | | | `bool` | | | |
| mod_data | | | | | | | `Option<ModData>` | | | |
| active_mod | | | | | | | | | `String` | |
| round | | | | | | | | | `u8` | |
| rounds_maximum | | | | | | | | | `u8` | |
| time_left | | | | | | | | | `u16` | |
| port | | | | | | | | | | `Option<u16>` |
| steam_id | | | | | | | | | | `Option<u64>` |
| tv_port | | | | | | | | | | `Option<u16>` |
| tv_name | | | | | | | | | | `Option<String>` |
| keywords | | | | | | | | | | `Option<string>` |
| mode | | | | | | | | | | `u8` |
| witnesses | | | | | | | | | | `u8` |
| duration | | | | | | | | | | `u8` |
| Field | Generic | GameSpy(1) | GameSpy(2) | GameSpy(3) | Minecraft(Java) | Minecraft(Bedrock) | Valve | Quake | Proprietary: FFOW | Proprietary: TheShip | Proprietary: JC2MP |
|:---------------------|------------------|---------------------------|---------------|---------------------------|-----------------------|----------------------|----------------------------------|---------------------------|-------------------|--------------------------|--------------------|
| name | `Option<String>` | `String` | `String` | `String` | | `String` | `String` | `String` | `String` | `String` | `String` |
| description | `Option<String>` | | | | `String` | | | | `String` | | `String` |
| game_mode | `Option<String>` | `String` | | `String` | | `Option<GameMode>` | `String` | | `String` | `String` | |
| game_version | `Option<String>` | `String` | | `String` | `String` | | `String` | `String` | `String` | `String` | `String` |
| map | `Option<String>` | `String` | `String` | `String` | | `Option<String>` | `String` | `String` | `String` | `String` | |
| players_maxmimum | `u32` | `u32` | `u32` | `u32` | `u32` | `u32` | `u8` | `u8` | `u8` | `u8` | `u32` |
| players_online | `u32` | `u32` | `u32` | `u32` | `u32` | `u32` | `u8` | `u8` | `u8` | `u8` | `u32` |
| players_bots | `Option<u32>` | | | | | | `u8` | | | `u8` | |
| has_password | `Option<bool>` | `bool` | `bool` | `bool` | | | `bool` | | `bool` | `bool` | `bool` |
| players_minimum | | `Option<u8>` | `Option<u8>` | `Option<u8>` | | | | | | | |
| players | | `Vec<Player>` | `Vec<Player>` | `Vec<Player>` | `Option<Vec<Player>>` | | `Option<Vec<ServerPlayer>>` | `Vec<P>` | | `Vec<TheShipPlayer>` | `Vec<Player>` |
| tournament | | `bool` | | `bool` | | | | | | | |
| unused_entries | | `Hashmap<String, String>` | | `HashMap<String, String>` | | | | `HashMap<String, String>` | | | |
| teams | | | `Vec<Team>` | `Vec<Team>` | | | | | | | |
| protocol_version | | | | | `i32` | `String` | `u8` | | `u8` | `u8` | |
| server_type | | | | | `Server` | `Server` | `Server` | | | `Server` | |
| rules | | | | | | | `Option<HashMap<String,String>>` | | | `HashMap<String,String>` | |
| environment_type | | | | | | | `Environment` | | `Environment` | | |
| vac_secured | | | | | | | `bool` | | `bool` | `bool` | |
| map_title | | `Option<String>` | | | | | | | | | |
| admin_contact | | `Option<String>` | | | | | | | | | |
| admin_name | | `Option<String>` | | | | | | | | | |
| favicon | | | | | `Option<String>` | | | | | | |
| previews_chat | | | | | `Option<bool>` | | | | | | |
| enforces_secure_chat | | | | | `Option<bool>` | | | | | | |
| edition | | | | | | `String` | | | | | |
| id | | | | | | `String` | | | | | |
| the_ship | | | | | | | `Option<TheShip>` | | | | |
| is_mod | | | | | | | `bool` | | | | |
| extra_data | | | | | | | `Option<ExtraData>` | | | | |
| mod_data | | | | | | | `Option<ModData>` | | | | |
| folder | | | | | | | `String` | | | | |
| appid | | | | | | | `u32` | | | | |
| active_mod | | | | | | | | | `String` | | |
| round | | | | | | | | | `u8` | | |
| rounds_maximum | | | | | | | | | `u8` | | |
| time_left | | | | | | | | | `u16` | | |
| port | | | | | | | | | | `Option<u16>` | |
| steam_id | | | | | | | | | | `Option<u64>` | |
| tv_port | | | | | | | | | | `Option<u16>` | |
| tv_name | | | | | | | | | | `Option<String>` | |
| keywords | | | | | | | | | | `Option<string>` | |
| mode | | | | | | | | | | `u8` | |
| witnesses | | | | | | | | | | `u8` | |
| duration | | | | | | | | | | `u8` | |