Merge remote-tracking branch 'runelite/master'
This commit is contained in:
@@ -83,7 +83,7 @@ public class ItemChargePlugin extends Plugin
|
||||
private static final Pattern BINDING_CHECK_PATTERN = Pattern.compile(
|
||||
"You have ([0-9]+|one) charges? left before your Binding necklace disintegrates\\.");
|
||||
private static final Pattern BINDING_USED_PATTERN = Pattern.compile(
|
||||
"You bind the temple's power into (mud|lava|steam|dust|smoke|mist) runes\\.");
|
||||
"You (partially succeed to )?bind the temple's power into (mud|lava|steam|dust|smoke|mist) runes\\.");
|
||||
private static final String BINDING_BREAK_TEXT = "Your Binding necklace has disintegrated.";
|
||||
private static final Pattern RING_OF_FORGING_CHECK_PATTERN = Pattern.compile(
|
||||
"You can smelt ([0-9]+|one) more pieces? of iron ore before a ring melts\\.");
|
||||
@@ -303,7 +303,11 @@ public class ItemChargePlugin extends Plugin
|
||||
}
|
||||
else if (bindingNecklaceUsedMatcher.find())
|
||||
{
|
||||
updateBindingNecklaceCharges(getItemCharges(ItemChargeConfig.KEY_BINDING_NECKLACE) - 1);
|
||||
final ItemContainer equipment = client.getItemContainer(InventoryID.EQUIPMENT);
|
||||
if (equipment.contains(ItemID.BINDING_NECKLACE))
|
||||
{
|
||||
updateBindingNecklaceCharges(getItemCharges(ItemChargeConfig.KEY_BINDING_NECKLACE) - 1);
|
||||
}
|
||||
}
|
||||
else if (bindingNecklaceCheckMatcher.find())
|
||||
{
|
||||
|
||||
@@ -71,7 +71,7 @@ class AbyssMinimapOverlay extends Overlay
|
||||
for (DecorativeObject object : plugin.getAbyssObjects())
|
||||
{
|
||||
AbyssRifts rift = AbyssRifts.getRift(object.getId());
|
||||
if (rift == null || !plugin.getRifts().contains(rift))
|
||||
if (rift == null || !rift.getConfigEnabled().test(config))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ class AbyssOverlay extends Overlay
|
||||
private void renderRift(Graphics2D graphics, DecorativeObject object)
|
||||
{
|
||||
AbyssRifts rift = AbyssRifts.getRift(object.getId());
|
||||
if (rift == null || !plugin.getRifts().contains(rift))
|
||||
if (rift == null || !rift.getConfigEnabled().test(config))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -42,13 +42,14 @@ import static net.runelite.api.ItemID.MIND_RUNE;
|
||||
import static net.runelite.api.ItemID.NATURE_RUNE;
|
||||
import static net.runelite.api.ItemID.SOUL_RUNE;
|
||||
import static net.runelite.api.ItemID.WATER_RUNE;
|
||||
import net.runelite.api.NullObjectID;
|
||||
import net.runelite.api.ObjectID;
|
||||
|
||||
@AllArgsConstructor
|
||||
enum AbyssRifts
|
||||
{
|
||||
AIR_RIFT(ObjectID.AIR_RIFT, AIR_RUNE, RunecraftConfig::showAir),
|
||||
BLOOD_RIFT(ObjectID.BLOOD_RIFT, BLOOD_RUNE, RunecraftConfig::showBlood),
|
||||
BLOOD_RIFT(NullObjectID.NULL_43848, BLOOD_RUNE, RunecraftConfig::showBlood),
|
||||
BODY_RIFT(ObjectID.BODY_RIFT, BODY_RUNE, RunecraftConfig::showBody),
|
||||
CHAOS_RIFT(ObjectID.CHAOS_RIFT, CHAOS_RUNE, RunecraftConfig::showChaos),
|
||||
COSMIC_RIFT(ObjectID.COSMIC_RIFT, COSMIC_RUNE, RunecraftConfig::showCosmic),
|
||||
|
||||
@@ -27,7 +27,6 @@ package net.runelite.client.plugins.runecraft;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.inject.Provides;
|
||||
import java.awt.Color;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
@@ -52,7 +51,6 @@ import net.runelite.api.events.ItemContainerChanged;
|
||||
import net.runelite.client.Notifier;
|
||||
import net.runelite.client.config.ConfigManager;
|
||||
import net.runelite.client.eventbus.Subscribe;
|
||||
import net.runelite.client.events.ConfigChanged;
|
||||
import net.runelite.client.game.npcoverlay.HighlightedNpc;
|
||||
import net.runelite.client.game.npcoverlay.NpcOverlayService;
|
||||
import net.runelite.client.plugins.Plugin;
|
||||
@@ -77,9 +75,6 @@ public class RunecraftPlugin extends Plugin
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
private final Set<DecorativeObject> abyssObjects = new HashSet<>();
|
||||
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
private final Set<AbyssRifts> rifts = new HashSet<>();
|
||||
|
||||
private boolean degradedPouchInInventory;
|
||||
|
||||
@Inject
|
||||
@@ -114,7 +109,6 @@ public class RunecraftPlugin extends Plugin
|
||||
npcOverlayService.registerHighlighter(highlightDarkMage);
|
||||
overlayManager.add(abyssOverlay);
|
||||
overlayManager.add(abyssMinimapOverlay);
|
||||
updateRifts();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -127,15 +121,6 @@ public class RunecraftPlugin extends Plugin
|
||||
degradedPouchInInventory = false;
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onConfigChanged(ConfigChanged event)
|
||||
{
|
||||
if (event.getGroup().equals(RunecraftConfig.GROUP))
|
||||
{
|
||||
updateRifts();
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onChatMessage(ChatMessage event)
|
||||
{
|
||||
@@ -205,12 +190,4 @@ public class RunecraftPlugin extends Plugin
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private void updateRifts()
|
||||
{
|
||||
rifts.clear();
|
||||
Arrays.stream(AbyssRifts.values())
|
||||
.filter(r -> r.getConfigEnabled().test(config))
|
||||
.forEach(rifts::add);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user