Skip to content
This repository has been archived by the owner on Aug 14, 2023. It is now read-only.

Commit

Permalink
cluescroll: fix cluescroll plugin
Browse files Browse the repository at this point in the history
cluescroll: fix cluescroll plugin
  • Loading branch information
xKylee committed May 29, 2020
1 parent 3092454 commit 281c8e5
Show file tree
Hide file tree
Showing 16 changed files with 152 additions and 153 deletions.
2 changes: 1 addition & 1 deletion cluescroll/cluescroll.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

version = "0.0.24"
version = "0.0.25"

project.extra["PluginName"] = "Clue Scroll"
project.extra["PluginDescription"] = "Show answers to clue scroll riddles, anagrams, ciphers, and cryptic clues"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import java.awt.Dimension;
import java.awt.Graphics2D;
import javax.inject.Inject;
import javax.inject.Singleton;
import net.runelite.api.Client;
import net.runelite.api.widgets.Widget;
import net.runelite.api.widgets.WidgetInfo;
Expand All @@ -37,7 +36,6 @@
import net.runelite.client.ui.overlay.OverlayLayer;
import net.runelite.client.ui.overlay.OverlayPosition;

@Singleton
class ClueScrollEmoteOverlay extends Overlay
{
private final ClueScrollPlugin plugin;
Expand All @@ -46,7 +44,7 @@ class ClueScrollEmoteOverlay extends Overlay
private boolean hasScrolled;

@Inject
private ClueScrollEmoteOverlay(final ClueScrollPlugin plugin, final Client client)
private ClueScrollEmoteOverlay(ClueScrollPlugin plugin, Client client)
{
setPosition(OverlayPosition.DYNAMIC);
setLayer(OverlayLayer.ABOVE_WIDGETS);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import java.awt.Graphics2D;
import java.awt.Rectangle;
import javax.inject.Inject;
import javax.inject.Singleton;
import net.runelite.api.Client;
import net.runelite.api.widgets.Widget;
import net.runelite.api.widgets.WidgetInfo;
Expand All @@ -38,7 +37,6 @@
import net.runelite.client.ui.overlay.OverlayLayer;
import net.runelite.client.ui.overlay.OverlayPosition;

@Singleton
class ClueScrollMusicOverlay extends Overlay
{
private static final Rectangle PADDING = new Rectangle(2, 1, 0, 1);
Expand All @@ -49,7 +47,7 @@ class ClueScrollMusicOverlay extends Overlay
private boolean hasScrolled;

@Inject
private ClueScrollMusicOverlay(final ClueScrollPlugin plugin, final Client client)
private ClueScrollMusicOverlay(ClueScrollPlugin plugin, Client client)
{
setPosition(OverlayPosition.DYNAMIC);
setLayer(OverlayLayer.ABOVE_WIDGETS);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* Copyright (c) 2016-2017, Seth <[email protected]>
* Copyright (c) 2018, Lotto <https://github.com/devLotto>
* Copyright (c) 2019, David <https://github.com/drahenshaw>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -30,7 +31,6 @@
import java.awt.Dimension;
import java.awt.Graphics2D;
import javax.inject.Inject;
import javax.inject.Singleton;
import net.runelite.api.Client;
import net.runelite.api.Item;
import static net.runelite.api.ItemID.*;
Expand All @@ -47,7 +47,6 @@
import net.runelite.client.ui.overlay.OverlayPriority;
import net.runelite.client.ui.overlay.components.LineComponent;

@Singleton
public class ClueScrollOverlay extends OverlayPanel
{
private static final ItemRequirement HAS_SPADE = new SingleItemRequirement(SPADE);
Expand Down Expand Up @@ -81,7 +80,7 @@ public class ClueScrollOverlay extends OverlayPanel
private final Client client;

@Inject
private ClueScrollOverlay(final ClueScrollPlugin plugin, final Client client)
private ClueScrollOverlay(ClueScrollPlugin plugin, Client client)
{
super(plugin);
this.plugin = plugin;
Expand Down Expand Up @@ -117,8 +116,8 @@ public Dimension render(Graphics2D graphics)

if (clue.isRequiresLight()
&& ((clue.getHasFirePit() == null || client.getVar(clue.getHasFirePit()) != 1)
&& (inventoryItems == null || !HAS_LIGHT.fulfilledBy(inventoryItems))
&& (equippedItems == null || !HAS_LIGHT.fulfilledBy(equippedItems))))
&& (inventoryItems == null || !HAS_LIGHT.fulfilledBy(inventoryItems))
&& (equippedItems == null || !HAS_LIGHT.fulfilledBy(equippedItems))))
{
panelComponent.getChildren().add(LineComponent.builder().left("").build());
panelComponent.getChildren().add(LineComponent.builder().left("Requires Light Source!").leftColor(Color.RED).build());
Expand Down
Loading

0 comments on commit 281c8e5

Please sign in to comment.