kourendlibrary: fix layout resetting unintentionally
This commit is contained in:
@@ -130,16 +130,14 @@ class Library
|
|||||||
}
|
}
|
||||||
else if (state != SolvedState.NO_DATA)
|
else if (state != SolvedState.NO_DATA)
|
||||||
{
|
{
|
||||||
// We know all of the possible things in this shelf.
|
// Reset if the book we found isn't what we expected
|
||||||
if (book != null || bookcase.getPossibleBooks().stream().noneMatch(Book::isDarkManuscript))
|
// 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().contains(book)) ||
|
||||||
// Check to see if our guess is wrong
|
(book == null && !bookcase.getPossibleBooks().isEmpty() && bookcase.getPossibleBooks().stream().noneMatch(Book::isDarkManuscript)))
|
||||||
if (!bookcase.getPossibleBooks().contains(book))
|
|
||||||
{
|
{
|
||||||
reset();
|
reset();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Everything is known, nothing to do
|
// Everything is known, nothing to do
|
||||||
if (state == SolvedState.COMPLETE)
|
if (state == SolvedState.COMPLETE)
|
||||||
|
|||||||
Reference in New Issue
Block a user