Search in sources :

Example 1 with ObjectComposition

use of net.runelite.api.ObjectComposition in project runelite by runelite.

the class CrypticClue method makeOverlayHint.

@Override
public void makeOverlayHint(PanelComponent panelComponent, ClueScrollPlugin plugin) {
    panelComponent.setTitle("Cryptic Clue");
    panelComponent.setWidth(150);
    panelComponent.getLines().add(new PanelComponent.Line("Clue:"));
    panelComponent.getLines().add(new PanelComponent.Line(true, getText(), TITLED_CONTENT_COLOR));
    if (getNpc() != null) {
        panelComponent.getLines().add(new PanelComponent.Line("NPC:"));
        panelComponent.getLines().add(new PanelComponent.Line(getNpc(), TITLED_CONTENT_COLOR));
    }
    if (objectId != -1) {
        ObjectComposition object = plugin.getClient().getObjectDefinition(getObjectId());
        if (object != null) {
            panelComponent.getLines().add(new PanelComponent.Line("Object:"));
            panelComponent.getLines().add(new PanelComponent.Line(object.getName(), TITLED_CONTENT_COLOR));
        }
    }
    panelComponent.getLines().add(new PanelComponent.Line("Solution:"));
    panelComponent.getLines().add(new PanelComponent.Line(true, getSolution(), TITLED_CONTENT_COLOR));
}
Also used : PanelComponent(net.runelite.client.ui.overlay.components.PanelComponent) ObjectComposition(net.runelite.api.ObjectComposition)

Example 2 with ObjectComposition

use of net.runelite.api.ObjectComposition in project runelite by runelite.

the class BarrowsOverlay method renderWalls.

private void renderWalls(Graphics2D graphics, WallObject wall) {
    net.runelite.api.Point minimapLocation = wall.getMinimapLocation();
    if (minimapLocation == null) {
        return;
    }
    ObjectComposition objectComp = client.getObjectDefinition(wall.getId());
    ObjectComposition impostor = objectComp.getImpostorIds() != null ? objectComp.getImpostor() : null;
    if (impostor != null && impostor.getActions()[0] != null) {
        graphics.setColor(Color.green);
    } else {
        graphics.setColor(Color.gray);
    }
    graphics.fillRect(minimapLocation.getX(), minimapLocation.getY(), 3, 3);
}
Also used : ObjectComposition(net.runelite.api.ObjectComposition)

Example 3 with ObjectComposition

use of net.runelite.api.ObjectComposition in project runelite by runelite.

the class BarrowsOverlay method renderLadders.

private void renderLadders(Graphics2D graphics, GameObject ladder) {
    net.runelite.api.Point minimapLocation = ladder.getMinimapLocation();
    if (minimapLocation == null) {
        return;
    }
    ObjectComposition objectComp = client.getObjectDefinition(ladder.getId());
    if (objectComp.getImpostorIds() != null && objectComp.getImpostor() != null) {
        graphics.setColor(Color.orange);
        graphics.fillRect(minimapLocation.getX(), minimapLocation.getY(), 6, 6);
    }
}
Also used : ObjectComposition(net.runelite.api.ObjectComposition)

Example 4 with ObjectComposition

use of net.runelite.api.ObjectComposition in project runelite by runelite.

the class MapClue method makeOverlayHint.

@Override
public void makeOverlayHint(PanelComponent panelComponent, ClueScrollPlugin plugin) {
    panelComponent.setTitle("Map Clue");
    if (objectId != -1) {
        panelComponent.setWidth(150);
        ObjectComposition objectToClick = plugin.getClient().getObjectDefinition(getObjectId());
        String objectName = "N/A";
        if (objectToClick != null) {
            objectName = objectToClick.getName();
        }
        panelComponent.getLines().add(new PanelComponent.Line("Travel to the destination"));
        panelComponent.getLines().add(new PanelComponent.Line("and click the " + objectName + "."));
    } else {
        panelComponent.setWidth(160);
        panelComponent.getLines().add(new PanelComponent.Line("Travel to the destination"));
        panelComponent.getLines().add(new PanelComponent.Line("and dig on the marked tile."));
    }
}
Also used : PanelComponent(net.runelite.client.ui.overlay.components.PanelComponent) ObjectComposition(net.runelite.api.ObjectComposition)

Aggregations

ObjectComposition (net.runelite.api.ObjectComposition)4 PanelComponent (net.runelite.client.ui.overlay.components.PanelComponent)2