aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorLorenz <lo.scherf@gmail.com>2022-07-30 23:28:57 +0200
committerLorenz <lo.scherf@gmail.com>2022-07-30 23:28:57 +0200
commit580d851b50fc62762d7e1e31949298f27d90a99a (patch)
tree933533adab5fc2b15a7abd21e36a322ffdc838d1 /src/main
parent90a50709bfac7978fba696814833d3e4859c4a1c (diff)
downloadNotEnoughUpdates-580d851b50fc62762d7e1e31949298f27d90a99a.tar.gz
NotEnoughUpdates-580d851b50fc62762d7e1e31949298f27d90a99a.tar.bz2
NotEnoughUpdates-580d851b50fc62762d7e1e31949298f27d90a99a.zip
code cleanup
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);