Merge branch 'master' of runelite
This commit is contained in:
@@ -108,6 +108,10 @@ public enum AgilityShortcut
|
||||
AL_KHARID_MINING_PITCLIFF_SCRAMBLE(38, "Rocks", new WorldPoint(3305, 3315, 0), ROCKS_16549, ROCKS_16550),
|
||||
YANILLE_WALL_GRAPPLE(39, "Grapple Wall", new WorldPoint(2552, 3072, 0), WALL_17047),
|
||||
NEITIZNOT_BRIDGE_REPAIR(40, "Bridge Repair - Quest", new WorldPoint(2315, 3828, 0), ROPE_BRIDGE_21306, ROPE_BRIDGE_21307),
|
||||
NEITIZNOT_BRIDGE_SOUTHEAST(40, "Rope Bridge", null, ROPE_BRIDGE_21308, ROPE_BRIDGE_21309),
|
||||
NEITIZNOT_BRIDGE_NORTHWEST(40, "Rope Bridge", null, ROPE_BRIDGE_21310, ROPE_BRIDGE_21311),
|
||||
NEITIZNOT_BRIDGE_NORTH(40, "Rope Bridge", null, ROPE_BRIDGE_21312, ROPE_BRIDGE_21313),
|
||||
NEITIZNOT_BRIDGE_NORTHEAST(40, "Broken Rope bridge", null, ROPE_BRIDGE_21314, ROPE_BRIDGE_21315),
|
||||
KOUREND_LAKE_JUMP_EAST(40, "Stepping Stones", new WorldPoint(1612, 3570, 0), STEPPING_STONE_29729, STEPPING_STONE_29730),
|
||||
KOUREND_LAKE_JUMP_WEST(40, "Stepping Stones", new WorldPoint(1604, 3572, 0), STEPPING_STONE_29729, STEPPING_STONE_29730),
|
||||
YANILLE_DUNGEON_BALANCE(40, "Balancing Ledge", null, BALANCING_LEDGE_23548),
|
||||
|
||||
@@ -30,15 +30,13 @@ import net.runelite.client.plugins.Plugin;
|
||||
import net.runelite.client.ui.overlay.infobox.Counter;
|
||||
import net.runelite.client.util.StackFormatter;
|
||||
|
||||
public class AmmoCounter extends Counter
|
||||
class AmmoCounter extends Counter
|
||||
{
|
||||
@Getter
|
||||
private int itemID;
|
||||
private final int itemID;
|
||||
private final String name;
|
||||
|
||||
@Getter
|
||||
private String name;
|
||||
|
||||
public AmmoCounter(Plugin plugin, int itemID, int count, String name, BufferedImage image)
|
||||
AmmoCounter(Plugin plugin, int itemID, int count, String name, BufferedImage image)
|
||||
{
|
||||
super(image, plugin, count);
|
||||
this.itemID = itemID;
|
||||
|
||||
@@ -43,8 +43,7 @@ import net.runelite.client.ui.overlay.infobox.InfoBoxManager;
|
||||
@PluginDescriptor(
|
||||
name = "Ammo",
|
||||
description = "Shows the current ammo the player has equipped",
|
||||
tags = {"bolts", "darts", "chinchompa"},
|
||||
type = "utility"
|
||||
tags = {"bolts", "darts", "chinchompa", "equipment"}
|
||||
)
|
||||
public class AmmoPlugin extends Plugin
|
||||
{
|
||||
@@ -63,20 +62,21 @@ public class AmmoPlugin extends Plugin
|
||||
private AmmoCounter counterBox;
|
||||
|
||||
@Override
|
||||
public void startUp() throws Exception
|
||||
protected void startUp() throws Exception
|
||||
{
|
||||
clientThread.invokeLater(() ->
|
||||
{
|
||||
ItemContainer container = client.getItemContainer(InventoryID.EQUIPMENT);
|
||||
final ItemContainer container = client.getItemContainer(InventoryID.EQUIPMENT);
|
||||
|
||||
if (container != null)
|
||||
{
|
||||
parseInventory(container.getItems());
|
||||
checkInventory(container.getItems());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void shutDown() throws Exception
|
||||
protected void shutDown() throws Exception
|
||||
{
|
||||
infoBoxManager.removeInfoBox(counterBox);
|
||||
counterBox = null;
|
||||
@@ -90,10 +90,10 @@ public class AmmoPlugin extends Plugin
|
||||
return;
|
||||
}
|
||||
|
||||
parseInventory(event.getItemContainer().getItems());
|
||||
checkInventory(event.getItemContainer().getItems());
|
||||
}
|
||||
|
||||
private void parseInventory(Item[] items)
|
||||
private void checkInventory(final Item[] items)
|
||||
{
|
||||
// Check for weapon slot items. This overrides the ammo slot,
|
||||
// as the player will use the thrown weapon (eg. chinchompas, knives, darts)
|
||||
@@ -126,7 +126,7 @@ public class AmmoPlugin extends Plugin
|
||||
updateInfobox(ammo, comp);
|
||||
}
|
||||
|
||||
private void updateInfobox(Item item, ItemComposition comp)
|
||||
private void updateInfobox(final Item item, final ItemComposition comp)
|
||||
{
|
||||
if (counterBox != null && counterBox.getItemID() == item.getId())
|
||||
{
|
||||
|
||||
@@ -41,7 +41,7 @@ enum QuestStartLocation
|
||||
IMP_CATCHER("Imp Catcher", new WorldPoint(3108, 3160, 0)),
|
||||
THE_KNIGHTS_SWORD("The Knight's Sword", new WorldPoint(2976, 3342, 0)),
|
||||
MISTHALIN_MYSTERY("Misthalin Mystery", new WorldPoint(3234, 3155, 0)),
|
||||
PIRATES_TREASURE("Pirate's Treasure", new WorldPoint(3050, 3248, 0)),
|
||||
PIRATES_TREASURE("Pirate's Treasure", new WorldPoint(3051, 3252, 0)),
|
||||
PRINCE_ALI_RESCUE("Prince Ali Rescue", new WorldPoint(3301, 3163, 0)),
|
||||
THE_RESTLESS_GHOST("The Restless Ghost", new WorldPoint(3240, 3210, 0)),
|
||||
RUNE_MYSTERIES("Rune Mysteries", new WorldPoint(3210, 3220, 0)),
|
||||
|
||||
Reference in New Issue
Block a user