Merge pull request #12621 from Nightfirecat/kourend-library-varlemore-envoy-fix

kourendlibrary: Don't reset state when not finding Varlamore Envoy
This commit is contained in:
Abex
2020-10-18 16:30:01 -06:00
committed by GitHub
2 changed files with 85 additions and 4 deletions

View File

@@ -122,8 +122,9 @@ class Library
if (bookcase.isBookSet())
{
// Bookcase is set from a previous mark
// Check for a mismatch, unless it is now null and had a dark manuscript
if (book != bookcase.getBook() && !(book == null && bookcase.getBook().isDarkManuscript()))
// Check for a mismatch, unless it is now null and had a dark manuscript or Varlamore Envoy
if (book != bookcase.getBook()
&& !(book == null && (bookcase.getBook().isDarkManuscript() || bookcase.getBook() == VARLAMORE_ENVOY)))
{
reset();
}
@@ -140,8 +141,11 @@ class Library
if (state == SolvedState.COMPLETE)
{
// Reset if we found nothing when we expected something that wasn't a Dark Manuscript, since the layout has changed
if (book == null && !bookcase.getPossibleBooks().isEmpty() && bookcase.getPossibleBooks().stream().noneMatch(Book::isDarkManuscript))
// Reset if we found nothing when we expected something that wasn't a Dark Manuscript or Varlamore Envoy
// since the layout has changed
if (book == null
&& !bookcase.getPossibleBooks().isEmpty()
&& bookcase.getPossibleBooks().stream().noneMatch(b -> b.isDarkManuscript() || b == VARLAMORE_ENVOY))
{
reset();
}