Merge pull request #5182 from deathbeam/reduce-noise
Reduce default plugin noise for regular users
This commit is contained in:
@@ -39,7 +39,7 @@ public interface BlastFurnaceConfig extends Config
|
|||||||
)
|
)
|
||||||
default boolean showConveyorBelt()
|
default boolean showConveyorBelt()
|
||||||
{
|
{
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
@@ -50,6 +50,6 @@ public interface BlastFurnaceConfig extends Config
|
|||||||
)
|
)
|
||||||
default boolean showBarDispenser()
|
default boolean showBarDispenser()
|
||||||
{
|
{
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ public interface GroundItemsConfig extends Config
|
|||||||
)
|
)
|
||||||
default String getHiddenItems()
|
default String getHiddenItems()
|
||||||
{
|
{
|
||||||
return "";
|
return "Vial, Ashes, Coins, Bones, Bucket, Jug, Seaweed";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ import java.awt.Color;
|
|||||||
import java.awt.Dimension;
|
import java.awt.Dimension;
|
||||||
import java.awt.FontMetrics;
|
import java.awt.FontMetrics;
|
||||||
import java.awt.Graphics2D;
|
import java.awt.Graphics2D;
|
||||||
|
|
||||||
import java.awt.Polygon;
|
import java.awt.Polygon;
|
||||||
import java.awt.geom.Rectangle2D;
|
import java.awt.geom.Rectangle2D;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -38,6 +37,7 @@ import java.util.Set;
|
|||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
import net.runelite.api.Perspective;
|
import net.runelite.api.Perspective;
|
||||||
|
import static net.runelite.api.Perspective.getCanvasTilePoly;
|
||||||
import net.runelite.api.Player;
|
import net.runelite.api.Player;
|
||||||
import net.runelite.api.Point;
|
import net.runelite.api.Point;
|
||||||
import net.runelite.api.coords.LocalPoint;
|
import net.runelite.api.coords.LocalPoint;
|
||||||
@@ -47,17 +47,14 @@ import net.runelite.client.ui.overlay.OverlayLayer;
|
|||||||
import net.runelite.client.ui.overlay.OverlayPosition;
|
import net.runelite.client.ui.overlay.OverlayPosition;
|
||||||
import net.runelite.client.ui.overlay.OverlayUtil;
|
import net.runelite.client.ui.overlay.OverlayUtil;
|
||||||
|
|
||||||
import static net.runelite.api.Perspective.getCanvasTilePoly;
|
|
||||||
|
|
||||||
class KourendLibraryOverlay extends Overlay
|
class KourendLibraryOverlay extends Overlay
|
||||||
{
|
{
|
||||||
private final static int MAXIMUM_DISTANCE = 24;
|
private final static int MAXIMUM_DISTANCE = 24;
|
||||||
|
|
||||||
private final Library library;
|
private final Library library;
|
||||||
private final Client client;
|
private final Client client;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
KourendLibraryOverlay(Library library, Client client)
|
private KourendLibraryOverlay(Library library, Client client)
|
||||||
{
|
{
|
||||||
this.library = library;
|
this.library = library;
|
||||||
this.client = client;
|
this.client = client;
|
||||||
|
|||||||
@@ -49,8 +49,8 @@ import net.runelite.client.config.ConfigManager;
|
|||||||
import net.runelite.client.game.ItemManager;
|
import net.runelite.client.game.ItemManager;
|
||||||
import net.runelite.client.plugins.Plugin;
|
import net.runelite.client.plugins.Plugin;
|
||||||
import net.runelite.client.plugins.PluginDescriptor;
|
import net.runelite.client.plugins.PluginDescriptor;
|
||||||
import net.runelite.client.ui.NavigationButton;
|
|
||||||
import net.runelite.client.ui.ClientToolbar;
|
import net.runelite.client.ui.ClientToolbar;
|
||||||
|
import net.runelite.client.ui.NavigationButton;
|
||||||
import net.runelite.client.ui.overlay.OverlayManager;
|
import net.runelite.client.ui.overlay.OverlayManager;
|
||||||
import net.runelite.client.util.ImageUtil;
|
import net.runelite.client.util.ImageUtil;
|
||||||
|
|
||||||
@@ -62,6 +62,8 @@ import net.runelite.client.util.ImageUtil;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
public class KourendLibraryPlugin extends Plugin
|
public class KourendLibraryPlugin extends Plugin
|
||||||
{
|
{
|
||||||
|
private static final Pattern BOOK_EXTRACTOR = Pattern.compile("'<col=0000ff>(.*)</col>'");
|
||||||
|
private static final Pattern TAG_MATCHER = Pattern.compile("(<[^>]*>)");
|
||||||
final static int REGION = 6459;
|
final static int REGION = 6459;
|
||||||
|
|
||||||
final static boolean debug = false;
|
final static boolean debug = false;
|
||||||
@@ -90,7 +92,6 @@ public class KourendLibraryPlugin extends Plugin
|
|||||||
private KourendLibraryPanel panel;
|
private KourendLibraryPanel panel;
|
||||||
private NavigationButton navButton;
|
private NavigationButton navButton;
|
||||||
private boolean buttonAttached = false;
|
private boolean buttonAttached = false;
|
||||||
|
|
||||||
private WorldPoint lastBookcaseClick = null;
|
private WorldPoint lastBookcaseClick = null;
|
||||||
private WorldPoint lastBookcaseAnimatedOn = null;
|
private WorldPoint lastBookcaseAnimatedOn = null;
|
||||||
|
|
||||||
@@ -103,7 +104,6 @@ public class KourendLibraryPlugin extends Plugin
|
|||||||
@Override
|
@Override
|
||||||
protected void startUp() throws Exception
|
protected void startUp() throws Exception
|
||||||
{
|
{
|
||||||
overlayManager.add(overlay);
|
|
||||||
Book.fillImages(itemManager);
|
Book.fillImages(itemManager);
|
||||||
|
|
||||||
panel = injector.getInstance(KourendLibraryPanel.class);
|
panel = injector.getInstance(KourendLibraryPanel.class);
|
||||||
@@ -124,6 +124,16 @@ public class KourendLibraryPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void shutDown()
|
||||||
|
{
|
||||||
|
overlayManager.remove(overlay);
|
||||||
|
clientToolbar.removeNavigation(navButton);
|
||||||
|
buttonAttached = false;
|
||||||
|
lastBookcaseClick = null;
|
||||||
|
lastBookcaseAnimatedOn = null;
|
||||||
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
public void onConfigChanged(ConfigChanged ev)
|
public void onConfigChanged(ConfigChanged ev)
|
||||||
{
|
{
|
||||||
@@ -154,25 +164,18 @@ public class KourendLibraryPlugin extends Plugin
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void shutDown()
|
|
||||||
{
|
|
||||||
overlayManager.remove(overlay);
|
|
||||||
|
|
||||||
clientToolbar.removeNavigation(navButton);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
private void onMenuOptionClicked(MenuOptionClicked menuOpt)
|
public void onMenuOptionClicked(MenuOptionClicked menuOpt)
|
||||||
{
|
{
|
||||||
if (MenuAction.GAME_OBJECT_FIRST_OPTION == menuOpt.getMenuAction() && menuOpt.getMenuTarget().contains("Bookshelf"))
|
if (MenuAction.GAME_OBJECT_FIRST_OPTION == menuOpt.getMenuAction() && menuOpt.getMenuTarget().contains("Bookshelf"))
|
||||||
{
|
{
|
||||||
lastBookcaseClick = WorldPoint.fromScene(client, menuOpt.getActionParam(), menuOpt.getWidgetId(), client.getPlane());
|
lastBookcaseClick = WorldPoint.fromScene(client, menuOpt.getActionParam(), menuOpt.getWidgetId(), client.getPlane());
|
||||||
|
overlayManager.add(overlay);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
private void onAnimationChanged(AnimationChanged anim)
|
public void onAnimationChanged(AnimationChanged anim)
|
||||||
{
|
{
|
||||||
if (anim.getActor() == client.getLocalPlayer() && anim.getActor().getAnimation() == AnimationID.LOOKING_INTO)
|
if (anim.getActor() == client.getLocalPlayer() && anim.getActor().getAnimation() == AnimationID.LOOKING_INTO)
|
||||||
{
|
{
|
||||||
@@ -194,11 +197,8 @@ public class KourendLibraryPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final Pattern BOOK_EXTRACTOR = Pattern.compile("'<col=0000ff>(.*)</col>'");
|
|
||||||
private static final Pattern TAG_MATCHER = Pattern.compile("(<[^>]*>)");
|
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
void onTick(GameTick tick)
|
public void onTick(GameTick tick)
|
||||||
{
|
{
|
||||||
boolean inRegion = client.getLocalPlayer().getWorldLocation().getRegionID() == REGION;
|
boolean inRegion = client.getLocalPlayer().getWorldLocation().getRegionID() == REGION;
|
||||||
if (config.hideButton() && inRegion != buttonAttached)
|
if (config.hideButton() && inRegion != buttonAttached)
|
||||||
@@ -255,6 +255,8 @@ public class KourendLibraryPlugin extends Plugin
|
|||||||
log.warn("Book '{}' is not recognised", bookName);
|
log.warn("Book '{}' is not recognised", bookName);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
overlayManager.add(overlay);
|
||||||
library.setCustomer(cust, book);
|
library.setCustomer(cust, book);
|
||||||
panel.update();
|
panel.update();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ public interface PohConfig extends Config
|
|||||||
)
|
)
|
||||||
default boolean showBurner()
|
default boolean showBurner()
|
||||||
{
|
{
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
|
|||||||
Reference in New Issue
Block a user