Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Add routing grid to map data in API responses #42

Merged
merged 1 commit into from
Mar 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions api/atc/v1/map.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package atc.v1;

message Map {
Node airport = 1;
repeated Node routing_grid = 2;
}

message Node {
Expand Down
1 change: 1 addition & 0 deletions game/src/map/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ impl AsApi for Map {
fn as_api(&self) -> Self::ApiType {
ApiMap {
airport: Some(self.airport.as_api()),
routing_grid: self.routing_grid.iter().map(|node| node.as_api()).collect(),
}
}
}
Expand Down