@@ -30,7 +30,7 @@ import java.util.Properties;
|
|||||||
|
|
||||||
public class CacheProperties
|
public class CacheProperties
|
||||||
{
|
{
|
||||||
private static Properties getProperies() throws IOException
|
private static Properties getProperties() throws IOException
|
||||||
{
|
{
|
||||||
Properties properties = new Properties();
|
Properties properties = new Properties();
|
||||||
InputStream resourceAsStream = StoreLocation.class.getResourceAsStream("/cache.properties");
|
InputStream resourceAsStream = StoreLocation.class.getResourceAsStream("/cache.properties");
|
||||||
@@ -40,11 +40,11 @@ public class CacheProperties
|
|||||||
|
|
||||||
public static int getRsVersion() throws IOException
|
public static int getRsVersion() throws IOException
|
||||||
{
|
{
|
||||||
return Integer.parseInt(getProperies().getProperty("rs.version"));
|
return Integer.parseInt(getProperties().getProperty("rs.version"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getCacheVersion() throws IOException
|
public static int getCacheVersion() throws IOException
|
||||||
{
|
{
|
||||||
return Integer.parseInt(getProperies().getProperty("cache.version"));
|
return Integer.parseInt(getProperties().getProperty("cache.version"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ public class MapDumperTest
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Ignore
|
@Ignore
|
||||||
public void dunpJson() throws IOException
|
public void dumpJson() throws IOException
|
||||||
{
|
{
|
||||||
File base = StoreLocation.LOCATION,
|
File base = StoreLocation.LOCATION,
|
||||||
outDir = folder.newFolder();
|
outDir = folder.newFolder();
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ public class AccountClient
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean sesssionCheck()
|
public boolean sessionCheck()
|
||||||
{
|
{
|
||||||
HttpUrl url = RuneLiteAPI.getApiBase().newBuilder()
|
HttpUrl url = RuneLiteAPI.getApiBase().newBuilder()
|
||||||
.addPathSegment("account")
|
.addPathSegment("account")
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ public class SessionManager
|
|||||||
|
|
||||||
// Check if session is still valid
|
// Check if session is still valid
|
||||||
AccountClient accountClient = new AccountClient(session.getUuid());
|
AccountClient accountClient = new AccountClient(session.getUuid());
|
||||||
if (!accountClient.sesssionCheck())
|
if (!accountClient.sessionCheck())
|
||||||
{
|
{
|
||||||
log.debug("Loaded session {} is invalid", session.getUuid());
|
log.debug("Loaded session {} is invalid", session.getUuid());
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ public class AnagramClue extends ClueScroll implements TextClueScroll, NpcClueSc
|
|||||||
new AnagramClue("HE DO POSE. IT IS CULTRRL, MK?", "Riki the sculptor's model", new WorldPoint(2904, 10206, 0), "East Keldagrim, south of kebab seller."),
|
new AnagramClue("HE DO POSE. IT IS CULTRRL, MK?", "Riki the sculptor's model", new WorldPoint(2904, 10206, 0), "East Keldagrim, south of kebab seller."),
|
||||||
new AnagramClue("HEORIC", "Eohric", new WorldPoint(2900, 3565, 0), "Top floor of Burthorpe Castle", "36"),
|
new AnagramClue("HEORIC", "Eohric", new WorldPoint(2900, 3565, 0), "Top floor of Burthorpe Castle", "36"),
|
||||||
new AnagramClue("HIS PHOR", "Horphis", new WorldPoint(1639, 3812, 0), "Arceuus Library, Zeah", "1"),
|
new AnagramClue("HIS PHOR", "Horphis", new WorldPoint(1639, 3812, 0), "Arceuus Library, Zeah", "1"),
|
||||||
new AnagramClue("I AM SIR", "Marisi", new WorldPoint(1813, 3488, 0), "Allotment patch, South coast Zeah", "5"),
|
new AnagramClue("I AM SIR", "Marisi", new WorldPoint(1737, 3557, 0), "Allotment patch, South of Hosidius chapel", "5"),
|
||||||
new AnagramClue("ICY FE", "Fycie", new WorldPoint(2630, 2997, 0), "East Feldip Hills"),
|
new AnagramClue("ICY FE", "Fycie", new WorldPoint(2630, 2997, 0), "East Feldip Hills"),
|
||||||
new AnagramClue("I DOOM ICON INN", "Dominic Onion", new WorldPoint(2609, 3116, 0), "Nightmare Zone", "9,500"),
|
new AnagramClue("I DOOM ICON INN", "Dominic Onion", new WorldPoint(2609, 3116, 0), "Nightmare Zone", "9,500"),
|
||||||
new AnagramClue("I EAT ITS CHART HINTS DO U", "Shiratti the Custodian", new WorldPoint(3427, 2927, 0), "North of fountain, Nardah"),
|
new AnagramClue("I EAT ITS CHART HINTS DO U", "Shiratti the Custodian", new WorldPoint(3427, 2927, 0), "North of fountain, Nardah"),
|
||||||
|
|||||||
@@ -166,6 +166,7 @@ public class CoordinateClue extends ClueScroll implements TextClueScroll, Locati
|
|||||||
.put(new WorldPoint(3380, 3963, 0), "Wilderness. North of Volcano.")
|
.put(new WorldPoint(3380, 3963, 0), "Wilderness. North of Volcano.")
|
||||||
.put(new WorldPoint(3051, 3736, 0), "East of the Wilderness Obelisk in 28 Wilderness.")
|
.put(new WorldPoint(3051, 3736, 0), "East of the Wilderness Obelisk in 28 Wilderness.")
|
||||||
.put(new WorldPoint(2316, 3814, 0), "West of Neitiznot, near the bridge.")
|
.put(new WorldPoint(2316, 3814, 0), "West of Neitiznot, near the bridge.")
|
||||||
|
.put(new WorldPoint(2872, 3937, 0), "Weiss.")
|
||||||
// Master
|
// Master
|
||||||
.put(new WorldPoint(2178, 3209, 0), "South of Elf Camp.")
|
.put(new WorldPoint(2178, 3209, 0), "South of Elf Camp.")
|
||||||
.put(new WorldPoint(2155, 3100, 0), "South of Port Tyras (BJS).")
|
.put(new WorldPoint(2155, 3100, 0), "South of Port Tyras (BJS).")
|
||||||
@@ -181,7 +182,7 @@ public class CoordinateClue extends ClueScroll implements TextClueScroll, Locati
|
|||||||
.put(new WorldPoint(3085, 3569, 0), "Wilderness. Obelisk of Air.")
|
.put(new WorldPoint(3085, 3569, 0), "Wilderness. Obelisk of Air.")
|
||||||
.put(new WorldPoint(2934, 2727, 0), "Eastern shore of Crash Island.")
|
.put(new WorldPoint(2934, 2727, 0), "Eastern shore of Crash Island.")
|
||||||
.put(new WorldPoint(1451, 3695, 0), "West side of Lizardman Canyon with Lizardman shaman.")
|
.put(new WorldPoint(1451, 3695, 0), "West side of Lizardman Canyon with Lizardman shaman.")
|
||||||
.put(new WorldPoint(2538, 3739, 0), "Waterbirth Island.")
|
.put(new WorldPoint(2538, 3739, 0), "Waterbirth Island. Bring a pet rock and rune thrownaxe.")
|
||||||
.put(new WorldPoint(1698, 3792, 0), "Arceuus church.")
|
.put(new WorldPoint(1698, 3792, 0), "Arceuus church.")
|
||||||
.put(new WorldPoint(2951, 3820, 0), "Wilderness. Chaos Temple (level 38).")
|
.put(new WorldPoint(2951, 3820, 0), "Wilderness. Chaos Temple (level 38).")
|
||||||
.put(new WorldPoint(2202, 3825, 0), "Pirates' Cove, between Lunar Isle and Rellekka.")
|
.put(new WorldPoint(2202, 3825, 0), "Pirates' Cove, between Lunar Isle and Rellekka.")
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ enum DiscordGameEventType
|
|||||||
TRAINING_COOKING(Skill.COOKING),
|
TRAINING_COOKING(Skill.COOKING),
|
||||||
TRAINING_WOODCUTTING(Skill.WOODCUTTING),
|
TRAINING_WOODCUTTING(Skill.WOODCUTTING),
|
||||||
TRAINING_FLETCHING(Skill.FLETCHING),
|
TRAINING_FLETCHING(Skill.FLETCHING),
|
||||||
TRAINING_FISHING(Skill.FISHING),
|
TRAINING_FISHING(Skill.FISHING, 1),
|
||||||
TRAINING_FIREMAKING(Skill.FIREMAKING),
|
TRAINING_FIREMAKING(Skill.FIREMAKING),
|
||||||
TRAINING_CRAFTING(Skill.CRAFTING),
|
TRAINING_CRAFTING(Skill.CRAFTING),
|
||||||
TRAINING_SMITHING(Skill.SMITHING),
|
TRAINING_SMITHING(Skill.SMITHING),
|
||||||
|
|||||||
@@ -107,7 +107,10 @@ class KeyRemappingListener extends MouseAdapter implements KeyListener
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.fkeyRemap())
|
// In addition to the above checks, the F-key remapping shouldn't
|
||||||
|
// activate when dialogs are open which listen for number keys
|
||||||
|
// to select options
|
||||||
|
if (config.fkeyRemap() && !plugin.isDialogOpen())
|
||||||
{
|
{
|
||||||
if (ONE.matches(e))
|
if (ONE.matches(e))
|
||||||
{
|
{
|
||||||
@@ -188,23 +191,18 @@ class KeyRemappingListener extends MouseAdapter implements KeyListener
|
|||||||
switch (e.getKeyCode())
|
switch (e.getKeyCode())
|
||||||
{
|
{
|
||||||
case KeyEvent.VK_ENTER:
|
case KeyEvent.VK_ENTER:
|
||||||
|
case KeyEvent.VK_ESCAPE:
|
||||||
plugin.setTyping(false);
|
plugin.setTyping(false);
|
||||||
clientThread.invoke(plugin::lockChat);
|
clientThread.invoke(plugin::lockChat);
|
||||||
break;
|
break;
|
||||||
case KeyEvent.VK_ESCAPE:
|
|
||||||
plugin.setTyping(false);
|
|
||||||
clientThread.invoke(() ->
|
|
||||||
{
|
|
||||||
client.setVar(VarClientStr.CHATBOX_TYPED_TEXT, "");
|
|
||||||
plugin.lockChat();
|
|
||||||
});
|
|
||||||
break;
|
|
||||||
case KeyEvent.VK_BACK_SPACE:
|
case KeyEvent.VK_BACK_SPACE:
|
||||||
|
// Only lock chat on backspace when the typed text is now empty
|
||||||
if (Strings.isNullOrEmpty(client.getVar(VarClientStr.CHATBOX_TYPED_TEXT)))
|
if (Strings.isNullOrEmpty(client.getVar(VarClientStr.CHATBOX_TYPED_TEXT)))
|
||||||
{
|
{
|
||||||
plugin.setTyping(false);
|
plugin.setTyping(false);
|
||||||
clientThread.invoke(plugin::lockChat);
|
clientThread.invoke(plugin::lockChat);
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -135,6 +135,26 @@ public class KeyRemappingPlugin extends Plugin
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a dialog is open that will grab numerical input, to prevent F-key remapping
|
||||||
|
* from triggering.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
boolean isDialogOpen()
|
||||||
|
{
|
||||||
|
// Most chat dialogs with numerical input are added without the chatbox or its key listener being removed,
|
||||||
|
// so chatboxFocused() is true. The chatbox onkey script uses the following logic to ignore key presses,
|
||||||
|
// so we will use it too to not remap F-keys.
|
||||||
|
return isHidden(WidgetInfo.CHATBOX_MESSAGES) || isHidden(WidgetInfo.CHATBOX_TRANSPARENT_LINES);
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isHidden(WidgetInfo widgetInfo)
|
||||||
|
{
|
||||||
|
Widget w = client.getWidget(widgetInfo);
|
||||||
|
return w == null || w.isSelfHidden();
|
||||||
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
public void onScriptCallbackEvent(ScriptCallbackEvent scriptCallbackEvent)
|
public void onScriptCallbackEvent(ScriptCallbackEvent scriptCallbackEvent)
|
||||||
{
|
{
|
||||||
@@ -163,31 +183,25 @@ public class KeyRemappingPlugin extends Plugin
|
|||||||
|
|
||||||
void lockChat()
|
void lockChat()
|
||||||
{
|
{
|
||||||
Widget chatboxParent = client.getWidget(WidgetInfo.CHATBOX_PARENT);
|
Widget chatboxInput = client.getWidget(WidgetInfo.CHATBOX_INPUT);
|
||||||
if (chatboxParent != null && chatboxParent.getOnKeyListener() != null)
|
if (chatboxInput != null)
|
||||||
{
|
{
|
||||||
Widget chatboxInput = client.getWidget(WidgetInfo.CHATBOX_INPUT);
|
chatboxInput.setText(getPlayerNameWithIcon() + ": " + PRESS_ENTER_TO_CHAT);
|
||||||
if (chatboxInput != null)
|
// Typed text can be non-empty on plugin start, so clear it now
|
||||||
{
|
client.setVar(VarClientStr.CHATBOX_TYPED_TEXT, "");
|
||||||
chatboxInput.setText(getPlayerNameWithIcon() + ": " + PRESS_ENTER_TO_CHAT);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void unlockChat()
|
void unlockChat()
|
||||||
{
|
{
|
||||||
Widget chatboxParent = client.getWidget(WidgetInfo.CHATBOX_PARENT);
|
Widget chatboxInput = client.getWidget(WidgetInfo.CHATBOX_INPUT);
|
||||||
if (chatboxParent != null)
|
if (chatboxInput != null)
|
||||||
{
|
{
|
||||||
Widget chatboxInput = client.getWidget(WidgetInfo.CHATBOX_INPUT);
|
if (client.getGameState() == GameState.LOGGED_IN)
|
||||||
if (chatboxInput != null)
|
|
||||||
{
|
{
|
||||||
if (client.getGameState() == GameState.LOGGED_IN)
|
final boolean isChatboxTransparent = client.isResized() && client.getVar(Varbits.TRANSPARENT_CHATBOX) == 1;
|
||||||
{
|
final Color textColor = isChatboxTransparent ? JagexColors.CHAT_TYPED_TEXT_TRANSPARENT_BACKGROUND : JagexColors.CHAT_TYPED_TEXT_OPAQUE_BACKGROUND;
|
||||||
final boolean isChatboxTransparent = client.isResized() && client.getVar(Varbits.TRANSPARENT_CHATBOX) == 1;
|
chatboxInput.setText(getPlayerNameWithIcon() + ": " + ColorUtil.wrapWithColorTag(client.getVar(VarClientStr.CHATBOX_TYPED_TEXT) + "*", textColor));
|
||||||
final Color textColor = isChatboxTransparent ? JagexColors.CHAT_TYPED_TEXT_TRANSPARENT_BACKGROUND : JagexColors.CHAT_TYPED_TEXT_OPAQUE_BACKGROUND;
|
|
||||||
chatboxInput.setText(getPlayerNameWithIcon() + ": " + ColorUtil.wrapWithColorTag(client.getVar(VarClientStr.CHATBOX_TYPED_TEXT) + "*", textColor));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,6 +43,8 @@ import static net.runelite.api.ObjectID.ROCKS_11374;
|
|||||||
import static net.runelite.api.ObjectID.ROCKS_11375;
|
import static net.runelite.api.ObjectID.ROCKS_11375;
|
||||||
import static net.runelite.api.ObjectID.ROCKS_11376;
|
import static net.runelite.api.ObjectID.ROCKS_11376;
|
||||||
import static net.runelite.api.ObjectID.ROCKS_11377;
|
import static net.runelite.api.ObjectID.ROCKS_11377;
|
||||||
|
import static net.runelite.api.ObjectID.ROCKS_11386;
|
||||||
|
import static net.runelite.api.ObjectID.ROCKS_11387;
|
||||||
|
|
||||||
enum Rock
|
enum Rock
|
||||||
{
|
{
|
||||||
@@ -65,7 +67,9 @@ enum Rock
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
SILVER(Duration.ofMinutes(1), ROCKS_11369),
|
SILVER(Duration.ofMinutes(1), ROCKS_11369),
|
||||||
|
SANDSTONE(Duration.ofMillis(5400), ROCKS_11386),
|
||||||
GOLD(Duration.ofMinutes(1), ROCKS_11370, ROCKS_11371),
|
GOLD(Duration.ofMinutes(1), ROCKS_11370, ROCKS_11371),
|
||||||
|
GRANITE(Duration.ofMillis(5400), ROCKS_11387),
|
||||||
MITHRIL(Duration.ofMinutes(2), ROCKS_11372, ROCKS_11373)
|
MITHRIL(Duration.ofMinutes(2), ROCKS_11372, ROCKS_11373)
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -322,8 +322,11 @@ LABEL241:
|
|||||||
iconst 0 ;
|
iconst 0 ;
|
||||||
sconst "blockChatInput" ;
|
sconst "blockChatInput" ;
|
||||||
runelite_callback ;
|
runelite_callback ;
|
||||||
if_icmpeq LABEL247 ; don't add to input varcstr
|
if_icmpeq SKIPSETVARC ; skip setting varc with input
|
||||||
set_varc_string 335
|
set_varc_string 335
|
||||||
|
jump LABEL247 ; jump over SKIPSETVARC
|
||||||
|
SKIPSETVARC:
|
||||||
|
pop_string ; pop message
|
||||||
LABEL247:
|
LABEL247:
|
||||||
invoke 223
|
invoke 223
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -76,6 +76,9 @@ public abstract class RSTileMixin implements RSTile
|
|||||||
@Shadow("clientInstance")
|
@Shadow("clientInstance")
|
||||||
private static RSClient client;
|
private static RSClient client;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private static RSGameObject lastGameObject;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private static RSDeque[][][] lastGroundItems = new RSDeque[Constants.MAX_Z][Constants.SCENE_SIZE][Constants.SCENE_SIZE];
|
private static RSDeque[][][] lastGroundItems = new RSDeque[Constants.MAX_Z][Constants.SCENE_SIZE][Constants.SCENE_SIZE];
|
||||||
|
|
||||||
@@ -234,12 +237,26 @@ public abstract class RSTileMixin implements RSTile
|
|||||||
// Update previous object to current
|
// Update previous object to current
|
||||||
previousGameObjects[idx] = current;
|
previousGameObjects[idx] = current;
|
||||||
|
|
||||||
|
// Last game object
|
||||||
|
RSGameObject last = lastGameObject;
|
||||||
|
|
||||||
|
// Update last game object
|
||||||
|
lastGameObject = current;
|
||||||
|
|
||||||
// Duplicate event, return
|
// Duplicate event, return
|
||||||
if (current == previous)
|
if (current == previous)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (current != null && current == last)
|
||||||
|
{
|
||||||
|
// When >1 tile objects are added to the scene, the same GameObject is added to
|
||||||
|
// multiple tiles. We keep lastGameObject to prevent duplicate spawn events from
|
||||||
|
// firing for these objects.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// actors, projectiles, and graphics objects are added and removed from the scene each frame as GameObjects,
|
// actors, projectiles, and graphics objects are added and removed from the scene each frame as GameObjects,
|
||||||
// so ignore them.
|
// so ignore them.
|
||||||
boolean currentInvalid = false, prevInvalid = false;
|
boolean currentInvalid = false, prevInvalid = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user