aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLorenz <lo.scherf@gmail.com>2022-08-10 20:23:59 +0200
committerLorenz <lo.scherf@gmail.com>2022-08-10 20:23:59 +0200
commitb4a8874d034c441682c589956fcc56105d8445a8 (patch)
tree42b741156c72cf9f89e05de010690ce042aa34c6
parentc98a358089cde2928b376cf8c80d932cd1587a4c (diff)
downloadNotEnoughUpdates-b4a8874d034c441682c589956fcc56105d8445a8.tar.gz
NotEnoughUpdates-b4a8874d034c441682c589956fcc56105d8445a8.tar.bz2
NotEnoughUpdates-b4a8874d034c441682c589956fcc56105d8445a8.zip
finalised requirements design
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/loaders/repo/MinionHelperRepoLoader.java4
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/render/MinionHelperOverlayHover.java12
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/requirements/CollectionRequirement.java4
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/requirements/CustomRequirement.java2
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/requirements/MinionRequirement.java2
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/requirements/ReputationRequirement.java6
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/requirements/SlayerRequirement.java4
7 files changed, 17 insertions, 17 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/loaders/repo/MinionHelperRepoLoader.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/loaders/repo/MinionHelperRepoLoader.java
index 2eed2958..857d206c 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/loaders/repo/MinionHelperRepoLoader.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/loaders/repo/MinionHelperRepoLoader.java
@@ -116,9 +116,9 @@ public class MinionHelperRepoLoader {
}
manager.getMinionById("FLOWER_GENERATOR_1").getRequirements().add(new CustomRequirement(
- "Buy a Flower Minion 1 from Dark Auction"));
+ "Buy a §cFlower Minion 1 §7from Dark Auction"));
manager.getMinionById("SNOW_GENERATOR_1").getRequirements().add(new CustomRequirement(
- "Get a Snow Minion 1 from opening gifts"));
+ "Get a §cSnow Minion 1 §7from opening gifts"));
}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/render/MinionHelperOverlayHover.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/render/MinionHelperOverlayHover.java
index cc3a580a..020351ca 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/render/MinionHelperOverlayHover.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/render/MinionHelperOverlayHover.java
@@ -137,20 +137,20 @@ public class MinionHelperOverlayHover {
}
private String getRequirementDescription(Minion minion, MinionRequirement requirement) {
- //TODO maybe change the §7 color
boolean meetRequirement = manager.getRequirementsManager().meetRequirement(minion, requirement);
- String color = meetRequirement ? "§a" : "§7";
+ String color = meetRequirement ? "§a" : "§c";
+
+ String description = requirement.printDescription(color);
if (requirement instanceof CollectionRequirement && manager.getApi().isCollectionApiDisabled()) {
- color = "§cAPI DISABLED! §7";
+ description += " §cAPI DISABLED! §7";
}
- String description = requirement.printDescription();
if (!meetRequirement) {
if (requirement instanceof ReputationRequirement) {
ReputationRequirement reputationRequirement = (ReputationRequirement) requirement;
String reputationType = reputationRequirement.getReputationType();
ApiData apiData = manager.getApi().getApiData();
- int having = 0;
+ int having;
if (reputationType.equals("BARBARIAN")) {
having = apiData.getBarbariansReputation();
} else if (reputationType.equals("MAGE")) {
@@ -169,7 +169,7 @@ public class MinionHelperOverlayHover {
}
}
- return " §8- " + color + description;
+ return " §8- §7" + description;
}
private void formatItems(List<String> lines, Map<String, Integer> allItems) {
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/requirements/CollectionRequirement.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/requirements/CollectionRequirement.java
index 603834f8..c01386e1 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/requirements/CollectionRequirement.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/requirements/CollectionRequirement.java
@@ -38,7 +38,7 @@ public class CollectionRequirement extends MinionRequirement {
}
@Override
- public String printDescription() {
- return "Collection: " + collection + " level " + level;
+ public String printDescription(String color) {
+ return "Collection: " + color + collection + " level " + level;
}
}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/requirements/CustomRequirement.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/requirements/CustomRequirement.java
index 2755e4ad..93174f03 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/requirements/CustomRequirement.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/requirements/CustomRequirement.java
@@ -27,7 +27,7 @@ public class CustomRequirement extends MinionRequirement {
this.text = text;
}
@Override
- public String printDescription() {
+ public String printDescription(String color) {
return text;
}
}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/requirements/MinionRequirement.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/requirements/MinionRequirement.java
index 763428df..9dd3fe09 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/requirements/MinionRequirement.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/requirements/MinionRequirement.java
@@ -20,5 +20,5 @@
package io.github.moulberry.notenoughupdates.miscgui.minionhelper.requirements;
public abstract class MinionRequirement {
- public abstract String printDescription();
+ public abstract String printDescription(String color);
}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/requirements/ReputationRequirement.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/requirements/ReputationRequirement.java
index 525af1df..70d1e5fc 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/requirements/ReputationRequirement.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/requirements/ReputationRequirement.java
@@ -33,7 +33,7 @@ public class ReputationRequirement extends MinionRequirement {
this.reputation = reputation;
String reputationName = StringUtils.firstUpperLetter(reputationType.toLowerCase());
- description = "Reputation: " + Utils.formatNumberWithDots(reputation) + " " + reputationName + " Reputation";
+ description = Utils.formatNumberWithDots(reputation) + " §7" + reputationName + " Reputation";
}
public int getReputation() {
@@ -45,7 +45,7 @@ public class ReputationRequirement extends MinionRequirement {
}
@Override
- public String printDescription() {
- return description;
+ public String printDescription(String color) {
+ return "Reputation: " + color + description;
}
}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/requirements/SlayerRequirement.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/requirements/SlayerRequirement.java
index d20555b8..78c588b1 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/requirements/SlayerRequirement.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/requirements/SlayerRequirement.java
@@ -40,7 +40,7 @@ public class SlayerRequirement extends MinionRequirement {
}
@Override
- public String printDescription() {
- return "Slayer: " + StringUtils.firstUpperLetter(slayer) + " level " + level;
+ public String printDescription(String color) {
+ return "Slayer: " + color +StringUtils.firstUpperLetter(slayer)+ " level " + level;
}
}