aboutsummaryrefslogtreecommitdiff
path: root/src/client/map/mod.rs
diff options
context:
space:
mode:
authorArne Dußin2021-02-03 16:26:59 +0100
committerArne Dußin2021-02-03 16:26:59 +0100
commit9ab689527b3ede7750579b1a926cf0cf88813463 (patch)
tree959894450512ebb10e86ed62058da1d7039614ef /src/client/map/mod.rs
parentd4c1c7ecb5688ef64f45425d9ac8e7ddeb8e8602 (diff)
downloadgraf_karto-9ab689527b3ede7750579b1a926cf0cf88813463.tar.gz
graf_karto-9ab689527b3ede7750579b1a926cf0cf88813463.zip
Add capability to draw rooms
Diffstat (limited to 'src/client/map/mod.rs')
-rw-r--r--src/client/map/mod.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/client/map/mod.rs b/src/client/map/mod.rs
index 27cafc4..9589e59 100644
--- a/src/client/map/mod.rs
+++ b/src/client/map/mod.rs
@@ -166,6 +166,10 @@ impl Map {
pub fn rooms(&self) -> &StableVec<RoomMark> {
&self.rooms
}
+ /// Get a room with the given id mutably, in case it exists.
+ pub fn get_room_mut(&mut self, id: usize) -> Option<&mut RoomMark> {
+ self.rooms.get_mut(id)
+ }
/// Get the walls of this map.
pub fn walls(&self) -> &StableVec<WallMark> {