Merge remote-tracking branch 'runelite/master' into 0409-merge
This commit is contained in:
@@ -323,14 +323,14 @@ public class RuneLite
|
|||||||
// to main settings
|
// to main settings
|
||||||
pluginManager.loadDefaultPluginConfiguration();
|
pluginManager.loadDefaultPluginConfiguration();
|
||||||
|
|
||||||
// Initialize UI
|
|
||||||
RuneLiteSplashScreen.stage(.75, "Initialize UI");
|
|
||||||
clientUI.init(this);
|
|
||||||
|
|
||||||
// Start client session
|
// Start client session
|
||||||
RuneLiteSplashScreen.stage(.80, "Starting core interface");
|
RuneLiteSplashScreen.stage(.75, "Starting core interface");
|
||||||
clientSessionManager.start();
|
clientSessionManager.start();
|
||||||
|
|
||||||
|
// Initialize UI
|
||||||
|
RuneLiteSplashScreen.stage(.80, "Initialize UI");
|
||||||
|
clientUI.init(this);
|
||||||
|
|
||||||
if (!isOutdated)
|
if (!isOutdated)
|
||||||
{
|
{
|
||||||
// Initialize chat colors
|
// Initialize chat colors
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ public class PluginManager
|
|||||||
}
|
}
|
||||||
catch (PluginInstantiationException e)
|
catch (PluginInstantiationException e)
|
||||||
{
|
{
|
||||||
log.warn("Error during starting/stopping plugin {}. {}", plugin.getClass().getSimpleName(), e);
|
log.warn("Error during starting/stopping plugin {}", plugin.getClass().getSimpleName(), e);
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
@@ -228,7 +228,7 @@ public class PluginManager
|
|||||||
}
|
}
|
||||||
catch (PluginInstantiationException ex)
|
catch (PluginInstantiationException ex)
|
||||||
{
|
{
|
||||||
log.warn("Unable to start plugin {}. {}", plugin.getClass().getSimpleName(), ex);
|
log.warn("Unable to start plugin {}", plugin.getClass().getSimpleName(), ex);
|
||||||
plugins.remove(plugin);
|
plugins.remove(plugin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -275,6 +275,15 @@ public class GpuPlugin extends Plugin implements DrawCallbacks
|
|||||||
bufferId = uvBufferId = uniformBufferId = -1;
|
bufferId = uvBufferId = uniformBufferId = -1;
|
||||||
unorderedModels = smallModels = largeModels = 0;
|
unorderedModels = smallModels = largeModels = 0;
|
||||||
|
|
||||||
|
canvas = client.getCanvas();
|
||||||
|
|
||||||
|
if (!canvas.isDisplayable())
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
canvas.setIgnoreRepaint(true);
|
||||||
|
|
||||||
vertexBuffer = new GpuIntBuffer();
|
vertexBuffer = new GpuIntBuffer();
|
||||||
uvBuffer = new GpuFloatBuffer();
|
uvBuffer = new GpuFloatBuffer();
|
||||||
|
|
||||||
@@ -282,8 +291,10 @@ public class GpuPlugin extends Plugin implements DrawCallbacks
|
|||||||
modelBufferSmall = new GpuIntBuffer();
|
modelBufferSmall = new GpuIntBuffer();
|
||||||
modelBuffer = new GpuIntBuffer();
|
modelBuffer = new GpuIntBuffer();
|
||||||
|
|
||||||
canvas = client.getCanvas();
|
if (log.isDebugEnabled())
|
||||||
canvas.setIgnoreRepaint(true);
|
{
|
||||||
|
System.setProperty("jogl.debug", "true");
|
||||||
|
}
|
||||||
|
|
||||||
GLProfile.initSingleton();
|
GLProfile.initSingleton();
|
||||||
|
|
||||||
@@ -361,7 +372,7 @@ public class GpuPlugin extends Plugin implements DrawCallbacks
|
|||||||
|
|
||||||
shutDown();
|
shutDown();
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -378,7 +378,7 @@ public class SlayerPlugin extends Plugin
|
|||||||
return configManager.getConfig(SlayerConfig.class);
|
return configManager.getConfig(SlayerConfig.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onGameStateChanged(GameStateChanged event)
|
void onGameStateChanged(GameStateChanged event)
|
||||||
{
|
{
|
||||||
switch (event.getGameState())
|
switch (event.getGameState())
|
||||||
{
|
{
|
||||||
@@ -396,7 +396,7 @@ public class SlayerPlugin extends Plugin
|
|||||||
if (loginTick && this.amount != -1
|
if (loginTick && this.amount != -1
|
||||||
&& !this.taskName.isEmpty())
|
&& !this.taskName.isEmpty())
|
||||||
{
|
{
|
||||||
setTask(this.taskName, this.amount, this.initialAmount, true, this.taskLocation, this.lastCertainAmount);
|
setTask(this.taskName, this.amount, this.initialAmount, true, this.taskLocation, this.lastCertainAmount, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -822,7 +822,7 @@ public class SlayerPlugin extends Plugin
|
|||||||
|
|
||||||
private void onConfigChanged(ConfigChanged event)
|
private void onConfigChanged(ConfigChanged event)
|
||||||
{
|
{
|
||||||
if (!event.getGroup().equals("slayer"))
|
if (!event.getGroup().equals("slayer") || !event.getKey().equals("infobox"))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1029,6 +1029,11 @@ public class SlayerPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void setTask(String name, int amt, int initAmt, boolean isNewAssignment, String location, int lastCertainAmt)
|
private void setTask(String name, int amt, int initAmt, boolean isNewAssignment, String location, int lastCertainAmt)
|
||||||
|
{
|
||||||
|
setTask(name, amt, initAmt, isNewAssignment, location, lastCertainAmt, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setTask(String name, int amt, int initAmt, boolean isNewAssignment, String location, int lastCertainAmt, boolean addCounter)
|
||||||
{
|
{
|
||||||
currentTask = new TaskData(isNewAssignment ? 0 : currentTask.getElapsedTime(),
|
currentTask = new TaskData(isNewAssignment ? 0 : currentTask.getElapsedTime(),
|
||||||
isNewAssignment ? 0 : currentTask.getElapsedKills(),
|
isNewAssignment ? 0 : currentTask.getElapsedKills(),
|
||||||
@@ -1042,8 +1047,12 @@ public class SlayerPlugin extends Plugin
|
|||||||
|
|
||||||
save();
|
save();
|
||||||
removeCounter();
|
removeCounter();
|
||||||
addCounter();
|
|
||||||
infoTimer = Instant.now();
|
if (addCounter)
|
||||||
|
{
|
||||||
|
infoTimer = Instant.now();
|
||||||
|
addCounter();
|
||||||
|
}
|
||||||
|
|
||||||
Task task = Task.getTask(name);
|
Task task = Task.getTask(name);
|
||||||
targetNames.clear();
|
targetNames.clear();
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ public interface TimersConfig extends Config
|
|||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
keyName = "showAntipoison",
|
keyName = "showAntipoison",
|
||||||
name = "Antipoison/Venom timers",
|
name = "Antipoison/Venom timers",
|
||||||
description = "Configures whether timers for poison and venom protection are displayed"
|
description = "Configures whether timers for Antipoison, Antidote and Antivenom are displayed"
|
||||||
)
|
)
|
||||||
default boolean showAntiPoison()
|
default boolean showAntiPoison()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ import javax.inject.Inject;
|
|||||||
import net.runelite.api.ChatMessageType;
|
import net.runelite.api.ChatMessageType;
|
||||||
import static net.runelite.api.ChatMessageType.GAMEMESSAGE;
|
import static net.runelite.api.ChatMessageType.GAMEMESSAGE;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
|
import net.runelite.api.GameState;
|
||||||
import net.runelite.api.MessageNode;
|
import net.runelite.api.MessageNode;
|
||||||
import net.runelite.api.Player;
|
import net.runelite.api.Player;
|
||||||
import net.runelite.api.Skill;
|
import net.runelite.api.Skill;
|
||||||
@@ -40,6 +41,7 @@ import net.runelite.api.Varbits;
|
|||||||
import net.runelite.api.coords.LocalPoint;
|
import net.runelite.api.coords.LocalPoint;
|
||||||
import net.runelite.api.events.ChatMessage;
|
import net.runelite.api.events.ChatMessage;
|
||||||
import net.runelite.api.events.ExperienceChanged;
|
import net.runelite.api.events.ExperienceChanged;
|
||||||
|
import net.runelite.api.events.GameStateChanged;
|
||||||
import net.runelite.api.events.GameTick;
|
import net.runelite.api.events.GameTick;
|
||||||
import net.runelite.api.events.VarbitChanged;
|
import net.runelite.api.events.VarbitChanged;
|
||||||
import net.runelite.api.widgets.Widget;
|
import net.runelite.api.widgets.Widget;
|
||||||
@@ -572,4 +574,18 @@ public class SlayerPluginTest
|
|||||||
|
|
||||||
assertEquals(34, slayerPlugin.getCurrentTask().getAmount());
|
assertEquals(34, slayerPlugin.getCurrentTask().getAmount());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void infoboxNotAddedOnLogin()
|
||||||
|
{
|
||||||
|
GameStateChanged loggingIn = new GameStateChanged();
|
||||||
|
loggingIn.setGameState(GameState.LOGGING_IN);
|
||||||
|
slayerPlugin.onGameStateChanged(loggingIn);
|
||||||
|
|
||||||
|
GameStateChanged loggedIn = new GameStateChanged();
|
||||||
|
loggedIn.setGameState(GameState.LOGGED_IN);
|
||||||
|
slayerPlugin.onGameStateChanged(loggedIn);
|
||||||
|
|
||||||
|
verify(infoBoxManager, never()).addInfoBox(any());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user