diff options
| author | Arne Dußin | 2021-01-11 14:21:03 +0100 |
|---|---|---|
| committer | Arne Dußin | 2021-01-11 16:02:03 +0100 |
| commit | b1179849c28e50c39ac3c94af9dda86ee24beca0 (patch) | |
| tree | 6fc845d3547bdeb87de75e0f049132de3e05a81d /src/map/data.rs | |
| parent | ec071d5bc677101c0168b5fb3065f2d928234ed9 (diff) | |
| download | graf_karto-b1179849c28e50c39ac3c94af9dda86ee24beca0.tar.gz graf_karto-b1179849c28e50c39ac3c94af9dda86ee24beca0.zip | |
Rename PolygonRoom to just Room
Diffstat (limited to 'src/map/data.rs')
| -rw-r--r-- | src/map/data.rs | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/map/data.rs b/src/map/data.rs index 3258512..20f193d 100644 --- a/src/map/data.rs +++ b/src/map/data.rs @@ -1,6 +1,6 @@ //! Module containing the raw map data version of the map. -use super::{IconData, Map, PolygonRoomData, WallData}; +use super::{IconData, Map, RoomData, WallData}; use ron::de::from_reader; use ron::ser::{to_string_pretty, PrettyConfig}; use serde::{Deserialize, Serialize}; @@ -13,20 +13,16 @@ use std::path::Path; /// it easily corruptable. #[derive(Serialize, Deserialize)] pub struct MapData { - pub(super) polygon_rooms: Vec<PolygonRoomData>, + pub(super) rooms: Vec<RoomData>, pub(super) walls: Vec<WallData>, pub(super) icons: Vec<IconData>, } impl MapData { /// Create a serialisable map data type from the data elements contained in a map. - pub fn new( - polygon_rooms: Vec<PolygonRoomData>, - walls: Vec<WallData>, - icons: Vec<IconData>, - ) -> Self { + pub fn new(rooms: Vec<RoomData>, walls: Vec<WallData>, icons: Vec<IconData>) -> Self { Self { - polygon_rooms, + rooms, walls, icons, } @@ -38,10 +34,10 @@ impl MapData { /// included. pub fn extract_data(map: &Map) -> Self { Self { - polygon_rooms: map - .polygon_rooms() + rooms: map + .rooms() .iter() - .map(|p| (p as &PolygonRoomData).clone()) + .map(|p| (p as &RoomData).clone()) .collect(), walls: map .walls() |
