Merge pull request #10004 from raiyni/stack-stones
Add ability to always stack resizable stones
This commit is contained in:
@@ -72,4 +72,14 @@ public interface InterfaceStylesConfig extends Config
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "alwaysStack",
|
||||
name = "Always stack bottom bar",
|
||||
description = "Always stack the bottom bar in resizable"
|
||||
)
|
||||
default boolean alwaysStack()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -40,6 +40,7 @@ import net.runelite.api.events.ClientTick;
|
||||
import net.runelite.client.events.ConfigChanged;
|
||||
import net.runelite.api.events.GameStateChanged;
|
||||
import net.runelite.api.events.PostHealthBar;
|
||||
import net.runelite.api.events.ScriptCallbackEvent;
|
||||
import net.runelite.api.widgets.Widget;
|
||||
import net.runelite.api.widgets.WidgetInfo;
|
||||
import net.runelite.client.callback.ClientThread;
|
||||
@@ -106,6 +107,17 @@ public class InterfaceStylesPlugin extends Plugin
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onScriptCallbackEvent(ScriptCallbackEvent event)
|
||||
{
|
||||
if ("forceStackStones".equals(event.getEventName()) && config.alwaysStack())
|
||||
{
|
||||
int[] intStack = client.getIntStack();
|
||||
int intStackSize = client.getIntStackSize();
|
||||
intStack[intStackSize - 1] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onClientTick(ClientTick event)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user