aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/loaders/repo/MinionHelperRepoLoader.java5
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/sources/CustomSource.java11
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/util/MinionHelperPriceCalculation.java2
3 files changed, 8 insertions, 10 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 e81a0f29..5e96f377 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
@@ -78,7 +78,6 @@ public class MinionHelperRepoLoader {
}
void load() {
- //TODO load new from config entries and so?
errorWhileLoading = false;
createMinions();
@@ -111,10 +110,10 @@ public class MinionHelperRepoLoader {
for (Map.Entry<String, String> entry : customSource.entrySet()) {
String internalName = entry.getKey();
- String description = entry.getValue();
+ String sourceName = entry.getValue();
Minion minion = manager.getMinionById(internalName);
if (minion == null) continue;
- minion.setMinionSource(new CustomSource(minion, description));
+ minion.setMinionSource(new CustomSource(minion, sourceName));
}
manager.getMinionById("FLOWER_GENERATOR_1").getRequirements().add(new CustomRequirement(
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/sources/CustomSource.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/sources/CustomSource.java
index ccbd84fb..45a8bf08 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/sources/CustomSource.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/sources/CustomSource.java
@@ -23,15 +23,14 @@ import io.github.moulberry.notenoughupdates.miscgui.minionhelper.Minion;
public class CustomSource extends MinionSource {
- //TODO rename variable
- private final String customSource;
+ private final String sourceName;
- public CustomSource(Minion minion, String customSource) {
+ public CustomSource(Minion minion, String sourceName) {
super(minion);
- this.customSource = customSource;
+ this.sourceName = sourceName;
}
- public String getCustomSource() {
- return customSource;
+ public String getSourceName() {
+ return sourceName;
}
}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/util/MinionHelperPriceCalculation.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/util/MinionHelperPriceCalculation.java
index 32131251..f1a92b57 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/util/MinionHelperPriceCalculation.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/util/MinionHelperPriceCalculation.java
@@ -77,7 +77,7 @@ public class MinionHelperPriceCalculation {
}
if (source instanceof CustomSource) {
- return "§f" + ((CustomSource) source).getCustomSource();
+ return "§f" + ((CustomSource) source).getSourceName();
}
long costs = calculateUpgradeCosts(source, upgradeOnly);