kourendlibrary: Method is always inverted
This commit is contained in:
@@ -138,7 +138,7 @@ class KourendLibraryOverlay extends Overlay
|
||||
Color color = bookIsKnown ? Color.ORANGE : Color.WHITE;
|
||||
|
||||
// Render the poly on the floor
|
||||
if (!(bookIsKnown && book == null) && (library.getState() == SolvedState.NO_DATA || book != null || !possible.isEmpty()) && !shouldHideOverlayIfDuplicateBook(book))
|
||||
if (!(bookIsKnown && book == null) && (library.getState() == SolvedState.NO_DATA || book != null || !possible.isEmpty()) && shouldShowOverlayIfDuplicateBook(book))
|
||||
{
|
||||
Polygon poly = getCanvasTilePoly(client, localBookcase);
|
||||
if (poly != null)
|
||||
@@ -151,7 +151,7 @@ class KourendLibraryOverlay extends Overlay
|
||||
// If the book is singled out, render the text and the book's icon
|
||||
if (bookIsKnown)
|
||||
{
|
||||
if (book != null && !shouldHideOverlayIfDuplicateBook(book))
|
||||
if (book != null && shouldShowOverlayIfDuplicateBook(book))
|
||||
{
|
||||
FontMetrics fm = g.getFontMetrics();
|
||||
Rectangle2D bounds = fm.getStringBounds(book.getShortName(), g);
|
||||
@@ -239,11 +239,11 @@ class KourendLibraryOverlay extends Overlay
|
||||
return null;
|
||||
}
|
||||
|
||||
private boolean shouldHideOverlayIfDuplicateBook(@Nullable Book book)
|
||||
private boolean shouldShowOverlayIfDuplicateBook(@Nullable Book book)
|
||||
{
|
||||
return plugin.isHideDuplicateBook()
|
||||
&& book != null
|
||||
&& !book.isDarkManuscript()
|
||||
&& plugin.doesPlayerContainBook(book);
|
||||
return !plugin.isHideDuplicateBook()
|
||||
|| book == null
|
||||
|| book.isDarkManuscript()
|
||||
|| !plugin.doesPlayerContainBook(book);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user