mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-05-06 15:27:28 +00:00
* 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>
16 KiB
16 KiB
Every protocol has its own response type(s), below is a listing of the overlapping fields on these responses.
If a cell is blank it doesn't exist, otherwise it contains the type of that data in the current column's response type. In the case that a field that performs the same function exists in the current column's response type that name is annotated in brackets.
Response table
| Field | Generic | GameSpy(1) | GameSpy(2) | GameSpy(3) | Minecraft(Java) | Minecraft(Bedrock) | Valve | Quake | Unreal2 | Proprietary: FFOW | Proprietary: TheShip | Proprietary: JC2MP |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| name | Option<String> |
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 |
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 |
String |
||
| players_maxmimum | u32 |
u32 |
u32 |
u32 |
u32 |
u32 |
u8 |
u8 |
u32 |
u8 |
u8 |
u32 |
| players_online | u32 |
u32 |
u32 |
u32 |
u32 |
u32 |
u8 |
u8 |
u32 |
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<Player> |
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, Vec<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 |
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 | u32 |
Option<u16> |
||||||||||
| steam_id | Option<u64> |
|||||||||||
| tv_port | Option<u16> |
|||||||||||
| tv_name | Option<String> |
|||||||||||
| keywords | Option<String> |
|||||||||||
| mode | u8 |
|||||||||||
| witnesses | u8 |
|||||||||||
| duration | u8 |
|||||||||||
| query_port | u32 |
|||||||||||
| ip | String |
|||||||||||
| mutators | HashSet<String> |