Merge pull request #5767 from raiyni/map-spade
Require spade on map dig clues
This commit is contained in:
@@ -44,6 +44,8 @@ import static net.runelite.client.plugins.cluescrolls.ClueScrollWorldOverlay.CLI
|
||||
import static net.runelite.client.plugins.cluescrolls.ClueScrollWorldOverlay.CLICKBOX_FILL_COLOR;
|
||||
import static net.runelite.client.plugins.cluescrolls.ClueScrollWorldOverlay.CLICKBOX_HOVER_BORDER_COLOR;
|
||||
import static net.runelite.client.plugins.cluescrolls.ClueScrollWorldOverlay.IMAGE_Z_OFFSET;
|
||||
import net.runelite.client.plugins.cluescrolls.clues.emote.ItemRequirement;
|
||||
import net.runelite.client.plugins.cluescrolls.clues.emote.SingleItemRequirement;
|
||||
import net.runelite.client.ui.overlay.OverlayUtil;
|
||||
import net.runelite.client.ui.overlay.components.LineComponent;
|
||||
import net.runelite.client.ui.overlay.components.PanelComponent;
|
||||
@@ -87,6 +89,8 @@ public class MapClue extends ClueScroll implements ObjectClueScroll
|
||||
new MapClue(CLUE_SCROLL_ELITE_19786, new WorldPoint(2703, 2716, 0), CRATE_6616)
|
||||
);
|
||||
|
||||
private static final ItemRequirement HAS_SPADE = new SingleItemRequirement(SPADE);
|
||||
|
||||
private final int itemId;
|
||||
private final WorldPoint location;
|
||||
private final int objectId;
|
||||
@@ -121,8 +125,8 @@ public class MapClue extends ClueScroll implements ObjectClueScroll
|
||||
panelComponent.getChildren().add(TitleComponent.builder().text("Map Clue").build());
|
||||
|
||||
panelComponent.getChildren().add(LineComponent.builder()
|
||||
.left("Click the clue scroll along the edge of your world map to see your destination.")
|
||||
.build());
|
||||
.left("Click the clue scroll along the edge of your world map to see your destination.")
|
||||
.build());
|
||||
|
||||
if (objectId != -1)
|
||||
{
|
||||
@@ -153,6 +157,15 @@ public class MapClue extends ClueScroll implements ObjectClueScroll
|
||||
.left(description)
|
||||
.build());
|
||||
}
|
||||
|
||||
if (objectId == -1 && plugin.getInventoryItems() != null)
|
||||
{
|
||||
if (!HAS_SPADE.fulfilledBy(plugin.getInventoryItems()))
|
||||
{
|
||||
panelComponent.getChildren().add(LineComponent.builder().left("").build());
|
||||
panelComponent.getChildren().add(LineComponent.builder().left("Requires Spade!").leftColor(Color.RED).build());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user