aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/de/cowtipper/cowlection
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/de/cowtipper/cowlection')
-rw-r--r--src/main/java/de/cowtipper/cowlection/config/MooConfig.java12
-rw-r--r--src/main/java/de/cowtipper/cowlection/listener/skyblock/DungeonsListener.java15
2 files changed, 22 insertions, 5 deletions
diff --git a/src/main/java/de/cowtipper/cowlection/config/MooConfig.java b/src/main/java/de/cowtipper/cowlection/config/MooConfig.java
index a19218e..d23592b 100644
--- a/src/main/java/de/cowtipper/cowlection/config/MooConfig.java
+++ b/src/main/java/de/cowtipper/cowlection/config/MooConfig.java
@@ -100,6 +100,7 @@ public class MooConfig {
public static boolean dungPartyFullLookup;
public static boolean dungPartyFinderPartyLookup;
public static boolean dungPartiesSize;
+ public static int dungDungeonReqMin;
public static int dungClassMin;
private static String dungMarkPartiesWithCarry;
private static String dungMarkPartiesWithHyperion;
@@ -524,8 +525,10 @@ public class MooConfig {
"Marks parties...",
" ‣ you cannot join: " + EnumChatFormatting.RED + "⬛",
" ‣ that do not meet all your criteria: " + EnumChatFormatting.GOLD + "⬛",
+ " ‣ with \"Dungeon Level Required\" below a certain level " + EnumChatFormatting.GRAY + "(if present)" + EnumChatFormatting.RESET + ": " + EnumChatFormatting.DARK_RED + EnumChatFormatting.BOLD + "ᐯ" + EnumChatFormatting.RESET,
" ‣ with someone below a certain class level: " + EnumChatFormatting.RED + EnumChatFormatting.BOLD + "ᐯ" + EnumChatFormatting.RESET,
- " ‣ with duplicated roles you specify below: " + EnumChatFormatting.GOLD + "²⁺",
+ " ‣ with duplicated roles you specify: " + EnumChatFormatting.GOLD + "²⁺",
+ " ‣ with someone with a role you specify: " + EnumChatFormatting.GRAY + "e.g. " + EnumChatFormatting.WHITE + "H " + EnumChatFormatting.GRAY + "(class' 1ˢᵗ letter)",
" ‣ that match your criteria: " + EnumChatFormatting.GREEN + "⬛");
Property propDungPartyFinderPlayerLookup = subCat.addConfigEntry(cfg.get(configCat.getConfigName(),
@@ -541,6 +544,11 @@ public class MooConfig {
"dungPartiesSize", true, "Show size of parties?"),
new MooConfigPreview(new MooChatComponent("Marked with: " + EnumChatFormatting.WHITE + "1 - 4").gray()));
+ Property propDungDungeonReqMin = subCat.addConfigEntry(cfg.get(configCat.getConfigName(),
+ "dungDungeonReqMin", 0, "Marks parties with lower Dungeon level req than this value")
+ .setMinValue(0).setMaxValue(50),
+ new MooConfigPreview(new MooChatComponent("Marked with: " + EnumChatFormatting.DARK_RED + EnumChatFormatting.BOLD + "ᐯ").gray()));
+
Property propDungClassMin = subCat.addConfigEntry(cfg.get(configCat.getConfigName(),
"dungClassMin", 0, "Marks parties with members with lower class level than this value")
.setMinValue(0).setMaxValue(50),
@@ -634,6 +642,7 @@ public class MooConfig {
dungPartyFullLookup = propDungPartyFullLookup.getBoolean();
dungPartyFinderPartyLookup = propDungPartyFinderPartyLookup.getBoolean();
dungPartiesSize = propDungPartiesSize.getBoolean();
+ dungDungeonReqMin = propDungDungeonReqMin.getInt();
dungClassMin = propDungClassMin.getInt();
dungMarkPartiesWithCarry = propDungMarkPartiesWithCarry.getString();
dungMarkPartiesWithHyperion = propDungMarkPartiesWithHyperion.getString();
@@ -704,6 +713,7 @@ public class MooConfig {
propDungPartyFullLookup.set(dungPartyFullLookup);
propDungPartyFinderPartyLookup.set(dungPartyFinderPartyLookup);
propDungPartiesSize.set(dungPartiesSize);
+ propDungDungeonReqMin.set(dungDungeonReqMin);
propDungClassMin.set(dungClassMin);
propDungMarkPartiesWithCarry.set(dungMarkPartiesWithCarry);
propDungMarkPartiesWithHyperion.set(dungMarkPartiesWithHyperion);
diff --git a/src/main/java/de/cowtipper/cowlection/listener/skyblock/DungeonsListener.java b/src/main/java/de/cowtipper/cowlection/listener/skyblock/DungeonsListener.java
index deb4385..5ae3846 100644
--- a/src/main/java/de/cowtipper/cowlection/listener/skyblock/DungeonsListener.java
+++ b/src/main/java/de/cowtipper/cowlection/listener/skyblock/DungeonsListener.java
@@ -307,6 +307,7 @@ public class DungeonsListener {
int partySize = 5;
boolean memberTooLowLevel = false;
+ boolean partyReqTooLowLevel = false;
String middleText = null;
for (String toolTipLine : itemTooltip) {
@@ -328,6 +329,7 @@ public class DungeonsListener {
String partyNote = toolTipLineWithoutFormatting.toLowerCase();
DataHelper.PartyType partyTypeCarry = MooConfig.getDungPartyFinderMarkCarry();
DataHelper.PartyType partyTypeHyperion = MooConfig.getDungPartyFinderMarkHyperion();
+ // TODO make trigger words in party notes configurable
if (partyTypeCarry != DataHelper.PartyType.NONE && (partyNote.contains("carry") || partyNote.contains("carries"))) {
partyType = partyTypeCarry;
if (partyTypeCarry != DataHelper.PartyType.UNJOINABLE) {
@@ -339,6 +341,11 @@ public class DungeonsListener {
middleText = "hyper";
}
}
+ } else if (toolTipLineWithoutFormatting.startsWith("Dungeon Level Required: ")) {
+ int minDungLevelReq = MathHelper.parseIntWithDefault(toolTipLineWithoutFormatting.substring(toolTipLineWithoutFormatting.lastIndexOf(' ') + 1), 100);
+ if (minDungLevelReq < MooConfig.dungDungeonReqMin) {
+ partyReqTooLowLevel = true;
+ }
}
}
FontRenderer font = Minecraft.getMinecraft().fontRendererObj;
@@ -351,12 +358,12 @@ public class DungeonsListener {
GlStateManager.popMatrix();
}
if (partyType != DataHelper.PartyType.UNJOINABLE) {
- if (memberTooLowLevel) {
- // at least one party member is lower than the min class level
+ if (memberTooLowLevel || partyReqTooLowLevel) {
+ // at least one party member is lower than the min class level or party min Dungeon level req is too low
partyType = DataHelper.PartyType.UNIDEAL;
GlStateManager.pushMatrix();
GlStateManager.translate(0, 0, 280);
- font.drawStringWithShadow(EnumChatFormatting.BOLD + "ᐯ", x + 1, y + 8, new Color(220, 20, 20, 255).getRGB());
+ font.drawStringWithShadow(EnumChatFormatting.BOLD + "ᐯ", x + 1, y + 8, partyReqTooLowLevel ? new Color(170, 0, 0).getRGB() : new Color(220, 20, 20, 255).getRGB());
GlStateManager.popMatrix();
}
StringBuilder unwantedClasses = new StringBuilder();
@@ -394,7 +401,7 @@ public class DungeonsListener {
GlStateManager.scale(scaleFactor, scaleFactor, 0);
font.drawStringWithShadow(badClasses.toString(), (float) (x / scaleFactor), (float) (y / scaleFactor), new Color(255, 170, 0, 255).getRGB());
GlStateManager.popMatrix();
- } else if (!memberTooLowLevel && middleText == null) {
+ } else if (!memberTooLowLevel && !partyReqTooLowLevel && middleText == null) {
// party matches our criteria!
partyType = DataHelper.PartyType.SUITABLE;
}