BATools: Remove antidrag, remove useless colors

This commit is contained in:
Lucas
2019-05-20 03:16:31 +02:00
parent 646dac7b71
commit 17c2313b05
3 changed files with 7 additions and 43 deletions

View File

@@ -81,26 +81,6 @@ public interface BAToolsConfig extends Config
return false; return false;
} }
@ConfigItem(
keyName = "antiDrag",
name = "Anti Drag",
description = "asd"
)
default boolean antiDrag()
{
return false;
}
@ConfigItem(
keyName = "antiDragDelay",
name = "Anti Drag Delay",
description = "asd"
)
default int antiDragDelay()
{
return 5;
}
@ConfigItem( @ConfigItem(
keyName = "eggBoi", keyName = "eggBoi",
name = "Collector helper", name = "Collector helper",

View File

@@ -25,6 +25,8 @@
package net.runelite.client.plugins.batools; package net.runelite.client.plugins.batools;
import java.awt.Color; import java.awt.Color;
import static java.awt.Color.GREEN;
import static java.awt.Color.RED;
import java.awt.Dimension; import java.awt.Dimension;
import java.awt.Graphics2D; import java.awt.Graphics2D;
import java.time.Duration; import java.time.Duration;
@@ -40,16 +42,6 @@ import net.runelite.client.ui.overlay.OverlayUtil;
public class BAToolsOverlay extends Overlay public class BAToolsOverlay extends Overlay
{ {
private static final Color RED = new Color(221, 44, 0);
private static final Color GREEN = new Color(0, 200, 83);
private static final Color ORANGE = new Color(255, 109, 0);
private static final Color YELLOW = new Color(255, 214, 0);
private static final Color CYAN = new Color(0, 184, 212);
private static final Color BLUE = new Color(41, 98, 255);
private static final Color DEEP_PURPLE = new Color(98, 0, 234);
private static final Color PURPLE = new Color(170, 0, 255);
private static final Color GRAY = new Color(158, 158, 158);
private final BAToolsConfig config; private final BAToolsConfig config;
private BAToolsPlugin plugin; private BAToolsPlugin plugin;

View File

@@ -140,7 +140,6 @@ public class BAToolsPlugin extends Plugin implements KeyListener
wave_start = Instant.now(); wave_start = Instant.now();
lastInteracted = null; lastInteracted = null;
foodPressed.clear(); foodPressed.clear();
client.setInventoryDragDelay(config.antiDragDelay());
keyManager.registerKeyListener(this); keyManager.registerKeyListener(this);
} }
@@ -152,7 +151,6 @@ public class BAToolsPlugin extends Plugin implements KeyListener
inGameBit = 0; inGameBit = 0;
lastInteracted = null; lastInteracted = null;
overlayManager.remove(overlay); overlayManager.remove(overlay);
client.setInventoryDragDelay(5);
keyManager.unregisterKeyListener(this); keyManager.unregisterKeyListener(this);
shiftDown = false; shiftDown = false;
} }
@@ -173,11 +171,6 @@ public class BAToolsPlugin extends Plugin implements KeyListener
@Subscribe @Subscribe
public void onGameTick(GameTick event) public void onGameTick(GameTick event)
{ {
if (config.antiDrag())
{
client.setInventoryDragDelay(config.antiDragDelay());
}
Widget callWidget = getWidget(); Widget callWidget = getWidget();
if (callWidget != null) if (callWidget != null)
@@ -304,7 +297,9 @@ public class BAToolsPlugin extends Plugin implements KeyListener
if (inGameBit != inGame) if (inGameBit != inGame)
{ {
if (inGameBit == 1) inGameBit = inGame;
if (inGameBit == 0)
{ {
pastCall = 0; pastCall = 0;
removeCounter(); removeCounter();
@@ -315,8 +310,6 @@ public class BAToolsPlugin extends Plugin implements KeyListener
addCounter(); addCounter();
} }
} }
inGameBit = inGame;
} }
@Subscribe @Subscribe
@@ -660,12 +653,11 @@ public class BAToolsPlugin extends Plugin implements KeyListener
} }
} }
@Subscribe
public void onConfigChanged(ConfigChanged event) public void onConfigChanged(ConfigChanged event)
{ {
if (config.antiDrag()) if (counter != null && !config.defTimer())
{ {
client.setInventoryDragDelay(config.antiDragDelay()); removeCounter();
} }
} }