screenshot plugin: rename "raids" to "chambers of xeric"
Co-authored-by: Magic fTail <runecnielsen3132@gmail.com>
This commit is contained in:
@@ -91,7 +91,7 @@ public class WidgetID
|
|||||||
public static final int BLAST_FURNACE_GROUP_ID = 474;
|
public static final int BLAST_FURNACE_GROUP_ID = 474;
|
||||||
public static final int WORLD_MAP_GROUP_ID = 595;
|
public static final int WORLD_MAP_GROUP_ID = 595;
|
||||||
public static final int PYRAMID_PLUNDER_GROUP_ID = 428;
|
public static final int PYRAMID_PLUNDER_GROUP_ID = 428;
|
||||||
public static final int RAIDS_REWARD_GROUP_ID = 539;
|
public static final int CHAMBERS_OF_XERIC_REWARD_GROUP_ID = 539;
|
||||||
public static final int EXPERIENCE_TRACKER_GROUP_ID = 122;
|
public static final int EXPERIENCE_TRACKER_GROUP_ID = 122;
|
||||||
public static final int TITHE_FARM_GROUP_ID = 241;
|
public static final int TITHE_FARM_GROUP_ID = 241;
|
||||||
public static final int KINGDOM_GROUP_ID = 392;
|
public static final int KINGDOM_GROUP_ID = 392;
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ import net.runelite.api.events.ChatMessage;
|
|||||||
import net.runelite.api.events.WidgetLoaded;
|
import net.runelite.api.events.WidgetLoaded;
|
||||||
import net.runelite.api.widgets.Widget;
|
import net.runelite.api.widgets.Widget;
|
||||||
import static net.runelite.api.widgets.WidgetID.BARROWS_REWARD_GROUP_ID;
|
import static net.runelite.api.widgets.WidgetID.BARROWS_REWARD_GROUP_ID;
|
||||||
import static net.runelite.api.widgets.WidgetID.RAIDS_REWARD_GROUP_ID;
|
import static net.runelite.api.widgets.WidgetID.CHAMBERS_OF_XERIC_REWARD_GROUP_ID;
|
||||||
import static net.runelite.api.widgets.WidgetID.CLUE_SCROLL_REWARD_GROUP_ID;
|
import static net.runelite.api.widgets.WidgetID.CLUE_SCROLL_REWARD_GROUP_ID;
|
||||||
import static net.runelite.api.widgets.WidgetID.DIALOG_SPRITE_GROUP_ID;
|
import static net.runelite.api.widgets.WidgetID.DIALOG_SPRITE_GROUP_ID;
|
||||||
import static net.runelite.api.widgets.WidgetID.KINGDOM_GROUP_ID;
|
import static net.runelite.api.widgets.WidgetID.KINGDOM_GROUP_ID;
|
||||||
@@ -131,7 +131,7 @@ public class ScreenshotPlugin extends Plugin
|
|||||||
|
|
||||||
private Integer barrowsNumber;
|
private Integer barrowsNumber;
|
||||||
|
|
||||||
private Integer raidsNumber;
|
private Integer chambersOfXericNumber;
|
||||||
|
|
||||||
private boolean shouldTakeScreenshot;
|
private boolean shouldTakeScreenshot;
|
||||||
|
|
||||||
@@ -302,7 +302,7 @@ public class ScreenshotPlugin extends Plugin
|
|||||||
Matcher m = NUMBER_PATTERN.matcher(Text.removeTags(chatMessage));
|
Matcher m = NUMBER_PATTERN.matcher(Text.removeTags(chatMessage));
|
||||||
if (m.find())
|
if (m.find())
|
||||||
{
|
{
|
||||||
raidsNumber = Integer.valueOf(m.group());
|
chambersOfXericNumber = Integer.valueOf(m.group());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -330,7 +330,7 @@ public class ScreenshotPlugin extends Plugin
|
|||||||
{
|
{
|
||||||
case QUEST_COMPLETED_GROUP_ID:
|
case QUEST_COMPLETED_GROUP_ID:
|
||||||
case CLUE_SCROLL_REWARD_GROUP_ID:
|
case CLUE_SCROLL_REWARD_GROUP_ID:
|
||||||
case RAIDS_REWARD_GROUP_ID:
|
case CHAMBERS_OF_XERIC_REWARD_GROUP_ID:
|
||||||
case BARROWS_REWARD_GROUP_ID:
|
case BARROWS_REWARD_GROUP_ID:
|
||||||
if (!config.screenshotRewards())
|
if (!config.screenshotRewards())
|
||||||
{
|
{
|
||||||
@@ -360,15 +360,15 @@ public class ScreenshotPlugin extends Plugin
|
|||||||
takeScreenshot(fileName);
|
takeScreenshot(fileName);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case RAIDS_REWARD_GROUP_ID:
|
case CHAMBERS_OF_XERIC_REWARD_GROUP_ID:
|
||||||
{
|
{
|
||||||
if (raidsNumber == null)
|
if (chambersOfXericNumber == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
fileName = "Chambers of Xeric(" + raidsNumber + ")";
|
fileName = "Chambers of Xeric(" + chambersOfXericNumber + ")";
|
||||||
raidsNumber = null;
|
chambersOfXericNumber = null;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case BARROWS_REWARD_GROUP_ID:
|
case BARROWS_REWARD_GROUP_ID:
|
||||||
@@ -592,8 +592,8 @@ public class ScreenshotPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
int getRaidsNumber()
|
int getChambersOfXericNumber()
|
||||||
{
|
{
|
||||||
return raidsNumber;
|
return chambersOfXericNumber;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ public class ScreenshotPluginTest
|
|||||||
{
|
{
|
||||||
private static final String CLUE_SCROLL = "<col=3300ff>You have completed 28 medium Treasure Trails</col>";
|
private static final String CLUE_SCROLL = "<col=3300ff>You have completed 28 medium Treasure Trails</col>";
|
||||||
private static final String BARROWS_CHEST = "Your Barrows chest count is <col=ff0000>310</col>";
|
private static final String BARROWS_CHEST = "Your Barrows chest count is <col=ff0000>310</col>";
|
||||||
private static final String RAIDS_CHEST = "Your completed Chambers of Xeric count is: <col=ff0000>489</col>.";
|
private static final String CHAMBERS_OF_XERIC_CHEST = "Your completed Chambers of Xeric count is: <col=ff0000>489</col>.";
|
||||||
|
|
||||||
@Mock
|
@Mock
|
||||||
@Bind
|
@Bind
|
||||||
@@ -124,10 +124,10 @@ public class ScreenshotPluginTest
|
|||||||
@Test
|
@Test
|
||||||
public void testChambersOfXericChest()
|
public void testChambersOfXericChest()
|
||||||
{
|
{
|
||||||
ChatMessage chatMessageEvent = new ChatMessage(SERVER, "Seth", RAIDS_CHEST, null);
|
ChatMessage chatMessageEvent = new ChatMessage(SERVER, "Seth", CHAMBERS_OF_XERIC_CHEST, null);
|
||||||
screenshotPlugin.onChatMessage(chatMessageEvent);
|
screenshotPlugin.onChatMessage(chatMessageEvent);
|
||||||
|
|
||||||
assertEquals(489, screenshotPlugin.getRaidsNumber());
|
assertEquals(489, screenshotPlugin.getChambersOfXericNumber());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
Reference in New Issue
Block a user