* keys no longer disappear after they are used to unlock a door * and remove the comment as well
@@ -233,8 +233,6 @@ class Door(WorldObj):
if isinstance(env.carrying, Key) and env.carrying.color == self.color:
self.is_locked = False
self.is_open = True
- # The key has been used, remove it from the agent
- env.carrying = None
return True
return False