Skip to content

Commit

Permalink
Add ready rooms
Browse files Browse the repository at this point in the history
  • Loading branch information
cgokmen committed Jan 9, 2025
1 parent dc330a7 commit 3970b43
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion bddl/knowledge_base/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,15 @@ class Scene(Model):

@cached_property
def room_count(self):
return len(self.rooms)
return len(self.future_rooms)

@cached_property
def ready_rooms(self):
return [room for room in self.rooms if room.ready]

@cached_property
def future_rooms(self):
return [room for room in self.rooms if not room.ready]

@cached_property
def object_count(self):
Expand Down

0 comments on commit 3970b43

Please sign in to comment.