mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-05-06 07:17:27 +00:00
[Games] Programmatic games by storing information as data (#45)
* Define games as structs * Create table of response types * Ensure serde is always included * Remove server_ prefix in GenericResponse * Make players online/max non-optional in generic response * Use already existing minecraft server enum * Implement ExtraResponses to prevent cloning when creating generic * Add game definitions * Add doc comments to generic types * Include players in gamespy extra responses * Add custom response types for TheShip and FFOW * Cargo format differing files * Final cleanup
This commit is contained in:
parent
26ad1f5d19
commit
d853189e06
16 changed files with 806 additions and 102 deletions
|
|
@ -17,9 +17,10 @@ keywords = ["server", "query", "game", "check", "status"]
|
|||
rust-version = "1.60.0"
|
||||
|
||||
[features]
|
||||
default = []
|
||||
default = ["game_defs"]
|
||||
no_games = []
|
||||
no_services = []
|
||||
game_defs = ["dep:phf"]
|
||||
serde = ["dep:serde", "serde/derive"]
|
||||
|
||||
[dependencies]
|
||||
|
|
@ -29,3 +30,6 @@ crc32fast = "1.3.2"
|
|||
serde_json = "1.0.91"
|
||||
|
||||
serde = { version = "1.0.155", optional = true }
|
||||
|
||||
phf = { version = "0.11", optional = true, features = ["macros"] }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue