Merge remote-tracking branch 'runelite/master'
This commit is contained in:
@@ -109,7 +109,7 @@ public class KaramjaDiaryRequirement extends GenericDiaryRequirement
|
||||
new SkillRequirement(Skill.THIEVING, 50),
|
||||
new SkillRequirement(Skill.MINING, 52),
|
||||
new QuestRequirement(Quest.LEGENDS_QUEST));
|
||||
add("Use the crossbow short cut south of the volcano.",
|
||||
add("Use the crossbow shortcut south of the volcano.",
|
||||
new SkillRequirement(Skill.AGILITY, 53),
|
||||
new SkillRequirement(Skill.RANGED, 42),
|
||||
new SkillRequirement(Skill.STRENGTH, 21));
|
||||
|
||||
@@ -39,11 +39,10 @@ import net.runelite.client.ui.overlay.OverlayPosition;
|
||||
import net.runelite.client.ui.overlay.OverlayPriority;
|
||||
import net.runelite.client.ui.overlay.OverlayUtil;
|
||||
import net.runelite.client.ui.overlay.components.TextComponent;
|
||||
import static net.runelite.client.plugins.cannon.CannonPlugin.MAX_OVERLAY_DISTANCE;
|
||||
|
||||
class CannonOverlay extends Overlay
|
||||
{
|
||||
private static final int MAX_DISTANCE = 2500;
|
||||
|
||||
private final Client client;
|
||||
private final CannonConfig config;
|
||||
private final CannonPlugin plugin;
|
||||
@@ -76,7 +75,7 @@ class CannonOverlay extends Overlay
|
||||
|
||||
LocalPoint localLocation = client.getLocalPlayer().getLocalLocation();
|
||||
|
||||
if (localLocation.distanceTo(cannonPoint) <= MAX_DISTANCE)
|
||||
if (localLocation.distanceTo(cannonPoint) <= MAX_OVERLAY_DISTANCE)
|
||||
{
|
||||
Point cannonLoc = Perspective.getCanvasTextLocation(client,
|
||||
graphics,
|
||||
|
||||
@@ -41,17 +41,21 @@ import net.runelite.api.InventoryID;
|
||||
import net.runelite.api.Item;
|
||||
import net.runelite.api.ItemContainer;
|
||||
import net.runelite.api.ItemID;
|
||||
import net.runelite.api.MenuAction;
|
||||
import net.runelite.api.ObjectID;
|
||||
import static net.runelite.api.ObjectID.CANNON_BASE;
|
||||
import net.runelite.api.Player;
|
||||
import net.runelite.api.Projectile;
|
||||
import static net.runelite.api.ProjectileID.CANNONBALL;
|
||||
import static net.runelite.api.ProjectileID.GRANITE_CANNONBALL;
|
||||
import net.runelite.api.coords.LocalPoint;
|
||||
import net.runelite.api.coords.WorldPoint;
|
||||
import net.runelite.api.events.ChatMessage;
|
||||
import net.runelite.api.events.GameObjectSpawned;
|
||||
import net.runelite.api.events.GameStateChanged;
|
||||
import net.runelite.api.events.GameTick;
|
||||
import net.runelite.api.events.ItemContainerChanged;
|
||||
import net.runelite.api.events.MenuOptionClicked;
|
||||
import net.runelite.api.events.ProjectileMoved;
|
||||
import net.runelite.client.Notifier;
|
||||
import net.runelite.client.callback.ClientThread;
|
||||
@@ -72,11 +76,14 @@ import net.runelite.client.ui.overlay.infobox.InfoBoxManager;
|
||||
public class CannonPlugin extends Plugin
|
||||
{
|
||||
private static final Pattern NUMBER_PATTERN = Pattern.compile("([0-9]+)");
|
||||
static final int MAX_OVERLAY_DISTANCE = 4100;
|
||||
static final int MAX_CBALLS = 30;
|
||||
|
||||
private CannonCounter counter;
|
||||
private boolean skipProjectileCheckThisTick;
|
||||
private boolean cannonBallNotificationSent;
|
||||
private WorldPoint clickedCannonLocation;
|
||||
private boolean firstCannonLoad;
|
||||
|
||||
@Getter
|
||||
private int cballsLeft;
|
||||
@@ -257,6 +264,39 @@ public class CannonPlugin extends Plugin
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onMenuOptionClicked(MenuOptionClicked event)
|
||||
{
|
||||
if (cannonPosition != null || event.getId() != ObjectID.DWARF_MULTICANNON)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if cannonballs are being used on the cannon
|
||||
if (event.getMenuAction() == MenuAction.ITEM_USE_ON_GAME_OBJECT)
|
||||
{
|
||||
final int idx = event.getSelectedItemIndex();
|
||||
final ItemContainer items = client.getItemContainer(InventoryID.INVENTORY);
|
||||
if (items == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
final Item item = items.getItem(idx);
|
||||
if (item == null || (item.getId() != ItemID.CANNONBALL && item.getId() != ItemID.GRANITE_CANNONBALL))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
// Check for the Fire option being selected on the cannon.
|
||||
else if (event.getMenuAction() != MenuAction.GAME_OBJECT_FIRST_OPTION)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Store the click location as a WorldPoint to avoid issues with scene loads
|
||||
clickedCannonLocation = WorldPoint.fromScene(client, event.getParam0(), event.getParam1(), client.getPlane());
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onProjectileMoved(ProjectileMoved event)
|
||||
@@ -302,6 +342,7 @@ public class CannonPlugin extends Plugin
|
||||
cannonPlaced = true;
|
||||
addCounter();
|
||||
cballsLeft = 0;
|
||||
firstCannonLoad = true;
|
||||
|
||||
final ItemContainer inventory = client.getItemContainer(InventoryID.INVENTORY);
|
||||
if (inventory != null)
|
||||
@@ -320,18 +361,45 @@ public class CannonPlugin extends Plugin
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (event.getMessage().contains("You pick up the cannon")
|
||||
else if (event.getMessage().contains("You pick up the cannon")
|
||||
|| event.getMessage().contains("Your cannon has decayed. Speak to Nulodion to get a new one!")
|
||||
|| event.getMessage().contains("Your cannon has been destroyed!"))
|
||||
{
|
||||
cannonPlaced = false;
|
||||
cballsLeft = 0;
|
||||
removeCounter();
|
||||
cannonPosition = null;
|
||||
}
|
||||
|
||||
if (event.getMessage().startsWith("You load the cannon with"))
|
||||
else if (event.getMessage().startsWith("You load the cannon with"))
|
||||
{
|
||||
// Set the cannon's position and object if the player's animation was interrupted during setup
|
||||
if (cannonPosition == null && clickedCannonLocation != null)
|
||||
{
|
||||
// There is a window of 1 tick where the player can add the furnace, click on another cannon, and then
|
||||
// the initial cannon load message arrives. This can cause the client to confuse the other cannon with
|
||||
// the player's, so ignore that first message when deciding the cannon's location.
|
||||
if (firstCannonLoad)
|
||||
{
|
||||
firstCannonLoad = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
LocalPoint lp = LocalPoint.fromWorld(client, clickedCannonLocation);
|
||||
if (lp != null)
|
||||
{
|
||||
GameObject[] objects = client.getScene().getTiles()[client.getPlane()][lp.getSceneX()][lp.getSceneY()].getGameObjects();
|
||||
if (objects.length > 0 && client.getLocalPlayer().getWorldLocation().distanceTo(objects[0].getWorldLocation()) <= 2)
|
||||
{
|
||||
cannonPlaced = true;
|
||||
cannonWorld = client.getWorld();
|
||||
cannon = objects[0];
|
||||
cannonPosition = cannon.getWorldLocation();
|
||||
}
|
||||
}
|
||||
}
|
||||
clickedCannonLocation = null;
|
||||
}
|
||||
|
||||
Matcher m = NUMBER_PATTERN.matcher(event.getMessage());
|
||||
if (m.find())
|
||||
{
|
||||
@@ -368,8 +436,7 @@ public class CannonPlugin extends Plugin
|
||||
|
||||
cannonBallNotificationSent = false;
|
||||
}
|
||||
|
||||
if (event.getMessage().contains("Your cannon is out of ammo!"))
|
||||
else if (event.getMessage().contains("Your cannon is out of ammo!"))
|
||||
{
|
||||
skipProjectileCheckThisTick = true;
|
||||
|
||||
@@ -383,8 +450,7 @@ public class CannonPlugin extends Plugin
|
||||
notifier.notify("Your cannon is out of ammo!");
|
||||
}
|
||||
}
|
||||
|
||||
if (event.getMessage().startsWith("Your cannon contains"))
|
||||
else if (event.getMessage().startsWith("Your cannon contains"))
|
||||
{
|
||||
Matcher m = NUMBER_PATTERN.matcher(event.getMessage());
|
||||
if (m.find())
|
||||
@@ -392,14 +458,17 @@ public class CannonPlugin extends Plugin
|
||||
cballsLeft = Integer.parseInt(m.group());
|
||||
}
|
||||
}
|
||||
|
||||
if (event.getMessage().startsWith("You unload your cannon and receive Cannonball")
|
||||
else if (event.getMessage().startsWith("You unload your cannon and receive Cannonball")
|
||||
|| event.getMessage().startsWith("You unload your cannon and receive Granite cannonball"))
|
||||
{
|
||||
skipProjectileCheckThisTick = true;
|
||||
|
||||
cballsLeft = 0;
|
||||
}
|
||||
else if (event.getMessage().equals("This isn't your cannon!") || event.getMessage().equals("This is not your cannon."))
|
||||
{
|
||||
clickedCannonLocation = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
|
||||
@@ -43,11 +43,10 @@ import net.runelite.client.game.ItemManager;
|
||||
import net.runelite.client.ui.overlay.Overlay;
|
||||
import net.runelite.client.ui.overlay.OverlayPosition;
|
||||
import net.runelite.client.ui.overlay.OverlayUtil;
|
||||
import static net.runelite.client.plugins.cannon.CannonPlugin.MAX_OVERLAY_DISTANCE;
|
||||
|
||||
class CannonSpotOverlay extends Overlay
|
||||
{
|
||||
private static final int MAX_DISTANCE = 2350;
|
||||
|
||||
private final Client client;
|
||||
private final CannonPlugin plugin;
|
||||
private final CannonConfig config;
|
||||
@@ -87,7 +86,7 @@ class CannonSpotOverlay extends Overlay
|
||||
LocalPoint spotPoint = LocalPoint.fromWorld(client, spot);
|
||||
LocalPoint localLocation = client.getLocalPlayer().getLocalLocation();
|
||||
|
||||
if (spotPoint != null && localLocation.distanceTo(spotPoint) <= MAX_DISTANCE)
|
||||
if (spotPoint != null && localLocation.distanceTo(spotPoint) <= MAX_OVERLAY_DISTANCE)
|
||||
{
|
||||
renderCannonSpot(graphics, client, spotPoint, itemManager.getImage(CANNONBALL), Color.RED);
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ enum CannonSpots
|
||||
BLUE_DRAGON(new WorldPoint(1933, 8973, 1)),
|
||||
BRINE_RAT(new WorldPoint(2707, 10132, 0)),
|
||||
CAVE_HORROR(new WorldPoint(3785, 9460, 0)),
|
||||
DAGGANOTH(new WorldPoint(2524, 10020, 0)),
|
||||
DAGGANOTH(new WorldPoint(2524, 10020, 0), new WorldPoint(2478, 10443, 0), new WorldPoint(2420, 10425, 0)),
|
||||
DARK_BEAST(new WorldPoint(1992, 4655, 0)),
|
||||
DARK_WARRIOR(new WorldPoint(3030, 3632, 0)),
|
||||
DUST_DEVIL(new WorldPoint(3218, 9366, 0)),
|
||||
|
||||
@@ -74,13 +74,13 @@ class PluginToggleButton extends JToggleButton
|
||||
{
|
||||
if (conflicts != null && !conflicts.isEmpty())
|
||||
{
|
||||
StringBuilder sb = new StringBuilder("<br>Conflicts with ");
|
||||
StringBuilder sb = new StringBuilder("<br>Plugin conflicts: ");
|
||||
for (int i = 0; i < conflicts.size() - 2; i++)
|
||||
{
|
||||
sb.append(conflicts.get(i));
|
||||
sb.append(", ");
|
||||
}
|
||||
if (conflicts.size() > 2)
|
||||
if (conflicts.size() >= 2)
|
||||
{
|
||||
sb.append(conflicts.get(conflicts.size() - 2));
|
||||
sb.append(" and ");
|
||||
|
||||
@@ -254,7 +254,8 @@ public class ExaminePlugin extends Plugin
|
||||
|| WidgetID.SEED_VAULT_INVENTORY_GROUP_ID == widgetGroup
|
||||
|| WidgetID.SEED_BOX_GROUP_ID == widgetGroup
|
||||
|| WidgetID.PLAYER_TRADE_SCREEN_GROUP_ID == widgetGroup
|
||||
|| WidgetID.PLAYER_TRADE_INVENTORY_GROUP_ID == widgetGroup)
|
||||
|| WidgetID.PLAYER_TRADE_INVENTORY_GROUP_ID == widgetGroup
|
||||
|| WidgetID.POH_TREASURE_CHEST_INVENTORY_GROUP_ID == widgetGroup)
|
||||
{
|
||||
Widget widgetItem = widget.getChild(actionParam);
|
||||
if (widgetItem != null)
|
||||
|
||||
@@ -98,4 +98,14 @@ public interface GroundMarkerConfig extends Config
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "fillOpacity",
|
||||
name = "Fill Opacity",
|
||||
description = "Opacity of the tile fill color"
|
||||
)
|
||||
default int fillOpacity()
|
||||
{
|
||||
return 50;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ public class GroundMarkerOverlay extends Overlay
|
||||
Polygon poly = Perspective.getCanvasTilePoly(client, lp);
|
||||
if (poly != null)
|
||||
{
|
||||
OverlayUtil.renderPolygon(graphics, poly, color, borderStroke);
|
||||
OverlayUtil.renderPolygon(graphics, poly, color, new Color(0, 0, 0, config.fillOpacity()), borderStroke);
|
||||
}
|
||||
|
||||
if (!Strings.isNullOrEmpty(label))
|
||||
|
||||
@@ -292,6 +292,7 @@ public class IdleNotifierPlugin extends Plugin
|
||||
case PISCARILIUS_CRANE_REPAIR:
|
||||
case HOME_MAKE_TABLET:
|
||||
case SAND_COLLECTION:
|
||||
case LOOKING_INTO:
|
||||
resetTimers();
|
||||
lastAnimation = animation;
|
||||
lastAnimating = Instant.now();
|
||||
|
||||
@@ -34,23 +34,103 @@ import net.runelite.client.game.SpriteOverride;
|
||||
@RequiredArgsConstructor
|
||||
enum HealthbarOverride implements SpriteOverride
|
||||
{
|
||||
BACK_30PX(HEALTHBAR_DEFAULT_BACK_30PX, "back_30px.png"),
|
||||
BACK_50PX(HEALTHBAR_DEFAULT_BACK_50PX, "back_30px.png"),
|
||||
BACK_60PX(HEALTHBAR_DEFAULT_BACK_60PX, "back_30px.png"),
|
||||
BACK_80PX(HEALTHBAR_DEFAULT_BACK_80PX, "back_90px.png"),
|
||||
BACK_100PX(HEALTHBAR_DEFAULT_BACK_100PX, "back_90px.png"),
|
||||
BACK_120PX(HEALTHBAR_DEFAULT_BACK_120PX, "back_90px.png"),
|
||||
BACK_140PX(HEALTHBAR_DEFAULT_BACK_140PX, "back_90px.png"),
|
||||
BACK_160PX(HEALTHBAR_DEFAULT_BACK_160PX, "back_90px.png"),
|
||||
// Reusing the 40px image for the 30px bars is intentional,
|
||||
// as a 30px HD bar is way too small and looks very wrong
|
||||
DEFAULT_FRONT_30PX(HEALTHBAR_DEFAULT_FRONT_30PX, "default_front_40px.png"),
|
||||
DEFAULT_FRONT_40PX(HEALTHBAR_DEFAULT_FRONT_40PX, "default_front_40px.png"),
|
||||
DEFAULT_FRONT_50PX(HEALTHBAR_DEFAULT_FRONT_50PX, "default_front_50px.png"),
|
||||
DEFAULT_FRONT_60PX(HEALTHBAR_DEFAULT_FRONT_60PX, "default_front_60px.png"),
|
||||
DEFAULT_FRONT_70PX(HEALTHBAR_DEFAULT_FRONT_70PX, "default_front_70px.png"),
|
||||
DEFAULT_FRONT_80PX(HEALTHBAR_DEFAULT_FRONT_80PX, "default_front_80px.png"),
|
||||
DEFAULT_FRONT_100PX(HEALTHBAR_DEFAULT_FRONT_100PX, "default_front_100px.png"),
|
||||
DEFAULT_FRONT_120PX(HEALTHBAR_DEFAULT_FRONT_120PX, "default_front_120px.png"),
|
||||
DEFAULT_FRONT_140PX(HEALTHBAR_DEFAULT_FRONT_140PX, "default_front_140px.png"),
|
||||
DEFAULT_FRONT_160PX(HEALTHBAR_DEFAULT_FRONT_160PX, "default_front_160px.png"),
|
||||
|
||||
FRONT_30PX(HEALTHBAR_DEFAULT_FRONT_30PX, "front_30px.png"),
|
||||
FRONT_50PX(HEALTHBAR_DEFAULT_FRONT_50PX, "front_30px.png"),
|
||||
FRONT_60PX(HEALTHBAR_DEFAULT_FRONT_60PX, "front_30px.png"),
|
||||
FRONT_80PX(HEALTHBAR_DEFAULT_FRONT_80PX, "front_90px.png"),
|
||||
FRONT_100PX(HEALTHBAR_DEFAULT_FRONT_100PX, "front_90px.png"),
|
||||
FRONT_120PX(HEALTHBAR_DEFAULT_FRONT_120PX, "front_90px.png"),
|
||||
FRONT_140PX(HEALTHBAR_DEFAULT_FRONT_140PX, "front_90px.png"),
|
||||
FRONT_160PX(HEALTHBAR_DEFAULT_FRONT_160PX, "front_90px.png");
|
||||
DEFAULT_BACK_30PX(HEALTHBAR_DEFAULT_BACK_30PX, "default_back_40px.png"),
|
||||
DEFAULT_BACK_40PX(HEALTHBAR_DEFAULT_BACK_40PX, "default_back_40px.png"),
|
||||
DEFAULT_BACK_50PX(HEALTHBAR_DEFAULT_BACK_50PX, "default_back_50px.png"),
|
||||
DEFAULT_BACK_60PX(HEALTHBAR_DEFAULT_BACK_60PX, "default_back_60px.png"),
|
||||
DEFAULT_BACK_70PX(HEALTHBAR_DEFAULT_BACK_70PX, "default_back_70px.png"),
|
||||
DEFAULT_BACK_80PX(HEALTHBAR_DEFAULT_BACK_80PX, "default_back_80px.png"),
|
||||
DEFAULT_BACK_100PX(HEALTHBAR_DEFAULT_BACK_100PX, "default_back_100px.png"),
|
||||
DEFAULT_BACK_120PX(HEALTHBAR_DEFAULT_BACK_120PX, "default_back_120px.png"),
|
||||
DEFAULT_BACK_140PX(HEALTHBAR_DEFAULT_BACK_140PX, "default_back_140px.png"),
|
||||
DEFAULT_BACK_160PX(HEALTHBAR_DEFAULT_BACK_160PX, "default_back_160px.png"),
|
||||
|
||||
CYAN_FRONT_30PX(HEALTHBAR_CYAN_FRONT_30PX, "cyan_front_40px.png"),
|
||||
CYAN_FRONT_40PX(HEALTHBAR_CYAN_FRONT_40PX, "cyan_front_40px.png"),
|
||||
CYAN_FRONT_50PX(HEALTHBAR_CYAN_FRONT_50PX, "cyan_front_50px.png"),
|
||||
CYAN_FRONT_60PX(HEALTHBAR_CYAN_FRONT_60PX, "cyan_front_60px.png"),
|
||||
CYAN_FRONT_70PX(HEALTHBAR_CYAN_FRONT_70PX, "cyan_front_70px.png"),
|
||||
CYAN_FRONT_80PX(HEALTHBAR_CYAN_FRONT_80PX, "cyan_front_80px.png"),
|
||||
CYAN_FRONT_100PX(HEALTHBAR_CYAN_FRONT_100PX, "cyan_front_100px.png"),
|
||||
CYAN_FRONT_120PX(HEALTHBAR_CYAN_FRONT_120PX, "cyan_front_120px.png"),
|
||||
CYAN_FRONT_140PX(HEALTHBAR_CYAN_FRONT_140PX, "cyan_front_140px.png"),
|
||||
CYAN_FRONT_160PX(HEALTHBAR_CYAN_FRONT_160PX, "cyan_front_160px.png"),
|
||||
|
||||
CYAN_BACK_30PX(HEALTHBAR_CYAN_BACK_30PX, "cyan_back_40px.png"),
|
||||
CYAN_BACK_40PX(HEALTHBAR_CYAN_BACK_40PX, "cyan_back_40px.png"),
|
||||
CYAN_BACK_50PX(HEALTHBAR_CYAN_BACK_50PX, "cyan_back_50px.png"),
|
||||
CYAN_BACK_60PX(HEALTHBAR_CYAN_BACK_60PX, "cyan_back_60px.png"),
|
||||
CYAN_BACK_70PX(HEALTHBAR_CYAN_BACK_70PX, "cyan_back_70px.png"),
|
||||
CYAN_BACK_80PX(HEALTHBAR_CYAN_BACK_80PX, "cyan_back_80px.png"),
|
||||
CYAN_BACK_100PX(HEALTHBAR_CYAN_BACK_100PX, "cyan_back_100px.png"),
|
||||
CYAN_BACK_120PX(HEALTHBAR_CYAN_BACK_120PX, "cyan_back_120px.png"),
|
||||
CYAN_BACK_140PX(HEALTHBAR_CYAN_BACK_140PX, "cyan_back_140px.png"),
|
||||
CYAN_BACK_160PX(HEALTHBAR_CYAN_BACK_160PX, "cyan_back_160px.png"),
|
||||
|
||||
ORANGE_FRONT_30PX(HEALTHBAR_ORANGE_FRONT_30PX, "orange_front_40px.png"),
|
||||
ORANGE_FRONT_40PX(HEALTHBAR_ORANGE_FRONT_40PX, "orange_front_40px.png"),
|
||||
ORANGE_FRONT_50PX(HEALTHBAR_ORANGE_FRONT_50PX, "orange_front_50px.png"),
|
||||
ORANGE_FRONT_60PX(HEALTHBAR_ORANGE_FRONT_60PX, "orange_front_60px.png"),
|
||||
ORANGE_FRONT_70PX(HEALTHBAR_ORANGE_FRONT_70PX, "orange_front_70px.png"),
|
||||
ORANGE_FRONT_80PX(HEALTHBAR_ORANGE_FRONT_80PX, "orange_front_80px.png"),
|
||||
ORANGE_FRONT_100PX(HEALTHBAR_ORANGE_FRONT_100PX, "orange_front_100px.png"),
|
||||
ORANGE_FRONT_120PX(HEALTHBAR_ORANGE_FRONT_120PX, "orange_front_120px.png"),
|
||||
ORANGE_FRONT_140PX(HEALTHBAR_ORANGE_FRONT_140PX, "orange_front_140px.png"),
|
||||
ORANGE_FRONT_160PX(HEALTHBAR_ORANGE_FRONT_160PX, "orange_front_160px.png"),
|
||||
|
||||
ORANGE_BACK_30PX(HEALTHBAR_ORANGE_BACK_30PX, "orange_back_40px.png"),
|
||||
ORANGE_BACK_40PX(HEALTHBAR_ORANGE_BACK_40PX, "orange_back_40px.png"),
|
||||
ORANGE_BACK_50PX(HEALTHBAR_ORANGE_BACK_50PX, "orange_back_50px.png"),
|
||||
ORANGE_BACK_60PX(HEALTHBAR_ORANGE_BACK_60PX, "orange_back_60px.png"),
|
||||
ORANGE_BACK_70PX(HEALTHBAR_ORANGE_BACK_70PX, "orange_back_70px.png"),
|
||||
ORANGE_BACK_80PX(HEALTHBAR_ORANGE_BACK_80PX, "orange_back_80px.png"),
|
||||
ORANGE_BACK_100PX(HEALTHBAR_ORANGE_BACK_100PX, "orange_back_100px.png"),
|
||||
ORANGE_BACK_120PX(HEALTHBAR_ORANGE_BACK_120PX, "orange_back_120px.png"),
|
||||
ORANGE_BACK_140PX(HEALTHBAR_ORANGE_BACK_140PX, "orange_back_140px.png"),
|
||||
ORANGE_BACK_160PX(HEALTHBAR_ORANGE_BACK_160PX, "orange_back_160px.png"),
|
||||
|
||||
YELLOW_FRONT_30PX(HEALTHBAR_YELLOW_FRONT_30PX, "yellow_front_40px.png"),
|
||||
YELLOW_FRONT_40PX(HEALTHBAR_YELLOW_FRONT_40PX, "yellow_front_40px.png"),
|
||||
YELLOW_FRONT_50PX(HEALTHBAR_YELLOW_FRONT_50PX, "yellow_front_50px.png"),
|
||||
YELLOW_FRONT_60PX(HEALTHBAR_YELLOW_FRONT_60PX, "yellow_front_60px.png"),
|
||||
YELLOW_FRONT_70PX(HEALTHBAR_YELLOW_FRONT_70PX, "yellow_front_70px.png"),
|
||||
YELLOW_FRONT_80PX(HEALTHBAR_YELLOW_FRONT_80PX, "yellow_front_80px.png"),
|
||||
YELLOW_FRONT_100PX(HEALTHBAR_YELLOW_FRONT_100PX, "yellow_front_100px.png"),
|
||||
YELLOW_FRONT_120PX(HEALTHBAR_YELLOW_FRONT_120PX, "yellow_front_120px.png"),
|
||||
YELLOW_FRONT_140PX(HEALTHBAR_YELLOW_FRONT_140PX, "yellow_front_140px.png"),
|
||||
YELLOW_FRONT_160PX(HEALTHBAR_YELLOW_FRONT_160PX, "yellow_front_160px.png"),
|
||||
|
||||
YELLOW_BACK_30PX(HEALTHBAR_YELLOW_BACK_30PX, "yellow_back_40px.png"),
|
||||
YELLOW_BACK_40PX(HEALTHBAR_YELLOW_BACK_40PX, "yellow_back_40px.png"),
|
||||
YELLOW_BACK_50PX(HEALTHBAR_YELLOW_BACK_50PX, "yellow_back_50px.png"),
|
||||
YELLOW_BACK_60PX(HEALTHBAR_YELLOW_BACK_60PX, "yellow_back_60px.png"),
|
||||
YELLOW_BACK_70PX(HEALTHBAR_YELLOW_BACK_70PX, "yellow_back_70px.png"),
|
||||
YELLOW_BACK_80PX(HEALTHBAR_YELLOW_BACK_80PX, "yellow_back_80px.png"),
|
||||
YELLOW_BACK_100PX(HEALTHBAR_YELLOW_BACK_100PX, "yellow_back_100px.png"),
|
||||
YELLOW_BACK_120PX(HEALTHBAR_YELLOW_BACK_120PX, "yellow_back_120px.png"),
|
||||
YELLOW_BACK_140PX(HEALTHBAR_YELLOW_BACK_140PX, "yellow_back_140px.png"),
|
||||
YELLOW_BACK_160PX(HEALTHBAR_YELLOW_BACK_160PX, "yellow_back_160px.png"),
|
||||
|
||||
BLUE_FRONT_50PX(HEALTHBAR_BLUE_FRONT_50PX, "blue_front_50px.png"),
|
||||
BLUE_BACK_50PX(HEALTHBAR_BLUE_BACK_50PX, "blue_back_50px.png"),
|
||||
|
||||
COX_GREEN(HEALTHBAR_COX_GREEN, "cox_green.png"),
|
||||
COX_BLUE(HEALTHBAR_COX_BLUE, "cox_blue.png"),
|
||||
COX_YELLOW(HEALTHBAR_COX_YELLOW, "cox_yellow.png"),
|
||||
COX_RED(HEALTHBAR_COX_RED, "cox_red.png");
|
||||
|
||||
@Getter
|
||||
private final int spriteId;
|
||||
|
||||
@@ -32,6 +32,7 @@ import java.awt.Image;
|
||||
import java.awt.Rectangle;
|
||||
import java.awt.image.BufferedImage;
|
||||
import javax.inject.Inject;
|
||||
import static net.runelite.api.widgets.WidgetID.GRAVESTONE_GROUP_ID;
|
||||
import net.runelite.api.widgets.WidgetItem;
|
||||
import net.runelite.client.game.ItemManager;
|
||||
import net.runelite.client.ui.overlay.WidgetItemOverlay;
|
||||
@@ -53,6 +54,7 @@ public class InventoryTagsOverlay extends WidgetItemOverlay
|
||||
this.config = config;
|
||||
showOnEquipment();
|
||||
showOnInventory();
|
||||
showOnInterfaces(GRAVESTONE_GROUP_ID);
|
||||
fillCache = CacheBuilder.newBuilder()
|
||||
.concurrencyLevel(1)
|
||||
.maximumSize(32)
|
||||
|
||||
@@ -54,6 +54,7 @@ class ItemPricesOverlay extends Overlay
|
||||
private static final int EXPLORERS_RING_ITEM_WIDGETID = WidgetInfo.EXPLORERS_RING_ALCH_INVENTORY.getPackedId();
|
||||
private static final int SEED_VAULT_ITEM_WIDGETID = WidgetInfo.SEED_VAULT_ITEM_CONTAINER.getPackedId();
|
||||
private static final int SEED_VAULT_INVENTORY_ITEM_WIDGETID = WidgetInfo.SEED_VAULT_INVENTORY_ITEMS_CONTAINER.getPackedId();
|
||||
private static final int POH_TREASURE_CHEST_INVENTORY_ITEM_WIDGETID = WidgetInfo.POH_TREASURE_CHEST_INVENTORY_CONTAINER.getPackedId();
|
||||
|
||||
private final Client client;
|
||||
private final ItemPricesConfig config;
|
||||
@@ -118,6 +119,7 @@ class ItemPricesOverlay extends Overlay
|
||||
return null;
|
||||
}
|
||||
case WidgetID.INVENTORY_GROUP_ID:
|
||||
case WidgetID.POH_TREASURE_CHEST_INVENTORY_GROUP_ID:
|
||||
if (config.hideInventory() && !(config.showWhileAlching() && isAlching))
|
||||
{
|
||||
return null;
|
||||
@@ -155,7 +157,8 @@ class ItemPricesOverlay extends Overlay
|
||||
if (widgetId == INVENTORY_ITEM_WIDGETID ||
|
||||
widgetId == BANK_INVENTORY_ITEM_WIDGETID ||
|
||||
widgetId == EXPLORERS_RING_ITEM_WIDGETID ||
|
||||
widgetId == SEED_VAULT_INVENTORY_ITEM_WIDGETID)
|
||||
widgetId == SEED_VAULT_INVENTORY_ITEM_WIDGETID ||
|
||||
widgetId == POH_TREASURE_CHEST_INVENTORY_ITEM_WIDGETID)
|
||||
{
|
||||
container = client.getItemContainer(InventoryID.INVENTORY);
|
||||
}
|
||||
|
||||
@@ -54,12 +54,17 @@ public class OverlayUtil
|
||||
}
|
||||
|
||||
public static void renderPolygon(Graphics2D graphics, Shape poly, Color color, Stroke borderStroke)
|
||||
{
|
||||
renderPolygon(graphics, poly, color, new Color(0, 0, 0, 50), borderStroke);
|
||||
}
|
||||
|
||||
public static void renderPolygon(Graphics2D graphics, Shape poly, Color color, Color fillColor, Stroke borderStroke)
|
||||
{
|
||||
graphics.setColor(color);
|
||||
final Stroke originalStroke = graphics.getStroke();
|
||||
graphics.setStroke(borderStroke);
|
||||
graphics.draw(poly);
|
||||
graphics.setColor(new Color(0, 0, 0, 50));
|
||||
graphics.setColor(fillColor);
|
||||
graphics.fill(poly);
|
||||
graphics.setStroke(originalStroke);
|
||||
}
|
||||
|
||||
@@ -43,6 +43,7 @@ import static net.runelite.api.widgets.WidgetID.GUIDE_PRICES_INVENTORY_GROUP_ID;
|
||||
import static net.runelite.api.widgets.WidgetID.INVENTORY_GROUP_ID;
|
||||
import static net.runelite.api.widgets.WidgetID.PLAYER_TRADE_INVENTORY_GROUP_ID;
|
||||
import static net.runelite.api.widgets.WidgetID.PLAYER_TRADE_SCREEN_GROUP_ID;
|
||||
import static net.runelite.api.widgets.WidgetID.POH_TREASURE_CHEST_INVENTORY_GROUP_ID;
|
||||
import static net.runelite.api.widgets.WidgetID.SEED_VAULT_INVENTORY_GROUP_ID;
|
||||
import static net.runelite.api.widgets.WidgetID.SHOP_INVENTORY_GROUP_ID;
|
||||
import net.runelite.api.widgets.WidgetInfo;
|
||||
@@ -127,7 +128,8 @@ public abstract class WidgetItemOverlay extends Overlay
|
||||
DUEL_INVENTORY_GROUP_ID,
|
||||
DUEL_INVENTORY_OTHER_GROUP_ID,
|
||||
PLAYER_TRADE_SCREEN_GROUP_ID,
|
||||
PLAYER_TRADE_INVENTORY_GROUP_ID);
|
||||
PLAYER_TRADE_INVENTORY_GROUP_ID,
|
||||
POH_TREASURE_CHEST_INVENTORY_GROUP_ID);
|
||||
}
|
||||
|
||||
protected void showOnBank()
|
||||
|
||||
Reference in New Issue
Block a user