From 9ab689527b3ede7750579b1a926cf0cf88813463 Mon Sep 17 00:00:00 2001 From: Arne Dußin Date: Wed, 3 Feb 2021 16:26:59 +0100 Subject: Add capability to draw rooms --- src/client/map/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/client/map/mod.rs') 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 { &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 { -- cgit v1.2.3-70-g09d2