rename to effect timers
@@ -22,7 +22,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
package net.runelite.client.plugins.freezetimersv2;
|
||||
package net.runelite.client.plugins.effecttimers;
|
||||
|
||||
import net.runelite.client.config.Config;
|
||||
import net.runelite.client.config.ConfigGroup;
|
||||
@@ -30,8 +30,8 @@ import net.runelite.client.config.ConfigItem;
|
||||
import net.runelite.client.config.Keybind;
|
||||
import java.awt.Color;
|
||||
|
||||
@ConfigGroup("freezetimersv2")
|
||||
public interface FreezeTimersV2Config extends Config
|
||||
@ConfigGroup("effecttimers")
|
||||
public interface EffectTimersConfig extends Config
|
||||
{
|
||||
@ConfigItem(
|
||||
name = "Show NPCs",
|
||||
@@ -22,7 +22,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
package net.runelite.client.plugins.freezetimersv2;
|
||||
package net.runelite.client.plugins.effecttimers;
|
||||
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import net.runelite.api.Actor;
|
||||
@@ -41,20 +41,20 @@ import java.awt.Font;
|
||||
import java.awt.Graphics2D;
|
||||
import java.awt.image.BufferedImage;
|
||||
|
||||
public class FreezeTimersV2Overlay extends Overlay
|
||||
public class EffectTimersOverlay extends Overlay
|
||||
{
|
||||
@Inject
|
||||
private TimerManager timerManager;
|
||||
@Inject
|
||||
private Client client;
|
||||
@Inject
|
||||
private FreezeTimersV2Config config;
|
||||
private EffectTimersConfig config;
|
||||
@Inject
|
||||
private ConfigManager configManager;
|
||||
private final Font timerFont = FontManager.getRunescapeBoldFont().deriveFont(14.0f);
|
||||
|
||||
@Inject
|
||||
public FreezeTimersV2Overlay()
|
||||
public EffectTimersOverlay()
|
||||
{
|
||||
super();
|
||||
setPosition(OverlayPosition.DYNAMIC);
|
||||
@@ -156,6 +156,9 @@ public class FreezeTimersV2Overlay extends Overlay
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
/*
|
||||
TODO: if the game lags this will go mental
|
||||
*/
|
||||
public String formatTime(long time)
|
||||
{
|
||||
if (time > 59999)
|
||||
@@ -22,7 +22,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
package net.runelite.client.plugins.freezetimersv2;
|
||||
package net.runelite.client.plugins.effecttimers;
|
||||
|
||||
import com.google.inject.Provides;
|
||||
import lombok.Getter;
|
||||
@@ -52,13 +52,13 @@ import javax.inject.Inject;
|
||||
import java.util.EnumSet;
|
||||
|
||||
@PluginDescriptor(
|
||||
name = "Freeze Timers v2",
|
||||
description = "Freeze/teleblock/veng timer overlay on players",
|
||||
name = "Effect Timers",
|
||||
description = "Effect timer overlay on players",
|
||||
tags = {"freeze", "timers", "barrage", "teleblock", "pklite"},
|
||||
type = PluginType.PVP,
|
||||
enabledByDefault = false
|
||||
)
|
||||
public class FreezeTimersV2Plugin extends Plugin
|
||||
public class EffectTimersPlugin extends Plugin
|
||||
{
|
||||
private static final int VORKATH_REGION = 9023;
|
||||
@Inject
|
||||
@@ -71,9 +71,9 @@ public class FreezeTimersV2Plugin extends Plugin
|
||||
@Inject
|
||||
private TimerManager timerManager;
|
||||
@Inject
|
||||
private FreezeTimersV2Overlay overlay;
|
||||
private EffectTimersOverlay overlay;
|
||||
@Inject
|
||||
private FreezeTimersV2Config config;
|
||||
private EffectTimersConfig config;
|
||||
@Inject
|
||||
private KeyManager keyManager;
|
||||
private int fakeSpotAnim = -1;
|
||||
@@ -85,15 +85,15 @@ public class FreezeTimersV2Plugin extends Plugin
|
||||
}
|
||||
};
|
||||
|
||||
public FreezeTimersV2Config getConfig()
|
||||
public EffectTimersConfig getConfig()
|
||||
{
|
||||
return config;
|
||||
}
|
||||
|
||||
@Provides
|
||||
public FreezeTimersV2Config getConfig(ConfigManager configManager)
|
||||
public EffectTimersConfig getConfig(ConfigManager configManager)
|
||||
{
|
||||
return configManager.getConfig(FreezeTimersV2Config.class);
|
||||
return configManager.getConfig(EffectTimersConfig.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright (c) 2020 ThatGamerBlue
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
package net.runelite.client.plugins.effecttimers;
|
||||
|
||||
public class HeadIcons
|
||||
{
|
||||
public static final int MELEE = 0;
|
||||
public static final int RANGED = 1;
|
||||
public static final int MAGIC = 2;
|
||||
public static final int RETRIBUTION = 3;
|
||||
public static final int SMITE = 4;
|
||||
public static final int REDEMPTION = 5;
|
||||
public static final int RANGE_MAGE = 6;
|
||||
}
|
||||
@@ -22,7 +22,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
package net.runelite.client.plugins.freezetimersv2;
|
||||
package net.runelite.client.plugins.effecttimers;
|
||||
|
||||
import lombok.AccessLevel;
|
||||
import lombok.AllArgsConstructor;
|
||||
@@ -22,7 +22,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
package net.runelite.client.plugins.freezetimersv2;
|
||||
package net.runelite.client.plugins.effecttimers;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.api.Actor;
|
||||
@@ -22,7 +22,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
package net.runelite.client.plugins.freezetimersv2;
|
||||
package net.runelite.client.plugins.effecttimers;
|
||||
|
||||
public enum TimeMode
|
||||
{
|
||||
@@ -22,7 +22,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
package net.runelite.client.plugins.freezetimersv2;
|
||||
package net.runelite.client.plugins.effecttimers;
|
||||
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Setter;
|
||||
@@ -35,7 +35,7 @@ import java.awt.image.BufferedImage;
|
||||
@EqualsAndHashCode
|
||||
public class Timer
|
||||
{
|
||||
private FreezeTimersV2Plugin plugin;
|
||||
private EffectTimersPlugin plugin;
|
||||
private Client client;
|
||||
@Setter
|
||||
private int ticksStart;
|
||||
@@ -47,12 +47,12 @@ public class Timer
|
||||
private TimerType type;
|
||||
private boolean shutdown = false;
|
||||
|
||||
public Timer(FreezeTimersV2Plugin plugin, PlayerSpellEffect effect)
|
||||
public Timer(EffectTimersPlugin plugin, PlayerSpellEffect effect)
|
||||
{
|
||||
this(plugin, effect, false);
|
||||
}
|
||||
|
||||
public Timer(FreezeTimersV2Plugin plugin, PlayerSpellEffect effect, boolean half)
|
||||
public Timer(EffectTimersPlugin plugin, PlayerSpellEffect effect, boolean half)
|
||||
{
|
||||
this.plugin = plugin;
|
||||
this.client = plugin.getClient();
|
||||
@@ -22,7 +22,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
package net.runelite.client.plugins.freezetimersv2;
|
||||
package net.runelite.client.plugins.effecttimers;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.api.Actor;
|
||||
@@ -35,7 +35,7 @@ import java.util.HashMap;
|
||||
public class TimerManager
|
||||
{
|
||||
@Inject
|
||||
private FreezeTimersV2Plugin plugin;
|
||||
private EffectTimersPlugin plugin;
|
||||
private HashMap<Actor, HashMap<TimerType, Timer>> timerMap = new HashMap<>();
|
||||
|
||||
private HashMap<TimerType, Timer> getTimersFor(Actor actor)
|
||||
@@ -22,7 +22,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
package net.runelite.client.plugins.freezetimersv2;
|
||||
package net.runelite.client.plugins.effecttimers;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@@ -47,11 +47,11 @@ public enum TimerType
|
||||
|
||||
private static BufferedImage loadImage(String name)
|
||||
{
|
||||
return ImageUtil.getResourceStreamFromClass(FreezeTimersV2Plugin.class, name + ".png");
|
||||
return ImageUtil.getResourceStreamFromClass(EffectTimersPlugin.class, name + ".png");
|
||||
}
|
||||
|
||||
public boolean shouldRender(ConfigManager configManager)
|
||||
{
|
||||
return configManager.getConfiguration("freezetimersv2", renderConfig, Boolean.class);
|
||||
return configManager.getConfiguration("effecttimers", renderConfig, Boolean.class);
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
package net.runelite.client.plugins.freezetimersv2;
|
||||
|
||||
public class HeadIcons
|
||||
{
|
||||
public static final int MELEE = 0;
|
||||
public static final int RANGED = 1;
|
||||
public static final int MAGIC = 2;
|
||||
public static final int RETRIBUTION = 3;
|
||||
public static final int SMITE = 4;
|
||||
public static final int REDEMPTION = 5;
|
||||
public static final int RANGE_MAGE = 6;
|
||||
}
|
||||
|
Before Width: | Height: | Size: 195 B After Width: | Height: | Size: 195 B |
|
Before Width: | Height: | Size: 492 B After Width: | Height: | Size: 492 B |
|
Before Width: | Height: | Size: 216 B After Width: | Height: | Size: 216 B |
|
Before Width: | Height: | Size: 468 B After Width: | Height: | Size: 468 B |
|
Before Width: | Height: | Size: 251 B After Width: | Height: | Size: 251 B |
@@ -1,4 +1,4 @@
|
||||
package net.runelite.client.plugins.freezetimersv2;
|
||||
package net.runelite.client.plugins.effecttimers;
|
||||
|
||||
import com.google.inject.Guice;
|
||||
import com.google.inject.testing.fieldbinder.Bind;
|
||||
@@ -15,7 +15,7 @@ import java.util.concurrent.ScheduledExecutorService;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
@RunWith(MockitoJUnitRunner.class)
|
||||
public class FreezeTimersV2OverlayTest
|
||||
public class EffectTimersOverlayTest
|
||||
{
|
||||
@Mock
|
||||
@Bind
|
||||
@@ -31,10 +31,10 @@ public class FreezeTimersV2OverlayTest
|
||||
|
||||
@Mock
|
||||
@Bind
|
||||
private FreezeTimersV2Config config;
|
||||
private EffectTimersConfig config;
|
||||
|
||||
@Inject
|
||||
private FreezeTimersV2Overlay timersOverlay;
|
||||
private EffectTimersOverlay timersOverlay;
|
||||
|
||||
@Before
|
||||
public void before()
|
||||