From ee3501fab84df3ceb20ee5ae2fce0a77c07238e8 Mon Sep 17 00:00:00 2001 From: Joshua Fehler Date: Fri, 11 Oct 2024 18:21:33 -0400 Subject: [PATCH] Fix: Add Book.current_page for screen compatibility --- encyclopaedia/book/book_ren.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/encyclopaedia/book/book_ren.py b/encyclopaedia/book/book_ren.py index b1df654..d426cba 100644 --- a/encyclopaedia/book/book_ren.py +++ b/encyclopaedia/book/book_ren.py @@ -147,6 +147,11 @@ def active(self) -> 'EncEntry': """Get the page that's currently being viewed.""" return self.pages[self._unlocked_page_index] + @property + def current_page(self) -> 'EncEntry': + """Alias for active. Used by screens.""" + return self.active + @property def percentage_unlocked(self) -> float: """Get the percentage of the Book that's unlocked.