mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-06-01 09:42:41 +00:00
Renamed players and online_players to players_details and players
This commit is contained in:
parent
15e6ad5892
commit
675ed13493
3 changed files with 12 additions and 12 deletions
|
|
@ -24,8 +24,8 @@ pub struct Response {
|
||||||
pub name: String,
|
pub name: String,
|
||||||
pub map: String,
|
pub map: String,
|
||||||
pub game: String,
|
pub game: String,
|
||||||
pub players: Vec<Player>,
|
pub players: u8,
|
||||||
pub online_players: u8,
|
pub players_details: Vec<Player>,
|
||||||
pub max_players: u8,
|
pub max_players: u8,
|
||||||
pub bots: u8,
|
pub bots: u8,
|
||||||
pub server_type: Server,
|
pub server_type: Server,
|
||||||
|
|
@ -51,8 +51,8 @@ impl Response {
|
||||||
name: response.info.name,
|
name: response.info.name,
|
||||||
map: response.info.map,
|
map: response.info.map,
|
||||||
game: response.info.game,
|
game: response.info.game,
|
||||||
players: response.players.unwrap().iter().map(|p| Player::from_valve_response(p)).collect(),
|
players: response.info.players,
|
||||||
online_players: response.info.players,
|
players_details: response.players.unwrap().iter().map(|p| Player::from_valve_response(p)).collect(),
|
||||||
max_players: response.info.max_players,
|
max_players: response.info.max_players,
|
||||||
bots: response.info.bots,
|
bots: response.info.bots,
|
||||||
server_type: response.info.server_type,
|
server_type: response.info.server_type,
|
||||||
|
|
|
||||||
|
|
@ -24,8 +24,8 @@ pub struct Response {
|
||||||
pub name: String,
|
pub name: String,
|
||||||
pub map: String,
|
pub map: String,
|
||||||
pub game: String,
|
pub game: String,
|
||||||
pub players: Vec<Player>,
|
pub players: u8,
|
||||||
pub online_players: u8,
|
pub players_details: Vec<Player>,
|
||||||
pub max_players: u8,
|
pub max_players: u8,
|
||||||
pub bots: u8,
|
pub bots: u8,
|
||||||
pub server_type: Server,
|
pub server_type: Server,
|
||||||
|
|
@ -52,8 +52,8 @@ impl Response {
|
||||||
name: response.info.name,
|
name: response.info.name,
|
||||||
map: response.info.map,
|
map: response.info.map,
|
||||||
game: response.info.game,
|
game: response.info.game,
|
||||||
players: response.players.unwrap().iter().map(|p| Player::from_valve_response(p)).collect(),
|
players: response.info.players,
|
||||||
online_players: response.info.players,
|
players_details: response.players.unwrap().iter().map(|p| Player::from_valve_response(p)).collect(),
|
||||||
max_players: response.info.max_players,
|
max_players: response.info.max_players,
|
||||||
bots: response.info.bots,
|
bots: response.info.bots,
|
||||||
server_type: response.info.server_type,
|
server_type: response.info.server_type,
|
||||||
|
|
|
||||||
|
|
@ -28,8 +28,8 @@ pub struct Response {
|
||||||
pub name: String,
|
pub name: String,
|
||||||
pub map: String,
|
pub map: String,
|
||||||
pub game: String,
|
pub game: String,
|
||||||
pub players: Vec<Player>,
|
pub players: u8,
|
||||||
pub online_players: u8,
|
pub players_details: Vec<Player>,
|
||||||
pub max_players: u8,
|
pub max_players: u8,
|
||||||
pub bots: u8,
|
pub bots: u8,
|
||||||
pub server_type: Server,
|
pub server_type: Server,
|
||||||
|
|
@ -61,8 +61,8 @@ impl Response {
|
||||||
name: response.info.name,
|
name: response.info.name,
|
||||||
map: response.info.map,
|
map: response.info.map,
|
||||||
game: response.info.game,
|
game: response.info.game,
|
||||||
players: response.players.unwrap().iter().map(|p| Player::from_valve_response(p)).collect(),
|
players: response.info.players,
|
||||||
online_players: response.info.players,
|
players_details: response.players.unwrap().iter().map(|p| Player::from_valve_response(p)).collect(),
|
||||||
max_players: response.info.max_players,
|
max_players: response.info.max_players,
|
||||||
bots: response.info.bots,
|
bots: response.info.bots,
|
||||||
server_type: response.info.server_type,
|
server_type: response.info.server_type,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue