poh plugin: change gameobject map to tile object
This commit is contained in:
@@ -29,9 +29,9 @@ import java.awt.Dimension;
|
|||||||
import java.awt.Graphics2D;
|
import java.awt.Graphics2D;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
import net.runelite.api.GameObject;
|
|
||||||
import net.runelite.api.Perspective;
|
import net.runelite.api.Perspective;
|
||||||
import net.runelite.api.Point;
|
import net.runelite.api.Point;
|
||||||
|
import net.runelite.api.TileObject;
|
||||||
import static net.runelite.client.plugins.poh.PohPlugin.BURNER_LIT;
|
import static net.runelite.client.plugins.poh.PohPlugin.BURNER_LIT;
|
||||||
import static net.runelite.client.plugins.poh.PohPlugin.BURNER_UNLIT;
|
import static net.runelite.client.plugins.poh.PohPlugin.BURNER_UNLIT;
|
||||||
import net.runelite.client.ui.overlay.Overlay;
|
import net.runelite.client.ui.overlay.Overlay;
|
||||||
@@ -82,9 +82,9 @@ public class BurnerOverlay extends Overlay
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void drawBurner(Graphics2D graphics, String text, GameObject gameObject, Color color, java.awt.Point parent)
|
private void drawBurner(Graphics2D graphics, String text, TileObject tileObject, Color color, java.awt.Point parent)
|
||||||
{
|
{
|
||||||
Point canvasText = Perspective.getCanvasTextLocation(client, graphics, gameObject.getLocalLocation(), text, 200);
|
Point canvasText = Perspective.getCanvasTextLocation(client, graphics, tileObject.getLocalLocation(), text, 200);
|
||||||
|
|
||||||
if (canvasText == null)
|
if (canvasText == null)
|
||||||
{
|
{
|
||||||
@@ -97,6 +97,6 @@ public class BurnerOverlay extends Overlay
|
|||||||
textComponent.render(graphics, parent);
|
textComponent.render(graphics, parent);
|
||||||
|
|
||||||
//render tile
|
//render tile
|
||||||
OverlayUtil.renderPolygon(graphics, gameObject.getCanvasTilePoly(), color);
|
OverlayUtil.renderPolygon(graphics, tileObject.getCanvasTilePoly(), color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ import static net.runelite.api.ObjectID.INCENSE_BURNER_13211;
|
|||||||
import static net.runelite.api.ObjectID.INCENSE_BURNER_13212;
|
import static net.runelite.api.ObjectID.INCENSE_BURNER_13212;
|
||||||
import static net.runelite.api.ObjectID.INCENSE_BURNER_13213;
|
import static net.runelite.api.ObjectID.INCENSE_BURNER_13213;
|
||||||
import net.runelite.api.Tile;
|
import net.runelite.api.Tile;
|
||||||
|
import net.runelite.api.TileObject;
|
||||||
import net.runelite.api.events.ConfigChanged;
|
import net.runelite.api.events.ConfigChanged;
|
||||||
import net.runelite.api.events.GameObjectDespawned;
|
import net.runelite.api.events.GameObjectDespawned;
|
||||||
import net.runelite.api.events.GameObjectSpawned;
|
import net.runelite.api.events.GameObjectSpawned;
|
||||||
@@ -62,7 +63,7 @@ public class PohPlugin extends Plugin
|
|||||||
static final Set<Integer> BURNER_LIT = Sets.newHashSet(INCENSE_BURNER_13209, INCENSE_BURNER_13211, INCENSE_BURNER_13213);
|
static final Set<Integer> BURNER_LIT = Sets.newHashSet(INCENSE_BURNER_13209, INCENSE_BURNER_13211, INCENSE_BURNER_13213);
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private final Map<GameObject, Tile> pohObjects = new HashMap<>();
|
private final Map<TileObject, Tile> pohObjects = new HashMap<>();
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private PohOverlay overlay;
|
private PohOverlay overlay;
|
||||||
|
|||||||
Reference in New Issue
Block a user