attackstyles: Rename Attack Indicators plugin to Attack Styles
This commit is contained in:
@@ -22,7 +22,7 @@
|
|||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
package net.runelite.client.plugins.attackindicator;
|
package net.runelite.client.plugins.attackstyles;
|
||||||
|
|
||||||
import net.runelite.api.Skill;
|
import net.runelite.api.Skill;
|
||||||
|
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
package net.runelite.client.plugins.attackindicator;
|
package net.runelite.client.plugins.attackstyles;
|
||||||
|
|
||||||
import net.runelite.client.config.Config;
|
import net.runelite.client.config.Config;
|
||||||
import net.runelite.client.config.ConfigGroup;
|
import net.runelite.client.config.ConfigGroup;
|
||||||
@@ -30,10 +30,10 @@ import net.runelite.client.config.ConfigItem;
|
|||||||
|
|
||||||
@ConfigGroup(
|
@ConfigGroup(
|
||||||
keyName = "attackIndicator",
|
keyName = "attackIndicator",
|
||||||
name = "Attack Indicators",
|
name = "Attack Styles",
|
||||||
description = "Configuration for the attack indicator plugin"
|
description = "Configuration for the attack styles plugin"
|
||||||
)
|
)
|
||||||
public interface AttackIndicatorConfig extends Config
|
public interface AttackStylesConfig extends Config
|
||||||
{
|
{
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
keyName = "warnForDefensive",
|
keyName = "warnForDefensive",
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
package net.runelite.client.plugins.attackindicator;
|
package net.runelite.client.plugins.attackstyles;
|
||||||
|
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.awt.Dimension;
|
import java.awt.Dimension;
|
||||||
@@ -32,15 +32,15 @@ import net.runelite.client.ui.overlay.Overlay;
|
|||||||
import net.runelite.client.ui.overlay.OverlayPosition;
|
import net.runelite.client.ui.overlay.OverlayPosition;
|
||||||
import net.runelite.client.ui.overlay.components.PanelComponent;
|
import net.runelite.client.ui.overlay.components.PanelComponent;
|
||||||
|
|
||||||
public class AttackIndicatorOverlay extends Overlay
|
public class AttackStylesOverlay extends Overlay
|
||||||
{
|
{
|
||||||
private static final int COMPONENT_WIDTH = 80;
|
private static final int COMPONENT_WIDTH = 80;
|
||||||
|
|
||||||
private final AttackIndicatorPlugin plugin;
|
private final AttackStylesPlugin plugin;
|
||||||
private final PanelComponent panelComponent = new PanelComponent();
|
private final PanelComponent panelComponent = new PanelComponent();
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public AttackIndicatorOverlay(AttackIndicatorPlugin plugin)
|
public AttackStylesOverlay(AttackStylesPlugin plugin)
|
||||||
{
|
{
|
||||||
setPosition(OverlayPosition.ABOVE_CHATBOX_RIGHT);
|
setPosition(OverlayPosition.ABOVE_CHATBOX_RIGHT);
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
package net.runelite.client.plugins.attackindicator;
|
package net.runelite.client.plugins.attackstyles;
|
||||||
|
|
||||||
import com.google.common.annotations.VisibleForTesting;
|
import com.google.common.annotations.VisibleForTesting;
|
||||||
import com.google.common.collect.HashBasedTable;
|
import com.google.common.collect.HashBasedTable;
|
||||||
@@ -49,15 +49,15 @@ import static net.runelite.api.widgets.WidgetInfo.TO_GROUP;
|
|||||||
import net.runelite.client.config.ConfigManager;
|
import net.runelite.client.config.ConfigManager;
|
||||||
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 static net.runelite.client.plugins.attackindicator.AttackStyle.CASTING;
|
import static net.runelite.client.plugins.attackstyles.AttackStyle.CASTING;
|
||||||
import static net.runelite.client.plugins.attackindicator.AttackStyle.DEFENSIVE_CASTING;
|
import static net.runelite.client.plugins.attackstyles.AttackStyle.DEFENSIVE_CASTING;
|
||||||
import static net.runelite.client.plugins.attackindicator.AttackStyle.OTHER;
|
import static net.runelite.client.plugins.attackstyles.AttackStyle.OTHER;
|
||||||
|
|
||||||
@PluginDescriptor(
|
@PluginDescriptor(
|
||||||
name = "Attack Indicators"
|
name = "Attack Styles"
|
||||||
)
|
)
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class AttackIndicatorPlugin extends Plugin
|
public class AttackStylesPlugin extends Plugin
|
||||||
{
|
{
|
||||||
private int attackStyleVarbit = -1;
|
private int attackStyleVarbit = -1;
|
||||||
private int equippedWeaponTypeVarbit = -1;
|
private int equippedWeaponTypeVarbit = -1;
|
||||||
@@ -71,19 +71,19 @@ public class AttackIndicatorPlugin extends Plugin
|
|||||||
private Client client;
|
private Client client;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private AttackIndicatorConfig config;
|
private AttackStylesConfig config;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private AttackIndicatorOverlay overlay;
|
private AttackStylesOverlay overlay;
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
AttackIndicatorConfig provideConfig(ConfigManager configManager)
|
AttackStylesConfig provideConfig(ConfigManager configManager)
|
||||||
{
|
{
|
||||||
return configManager.getConfig(AttackIndicatorConfig.class);
|
return configManager.getConfig(AttackStylesConfig.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AttackIndicatorOverlay getOverlay()
|
public AttackStylesOverlay getOverlay()
|
||||||
{
|
{
|
||||||
return overlay;
|
return overlay;
|
||||||
}
|
}
|
||||||
@@ -22,11 +22,11 @@
|
|||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
package net.runelite.client.plugins.attackindicator;
|
package net.runelite.client.plugins.attackstyles;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import static net.runelite.client.plugins.attackindicator.AttackStyle.*;
|
import static net.runelite.client.plugins.attackstyles.AttackStyle.*;
|
||||||
|
|
||||||
public enum WeaponType
|
public enum WeaponType
|
||||||
{
|
{
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
package net.runelite.client.plugins.attackindicator;
|
package net.runelite.client.plugins.attackstyles;
|
||||||
|
|
||||||
import com.google.inject.Guice;
|
import com.google.inject.Guice;
|
||||||
import com.google.inject.testing.fieldbinder.Bind;
|
import com.google.inject.testing.fieldbinder.Bind;
|
||||||
@@ -48,7 +48,7 @@ import static org.mockito.Mockito.when;
|
|||||||
import org.mockito.runners.MockitoJUnitRunner;
|
import org.mockito.runners.MockitoJUnitRunner;
|
||||||
|
|
||||||
@RunWith(MockitoJUnitRunner.class)
|
@RunWith(MockitoJUnitRunner.class)
|
||||||
public class AttackIndicatorPluginTest
|
public class AttackStylesPluginTest
|
||||||
{
|
{
|
||||||
@Mock
|
@Mock
|
||||||
@Bind
|
@Bind
|
||||||
@@ -56,10 +56,10 @@ public class AttackIndicatorPluginTest
|
|||||||
|
|
||||||
@Mock
|
@Mock
|
||||||
@Bind
|
@Bind
|
||||||
AttackIndicatorConfig attackConfig;
|
AttackStylesConfig attackConfig;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
AttackIndicatorPlugin attackPlugin;
|
AttackStylesPlugin attackPlugin;
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void before()
|
public void before()
|
||||||
@@ -102,7 +102,7 @@ public class AttackIndicatorPluginTest
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Verify that attack style widgets are hidden when filtered with the AttackIndicatorPlugin.
|
* Verify that attack style widgets are hidden when filtered with the AttackStylesPlugin.
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testHiddenWidget()
|
public void testHiddenWidget()
|
||||||
Reference in New Issue
Block a user