diff --git a/README.md b/README.md
index c2e0a83f..f8e41b64 100644
--- a/README.md
+++ b/README.md
@@ -20,7 +20,7 @@ To update the initial backup go to `Backup -> Create backup -> Create new initia
#### WHEN THE GAME IS UPDATED IT MIGHT BE POSSIBLE THAT YOUR MODIFICATIONS TO THE GAME FILES ARE LOST
#### TO COUNTERACT THIS YOU CAN CREATE A MOD RESTORE POINT IN THE BACKUP MENU
-## Download: [v3.0.2](https://github.com/LMH01/MGT2_Mod_Tool/releases/download/v3.0.2/MGT2_Mod_Tool_3.0.2.zip)
+## Download: [v3.0.3](https://github.com/LMH01/MGT2_Mod_Tool/releases/download/v3.0.3/MGT2_Mod_Tool_3.0.3.zip)
#### Getting started:
- Install Java 8 (if not already installed)
- Download and extract the `.zip` file
@@ -83,7 +83,7 @@ To update the initial backup go to `Backup -> Create backup -> Create new initia
- Backups of your saved games will be created but not automatically restored. To restore a save game backup go into the **Backup** menu, click **Restore Backup** and then **Restore Save Game Backup**.
- **Create a mod restore point**: When a restore point is set you will be able to restore all your currently installed mods later.
Useful when the game has been updated and the mods are lost.
- **Even though backups are created I will not take any responsibility if you loose or damage you saved games!**
-### Uitilities
+### Utilities
- **Update Checker**
- When started the tool will look for updates. If an update is available the user will be notified.
- **Tool tips**
@@ -156,4 +156,4 @@ To update the initial backup go to `Backup -> Create backup -> Create new initia
![img](https://i.imgur.com/RvDoupc.png "The import window")
#### This is what the mods menu looks like
-![img](https://i.imgur.com/fSs3Fn5.png "The mods window")
\ No newline at end of file
+![img](https://i.imgur.com/fSs3Fn5.png "The mods window")
diff --git a/build.gradle b/build.gradle
index cd61cdac..24325a35 100644
--- a/build.gradle
+++ b/build.gradle
@@ -38,7 +38,7 @@ dependencies {
sourceCompatibility = 1.8
targetCompatibility = 1.8
-project.version = "3.0.2" //remember to change version in main class
+project.version = "3.0.3" //remember to change version in main class
archivesBaseName = "MGT2_Mod_Tool"
group = "com.github.lmh01"
diff --git a/changelog.md b/changelog.md
index 4a490558..7d37659e 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,5 +1,19 @@
# Changelog
-## [v3.0.2](https://github.com/LMH01/MGT2_Mod_Tool/releases/tag/v3.0.1) (Latest Version)
+
+## [v3.0.3](https://github.com/LMH01/MGT2_Mod_Tool/releases/tag/v3.0.3) (Latest Version)
+### Other
+- Added button to utilities menu with which the settings.toml file can be opened
+- Updated default content files
+- It is now checked if the initial backup is up-to-date when the tool is started
+ - This feature can be disabled in the settings.toml file
+
+### Bug fixes
+- Button `Restore mod restore point` is no longer disabled when the safety feature are off
+- Import no longer fails when gameplay features are imported that are missing bad / good genres
+- Theme export no longer replaces genre names falsely
+- Program will no longer fail to load when the settings.toml file does not contain valid toml
+
+## [v3.0.2](https://github.com/LMH01/MGT2_Mod_Tool/releases/tag/v3.0.2)
### Other
- Import
- When an image file already exists it is now replaced and the import of the mod is not canceled
diff --git a/src/main/java/com/github/lmh01/mgt2mt/MadGamesTycoon2ModTool.java b/src/main/java/com/github/lmh01/mgt2mt/MadGamesTycoon2ModTool.java
index 70cdc50e..4e755de6 100644
--- a/src/main/java/com/github/lmh01/mgt2mt/MadGamesTycoon2ModTool.java
+++ b/src/main/java/com/github/lmh01/mgt2mt/MadGamesTycoon2ModTool.java
@@ -18,8 +18,8 @@
public class MadGamesTycoon2ModTool {
public static final OSType OS_TYPE;
private static final Logger LOGGER = LoggerFactory.getLogger(MadGamesTycoon2ModTool.class);
- public static final String VERSION = "3.0.2";//Version numbers that include "dev" are not checked for updates / tool will notify if update is available
- public static final String CURRENT_RELEASE_VERSION = "3.0.2";//When this version number has been detected as the newest release version the update available message is held back
+ public static final String VERSION = "3.0.3";//Version numbers that include "dev" are not checked for updates / tool will notify if update is available
+ public static final String CURRENT_RELEASE_VERSION = "3.0.3";//When this version number has been detected as the newest release version the update available message is held back
static {
if (System.getProperty("os.name").contains("Linux")) {
diff --git a/src/main/java/com/github/lmh01/mgt2mt/data_stream/ImportSettings.java b/src/main/java/com/github/lmh01/mgt2mt/data_stream/ImportSettings.java
index ea2a93b5..5f3bd692 100644
--- a/src/main/java/com/github/lmh01/mgt2mt/data_stream/ImportSettings.java
+++ b/src/main/java/com/github/lmh01/mgt2mt/data_stream/ImportSettings.java
@@ -1,5 +1,6 @@
package com.github.lmh01.mgt2mt.data_stream;
+import com.github.lmh01.mgt2mt.util.ModManagerPaths;
import com.github.lmh01.mgt2mt.util.Settings;
import com.github.lmh01.mgt2mt.util.UpdateBranch;
import com.moandjiezana.toml.Toml;
@@ -7,6 +8,7 @@
import org.slf4j.LoggerFactory;
import java.io.File;
+import java.nio.file.Files;
import java.nio.file.Paths;
public class ImportSettings {
@@ -36,8 +38,8 @@ public static boolean Import(File file) {
Settings.enableExportStorage = toml.getBoolean("enableExportStorage");
Settings.enableInitialBackupCheck = toml.getBoolean("enableInitialBackupCheck");
return true;
- } catch (IllegalStateException | NullPointerException e) {
- LOGGER.info("Unable to import settings!");
+ } catch (RuntimeException e) {
+ LOGGER.info("Unable to import settings!:");
e.printStackTrace();
return false;
}
diff --git a/src/main/java/com/github/lmh01/mgt2mt/mod/AntiCheatMod.java b/src/main/java/com/github/lmh01/mgt2mt/mod/AntiCheatMod.java
index e8756e8a..8c584518 100644
--- a/src/main/java/com/github/lmh01/mgt2mt/mod/AntiCheatMod.java
+++ b/src/main/java/com/github/lmh01/mgt2mt/mod/AntiCheatMod.java
@@ -128,7 +128,7 @@ protected Charset getCharset() {
@Override
public String[] getCompatibleModToolVersions() {
- return new String[]{"3.0.0-alpha-1", "3.0.0", "3.0.1", "3.0.2", MadGamesTycoon2ModTool.VERSION};
+ return new String[]{"3.0.0-alpha-1", "3.0.0", "3.0.1", "3.0.2", "3.0.3", MadGamesTycoon2ModTool.VERSION};
}
@Override
diff --git a/src/main/java/com/github/lmh01/mgt2mt/mod/CopyProtectMod.java b/src/main/java/com/github/lmh01/mgt2mt/mod/CopyProtectMod.java
index 7908fb1d..c48bde5e 100644
--- a/src/main/java/com/github/lmh01/mgt2mt/mod/CopyProtectMod.java
+++ b/src/main/java/com/github/lmh01/mgt2mt/mod/CopyProtectMod.java
@@ -35,7 +35,7 @@ protected void printValues(Map map, BufferedWriter bw) throws IO
@Override
public String[] getCompatibleModToolVersions() {
- return new String[]{"3.0.0-alpha-1", "3.0.0", "3.0.1", "3.0.2", MadGamesTycoon2ModTool.VERSION};
+ return new String[]{"3.0.0-alpha-1", "3.0.0", "3.0.1", "3.0.2", "3.0.3", MadGamesTycoon2ModTool.VERSION};
}
@Override
diff --git a/src/main/java/com/github/lmh01/mgt2mt/mod/EngineFeatureMod.java b/src/main/java/com/github/lmh01/mgt2mt/mod/EngineFeatureMod.java
index 97889b8c..26ded54c 100644
--- a/src/main/java/com/github/lmh01/mgt2mt/mod/EngineFeatureMod.java
+++ b/src/main/java/com/github/lmh01/mgt2mt/mod/EngineFeatureMod.java
@@ -44,7 +44,7 @@ protected void printValues(Map map, BufferedWriter bw) throws IO
@Override
public String[] getCompatibleModToolVersions() {
- return new String[]{"3.0.0-alpha-1", "3.0.0", "3.0.1", "3.0.2", MadGamesTycoon2ModTool.VERSION};
+ return new String[]{"3.0.0-alpha-1", "3.0.0", "3.0.1", "3.0.2", "3.0.3", MadGamesTycoon2ModTool.VERSION};
}
@Override
diff --git a/src/main/java/com/github/lmh01/mgt2mt/mod/GameplayFeatureMod.java b/src/main/java/com/github/lmh01/mgt2mt/mod/GameplayFeatureMod.java
index 648cace8..d2ba86db 100644
--- a/src/main/java/com/github/lmh01/mgt2mt/mod/GameplayFeatureMod.java
+++ b/src/main/java/com/github/lmh01/mgt2mt/mod/GameplayFeatureMod.java
@@ -51,7 +51,7 @@ protected void printValues(Map map, BufferedWriter bw) throws IO
@Override
public String[] getCompatibleModToolVersions() {
- return new String[]{"3.0.0-alpha-1", "3.0.0", "3.0.1", "3.0.2", MadGamesTycoon2ModTool.VERSION};
+ return new String[]{"3.0.0-alpha-1", "3.0.0", "3.0.1", "3.0.2", "3.0.3", MadGamesTycoon2ModTool.VERSION};
}
@Override
@@ -372,9 +372,12 @@ public Map getDependencyMap(T t) throws ModProcessingExcepti
@Override
public Map getChangedImportMap(Map map) throws ModProcessingException, NullPointerException, NumberFormatException {
- map.replace("GOOD", getGenreIds(map.get("GOOD")));
- map.replace("BAD", getGenreIds(map.get("BAD")));
- map.put("PIC", "");
+ if (map.containsKey("GOOD")) {
+ map.replace("GOOD", getGenreIds(map.get("GOOD")));
+ }
+ if (map.containsKey("BAD")) {
+ map.replace("BAD", getGenreIds(map.get("BAD")));
+ }
return map;
}
@@ -489,6 +492,8 @@ private void editGenreIdAllocation(Set gameplayFeaturesIdsToEdit, int g
}
/**
+ * This function uses {@link AbstractAdvancedMod#getModIdByNameFromImportHelperMap(String)} so the import map
+ * has to be initialized when thin function is called. This means that the genre ids will be set correctly.
* @param genreNamesRaw The string containing the genre ids that should be transformed.
* @return A list of genre names
* @throws ModProcessingException If import helper throws an exception
diff --git a/src/main/java/com/github/lmh01/mgt2mt/mod/GenreMod.java b/src/main/java/com/github/lmh01/mgt2mt/mod/GenreMod.java
index 4c7011b8..bc7f9ebe 100644
--- a/src/main/java/com/github/lmh01/mgt2mt/mod/GenreMod.java
+++ b/src/main/java/com/github/lmh01/mgt2mt/mod/GenreMod.java
@@ -78,7 +78,7 @@ protected void printValues(Map map, BufferedWriter bw) throws IO
@Override
public String[] getCompatibleModToolVersions() {
- return new String[]{"3.0.0-alpha-1", "3.0.0", "3.0.1", "3.0.2", MadGamesTycoon2ModTool.VERSION};
+ return new String[]{"3.0.0-alpha-1", "3.0.0", "3.0.1", "3.0.2", "3.0.3", MadGamesTycoon2ModTool.VERSION};
}
@Override
diff --git a/src/main/java/com/github/lmh01/mgt2mt/mod/HardwareFeatureMod.java b/src/main/java/com/github/lmh01/mgt2mt/mod/HardwareFeatureMod.java
index db0f1bfc..1e8355c8 100644
--- a/src/main/java/com/github/lmh01/mgt2mt/mod/HardwareFeatureMod.java
+++ b/src/main/java/com/github/lmh01/mgt2mt/mod/HardwareFeatureMod.java
@@ -46,7 +46,7 @@ protected void printValues(Map map, BufferedWriter bw) throws IO
@Override
public String[] getCompatibleModToolVersions() {
- return new String[]{"3.0.0-alpha-1", "3.0.0", "3.0.1", "3.0.2", MadGamesTycoon2ModTool.VERSION};
+ return new String[]{"3.0.0-alpha-1", "3.0.0", "3.0.1", "3.0.2", "3.0.3", MadGamesTycoon2ModTool.VERSION};
}
@Override
diff --git a/src/main/java/com/github/lmh01/mgt2mt/mod/HardwareMod.java b/src/main/java/com/github/lmh01/mgt2mt/mod/HardwareMod.java
index 817acc2b..702b9cc8 100644
--- a/src/main/java/com/github/lmh01/mgt2mt/mod/HardwareMod.java
+++ b/src/main/java/com/github/lmh01/mgt2mt/mod/HardwareMod.java
@@ -135,7 +135,7 @@ protected void printValues(Map map, BufferedWriter bw) throws IO
@Override
public String[] getCompatibleModToolVersions() {
- return new String[]{"3.0.0-alpha-1", "3.0.0", "3.0.1", "3.0.2", MadGamesTycoon2ModTool.VERSION};
+ return new String[]{"3.0.0-alpha-1", "3.0.0", "3.0.1", "3.0.2", "3.0.3", MadGamesTycoon2ModTool.VERSION};
}
@Override
diff --git a/src/main/java/com/github/lmh01/mgt2mt/mod/LicenceMod.java b/src/main/java/com/github/lmh01/mgt2mt/mod/LicenceMod.java
index 7215c1ad..8b73df52 100644
--- a/src/main/java/com/github/lmh01/mgt2mt/mod/LicenceMod.java
+++ b/src/main/java/com/github/lmh01/mgt2mt/mod/LicenceMod.java
@@ -24,7 +24,7 @@ public class LicenceMod extends AbstractSimpleMod {
@Override
public String[] getCompatibleModToolVersions() {
- return new String[]{"3.0.0-alpha-1", "3.0.0", "3.0.1", "3.0.2", MadGamesTycoon2ModTool.VERSION};
+ return new String[]{"3.0.0-alpha-1", "3.0.0", "3.0.1", "3.0.2", "3.0.3", MadGamesTycoon2ModTool.VERSION};
}
@Override
diff --git a/src/main/java/com/github/lmh01/mgt2mt/mod/NpcEngineMod.java b/src/main/java/com/github/lmh01/mgt2mt/mod/NpcEngineMod.java
index c5d8d4b4..623864f5 100644
--- a/src/main/java/com/github/lmh01/mgt2mt/mod/NpcEngineMod.java
+++ b/src/main/java/com/github/lmh01/mgt2mt/mod/NpcEngineMod.java
@@ -34,7 +34,7 @@ protected void printValues(Map map, BufferedWriter bw) throws IO
@Override
public String[] getCompatibleModToolVersions() {
- return new String[]{"3.0.0-alpha-1", "3.0.0", "3.0.1", "3.0.2", MadGamesTycoon2ModTool.VERSION};
+ return new String[]{"3.0.0-alpha-1", "3.0.0", "3.0.1", "3.0.2", "3.0.3", MadGamesTycoon2ModTool.VERSION};
}
@Override
diff --git a/src/main/java/com/github/lmh01/mgt2mt/mod/NpcGamesMod.java b/src/main/java/com/github/lmh01/mgt2mt/mod/NpcGamesMod.java
index b7c581e2..e2e92f77 100644
--- a/src/main/java/com/github/lmh01/mgt2mt/mod/NpcGamesMod.java
+++ b/src/main/java/com/github/lmh01/mgt2mt/mod/NpcGamesMod.java
@@ -27,7 +27,7 @@ public class NpcGamesMod extends AbstractSimpleDependentMod {
@Override
public String[] getCompatibleModToolVersions() {
- return new String[]{"3.0.0-alpha-1", "3.0.0", "3.0.1", "3.0.2", MadGamesTycoon2ModTool.VERSION};
+ return new String[]{"3.0.0-alpha-1", "3.0.0", "3.0.1", "3.0.2", "3.0.3", MadGamesTycoon2ModTool.VERSION};
}
@Override
diff --git a/src/main/java/com/github/lmh01/mgt2mt/mod/PlatformMod.java b/src/main/java/com/github/lmh01/mgt2mt/mod/PlatformMod.java
index aa55850d..26623efa 100644
--- a/src/main/java/com/github/lmh01/mgt2mt/mod/PlatformMod.java
+++ b/src/main/java/com/github/lmh01/mgt2mt/mod/PlatformMod.java
@@ -111,7 +111,7 @@ protected void printValues(Map map, BufferedWriter bw) throws IO
@Override
public String[] getCompatibleModToolVersions() {
- return new String[]{"3.0.0-alpha-1", "3.0.0", "3.0.1", "3.0.2", MadGamesTycoon2ModTool.VERSION};
+ return new String[]{"3.0.0-alpha-1", "3.0.0", "3.0.1", "3.0.2", "3.0.3", MadGamesTycoon2ModTool.VERSION};
}
@Override
diff --git a/src/main/java/com/github/lmh01/mgt2mt/mod/PublisherMod.java b/src/main/java/com/github/lmh01/mgt2mt/mod/PublisherMod.java
index 81ae64fb..ad030054 100644
--- a/src/main/java/com/github/lmh01/mgt2mt/mod/PublisherMod.java
+++ b/src/main/java/com/github/lmh01/mgt2mt/mod/PublisherMod.java
@@ -50,7 +50,7 @@ protected void printValues(Map map, BufferedWriter bw) throws IO
@Override
public String[] getCompatibleModToolVersions() {
- return new String[]{"3.0.0-alpha-1", "3.0.0", "3.0.1", "3.0.2", MadGamesTycoon2ModTool.VERSION};
+ return new String[]{"3.0.0-alpha-1", "3.0.0", "3.0.1", "3.0.2", "3.0.3", MadGamesTycoon2ModTool.VERSION};
}
@Override
diff --git a/src/main/java/com/github/lmh01/mgt2mt/mod/ThemeMod.java b/src/main/java/com/github/lmh01/mgt2mt/mod/ThemeMod.java
index 2cd9594a..65860188 100644
--- a/src/main/java/com/github/lmh01/mgt2mt/mod/ThemeMod.java
+++ b/src/main/java/com/github/lmh01/mgt2mt/mod/ThemeMod.java
@@ -32,7 +32,7 @@ public class ThemeMod extends AbstractSimpleDependentMod {
@Override
public String[] getCompatibleModToolVersions() {
- return new String[]{"3.0.0-alpha-1", "3.0.0", "3.0.1", "3.0.2", MadGamesTycoon2ModTool.VERSION};
+ return new String[]{"3.0.0-alpha-1", "3.0.0", "3.0.1", "3.0.2", "3.0.3", MadGamesTycoon2ModTool.VERSION};
}
@Override
@@ -231,7 +231,7 @@ public void addModToFile(T t) throws ModProcessingException {
@SuppressWarnings("unchecked")
public Map getExportMap(String name) throws ModProcessingException {
Map map = new HashMap<>();
- String line = getModifiedExportLine(getLine(name)).replace(name, getThemeTranslations(name).get("NAME GE"));
+ String line = getModifiedExportLine(getLine(name));
Map dependencyMap = getDependencyMap(line);
for (AbstractBaseMod mod : ModManager.mods) {
try {
@@ -255,7 +255,7 @@ public Map getExportMap(String name) throws ModProcessingExcepti
public String getModifiedExportLine(String exportLine) throws ModProcessingException {
ArrayList strings = Utils.getEntriesFromString(exportLine);
StringBuilder output = new StringBuilder();
- output.append(getReplacedLine(exportLine)).append(" ");
+ output.append(getThemeTranslation(getReplacedLine(exportLine), "GE")).append(" ");
for (String string : strings) {
output.append("<");
try {
@@ -526,16 +526,28 @@ public int getPositionOfThemeInFile(String themeNameEn) throws ModProcessingExce
*/
public boolean doesThemeExist(String name) throws ModProcessingException {
ArrayList arrayList = new ArrayList<>(Arrays.asList(getContentByAlphabet()));
- if (arrayList.contains(name)) {
- return true;
- } else {
- return false;
+ return arrayList.contains(name);
+ }
+
+ /**
+ * Translates the theme name.
+ * @param nameEn The theme name that should be translated
+ * @param translationKey The translation key for the translation
+ * @return The german translation for the english theme name.
+ */
+ public String getThemeTranslation(String nameEn, String translationKey) throws ModProcessingException {
+ String translation = getThemeTranslations(nameEn).get("NAME " + translationKey);
+ if (translation.equals("null")) {
+ throw new ModProcessingException("Unable to return translation for theme " + nameEn + ": Translation key " + translation + " is invalid.");
}
+ return translation;
}
/**
* @param name The english theme name for which the translations should be returned
* @return A map that contains all translations for the theme
+ * @throws ModProcessingException If theme translation could not be returned.
+ * If file translation file charset can not be determined.
*/
public Map getThemeTranslations(String name) throws ModProcessingException {
try {
diff --git a/src/main/java/com/github/lmh01/mgt2mt/mod/managed/AbstractAdvancedMod.java b/src/main/java/com/github/lmh01/mgt2mt/mod/managed/AbstractAdvancedMod.java
index 43cd6b8c..4307b467 100644
--- a/src/main/java/com/github/lmh01/mgt2mt/mod/managed/AbstractAdvancedMod.java
+++ b/src/main/java/com/github/lmh01/mgt2mt/mod/managed/AbstractAdvancedMod.java
@@ -306,14 +306,18 @@ public Map transformGenericToMap(T t) throws ModProcessingEx
}
/**
- * Use this function to simply transform the map entry from the mod name to the mod id.
- * This function uses {@link AbstractBaseMod#getModIdByNameFromImportHelperMap(String)} to retrieve the mod id.
- * If the entry is not found a warning message is printed into the text area
+ * Use this function to replace the value behind the key with the id specific for that mod-name.
+ * If the key does not exist or the id is not found a warning message is printed into the text area
+ * and a random replacement id will be chosen.
+ * Does only work if the value is a single name for which an id has been set.
+ * Example replacement: Horror -> 18
*
* @param map The map that contains the value that should be replaced
* @param mapKey The map key for which the value should be replaced
* @param mod The mod for which the name should be replaced with the id
- */
+ * @see AbstractBaseMod#getModIdByNameFromImportHelperMap(String) Function that is used to get the id by the name
+ * @see AbstractBaseMod#addEntryToImportHelperMap(String) Function that adds an entry to the import helper map
+ * */
protected void replaceImportMapEntry(Map map, String mapKey, AbstractBaseMod mod) {
try {
map.replace(mapKey, Integer.toString(mod.getModIdByNameFromImportHelperMap(map.get(mapKey))));
diff --git a/src/main/java/com/github/lmh01/mgt2mt/util/InitialBackupChecker.java b/src/main/java/com/github/lmh01/mgt2mt/util/InitialBackupChecker.java
index c1249452..48c6c664 100644
--- a/src/main/java/com/github/lmh01/mgt2mt/util/InitialBackupChecker.java
+++ b/src/main/java/com/github/lmh01/mgt2mt/util/InitialBackupChecker.java
@@ -24,14 +24,11 @@ public class InitialBackupChecker {
public static boolean checkIfUpToDate() throws IOException {
if (Files.exists(initialBackupVersion)) {
Toml toml = new Toml().read(initialBackupVersion.toFile());
- if (toml.getLong("initialBackupVersion") < (long) getLastUpdatedInt()) {
- return false;
- }
+ return toml.getLong("initialBackupVersion") == (long) getLastUpdatedInt();
} else {
setInitialBackupVersion(getLastUpdatedInt());
return true;
}
- return true;
}
/**
diff --git a/src/main/java/com/github/lmh01/mgt2mt/util/Settings.java b/src/main/java/com/github/lmh01/mgt2mt/util/Settings.java
index 6532671f..2b79bf1c 100644
--- a/src/main/java/com/github/lmh01/mgt2mt/util/Settings.java
+++ b/src/main/java/com/github/lmh01/mgt2mt/util/Settings.java
@@ -30,13 +30,13 @@ public class Settings {
public static boolean enableGenreNameTranslationInfo = true;
public static boolean enableGenreDescriptionTranslationInfo = true;
public static boolean enableExportStorage = true; //If true each new export will be saved in a new folder.
- public static boolean enableInitialBackupCheck = false; //If true the user will be notified if the initial backup is outdated
+ public static boolean enableInitialBackupCheck = true; //If true the user will be notified if the initial backup is outdated
public static String language = "English";
public static UpdateBranch updateBranch = UpdateBranch.RELEASE;
public static void resetSettings() {
setMGT2Folder(false);
- setSettings(false, true, false, false, mgt2Path, true, true, true, "English", UpdateBranch.RELEASE, true, false);
+ setSettings(false, true, false, false, mgt2Path, true, true, true, "English", UpdateBranch.RELEASE, true, true);
LOGGER.info("Settings have been reset.");
}
diff --git a/src/main/java/com/github/lmh01/mgt2mt/util/Utils.java b/src/main/java/com/github/lmh01/mgt2mt/util/Utils.java
index 04153aba..5dfbe0d9 100644
--- a/src/main/java/com/github/lmh01/mgt2mt/util/Utils.java
+++ b/src/main/java/com/github/lmh01/mgt2mt/util/Utils.java
@@ -411,7 +411,7 @@ public static boolean checkForMutualEntries(ArrayList> arrayList1, ArrayList
}
/**
- * Opens the given folder
+ * Opens the given folder/file
*/
public static void open(Path path) {
try {
diff --git a/src/main/java/com/github/lmh01/mgt2mt/util/manager/DefaultContentManager.java b/src/main/java/com/github/lmh01/mgt2mt/util/manager/DefaultContentManager.java
index 7be6a844..32aa4f85 100644
--- a/src/main/java/com/github/lmh01/mgt2mt/util/manager/DefaultContentManager.java
+++ b/src/main/java/com/github/lmh01/mgt2mt/util/manager/DefaultContentManager.java
@@ -33,7 +33,7 @@ public class DefaultContentManager {
* This is the version in which the default content files are initially saved.
* It indicates to what game update the default files correspond that ship with this tool.
*/
- private static final String DEFAULT_CONTENT_VERSION = "BUILD 2021.09.09A";
+ private static final String DEFAULT_CONTENT_VERSION = "BUILD 2021.10.11B";
private static final String NEWEST_DEFAULT_CONTENT_VERSION_DOWNLOAD_URL = "https://www.dropbox.com/s/hd7f7c2b9ybr5gt/newest_default_content_version.txt?dl=1";
private static final String NEWEST_DEFAULT_CONTENT_DOWNLOAD_URL = "https://www.dropbox.com/s/7l89pg9x4venqje/newest_default_content.toml?dl=1";
public static final File DEFAULT_CONTENT_FILE = ModManagerPaths.MAIN.getPath().resolve("default_content.toml").toFile();
diff --git a/src/main/java/com/github/lmh01/mgt2mt/windows/WindowMain.java b/src/main/java/com/github/lmh01/mgt2mt/windows/WindowMain.java
index 703170ee..3021a760 100644
--- a/src/main/java/com/github/lmh01/mgt2mt/windows/WindowMain.java
+++ b/src/main/java/com/github/lmh01/mgt2mt/windows/WindowMain.java
@@ -23,6 +23,7 @@
import javax.swing.event.MenuEvent;
import javax.swing.event.MenuListener;
import java.awt.*;
+import java.nio.file.Paths;
import java.util.ArrayList;
public class WindowMain {
@@ -180,12 +181,16 @@ public void menuCanceled(MenuEvent e) {
JMenuItem m54OpenSaveGameFolder = new JMenuItem(I18n.INSTANCE.get("window.main.utilities.openSaveGameFolder"));
m54OpenSaveGameFolder.setToolTipText(I18n.INSTANCE.get("window.main.utilities.openSaveGameFolder.toolTip"));
m54OpenSaveGameFolder.addActionListener(actionEvent -> Utils.open(Backup.FILE_SAVE_GAME_FOLDER));
+ JMenuItem m55OpenSettingsTomlFile = new JMenuItem(I18n.INSTANCE.get("window.main.utilities.openSettingsTomlFile"));
+ m55OpenSettingsTomlFile.setToolTipText(I18n.INSTANCE.get("window.main.utilities.openSettingsTomlFile.toolTip"));
+ m55OpenSettingsTomlFile.addActionListener(actionEvent -> Utils.open(ModManagerPaths.MAIN.getPath().resolve("settings.toml")));
MB.add(M_5_UTIL);
M_5_UTIL.add(m51ExperimentalFeatures);
m51ExperimentalFeatures.add(M_511_REPLACE_PUBLISHERS_WITH_REAL_PUBLISHERS);
M_5_UTIL.add(m52OpenGitHubPage);
M_5_UTIL.add(m53OpenMGT2Folder);
M_5_UTIL.add(m54OpenSaveGameFolder);
+ M_5_UTIL.add(m55OpenSettingsTomlFile);
//Creating the panel at bottom and adding components
JPanel panel = new JPanel(); // the panel is not visible in output
@@ -237,10 +242,8 @@ public static void checkActionAvailability() {
boolean noModsAvailable = true;
ModManager.analyzeMods();
boolean noModRestorePointSet = true;
- if (!Settings.disableSafetyFeatures) {
- if (ModManagerPaths.CURRENT_RESTORE_POINT.toFile().exists()) {
- noModRestorePointSet = false;
- }
+ if (ModManagerPaths.CURRENT_RESTORE_POINT.toFile().exists()) {
+ noModRestorePointSet = false;
}
for (AbstractBaseMod mod : ModManager.mods) {
mod.setMainMenuButtonAvailability();
diff --git a/src/main/resources/default_content/default_npcGames.txt b/src/main/resources/default_content/default_npcGames.txt
index b846db95..e299ae8d 100644
--- a/src/main/resources/default_content/default_npcGames.txt
+++ b/src/main/resources/default_content/default_npcGames.txt
@@ -450,7 +450,7 @@ Last Quest <5><12><14><16>
Last Samurai <10>
Last Shinobi <5><12><14><16>
Law of the Nord <5><12><14><16>
-LeBucks Revenge <2><3><15>
+LeBuck's Revenge <2><3><15>
Lemmerlings <1>
Leopard Commander <7>
Life At The Dungeons <2><3><15>
@@ -733,7 +733,7 @@ Soldiers <4><13>
Soldiers Of The Sun <5><12><14><16>
Solomons Secret <1>
Soul in the Nobody <2><3><15>
-Soul of Star <2><3><15>
+Star Soul <2><3><15>
Souls of Dark <2><3><15>
Souls of Rose <5><12><14><16>
Space Civilizations <4><13>
diff --git a/src/main/resources/locale/de.txt b/src/main/resources/locale/de.txt
index c7c7d33d..9c76b4b7 100644
--- a/src/main/resources/locale/de.txt
+++ b/src/main/resources/locale/de.txt
@@ -624,7 +624,7 @@ dialog.contentEditor.editGenreThemeFit.confirmMessage|Bist du dir sicher,
dialog.contentEditor.editGenreThemeFit.selectThemeGenre|Bitte wähle mindestens ein Thema/Genre aus, um fortzufahren!
dialog.contentEditor.editGenreThemeFit.success|Die Genre/Themen Kombination wurde erfolgreich bearbeitet!
-dialog.startTasks.initialBackupOutdated|Warnung:
Das Initial-Backup ist nicht mehr aktuell.
Dies kann zu Problemen führen.
Erstelle bitte ein neues!
(Backup -> Backup erstellen -> Neues Initial-Backup erstellen)
+dialog.startTasks.initialBackupOutdated|Warnung:
Das Initial-Backup ist nicht mehr aktuell.
Dies kann zu Problemen führen.
Erstelle bitte ein neues!
(Backup -> Backup erstellen -> Neues Initial-Backup erstellen)
Dieser Check kann in der settings.toml-Datei ausgeschaltet werden.
disclaimer.disclaimerText|Wichtige Informationen:
- Backups werden automatisch erstellt, aber erstelle bitte deine eigene
Sicherheitskopie, falls bei den von diesem Tool erstellten Backups ein Fehler auftritt.
- Erstelle bitte immer, wenn das Spiel aktualisiert wurde ein neues Initial-Backup um Probleme zu verhindern
- Die Spielstände sind zu finden, indem du auf "Spielstand Ordner Öffnen" im Nützliches-Menü klickst.
- Installierte Mods werden möglicherweise erst dann wirksam, wenn ein neues Spiel gestartet wird.
- Wenn Mods später wieder entfernt werden, werden sie nicht unbedingt aus den Spielständen entfernt.
- Die meisten Spinner sind gesperrt, um die Eingabe von Werten zu verhindern, die das Spielgleichgewicht beeinträchtigen könnten.
Dies kann umgangen werden, indem die Sicherheitsfunktionen in den Einstellungen deaktiviert werden.
- Falls du nicht weißt, was ein Eingabefeld macht, kannst du mit der Maus darüber hovern, dann wird ein Hinweis angezeigt.
- Wenn ein Fehler auftritt, melde ihn bitte, damit ich ihn beheben kann.
Wenn weitere Hilfe gebraucht wird, kann die README.md Datei gelesen werden, die im Github-Repository zu finden ist.
Das Github-Repository kann durch Klicken auf „Nützliches“ -> „Github Seite Öffnen“, geöffnet werden.
Wenn du auf OK klickst, akzeptierst du, dass du diese Information gelesen und verstanden hast.
@@ -886,6 +886,8 @@ window.main.utilities.openGithubPage|Github Seite öffnen
window.main.utilities.openMGT2Folder|MGT2 Ordner öffnen
window.main.utilities.openSaveGameFolder|Spielstand Ordner öffnen
window.main.utilities.openSaveGameFolder.toolTip|Klicke hier, um den Ordner zu öffnen, wo die Spielstände gespeichert sind.
+window.main.utilities.openSettingsTomlFile|Settings.toml-Datei öffnen
+window.main.utilities.openSettingsTomlFile.toolTip|Klicke hier, um die Settings.toml-Datei zu öffnen
Diese Datei enthällt alle Einstellungen, auch solche,
die nicht über das Einstellungsfenster verändert werden können.
Bitte sei beim Bearbeiten der Datei vorsichtig!
window.main.actionAvailability.acceptMessageFirst|Deaktiviert -> Du musst erst akzeptieren, dass du die Nachricht gelesen hast!
window.main.actionAvailability.noToExportAvailable|Deaktiviert -> Nichts zum exportieren verfügbar
window.main.actionAvailability.exportAvailable|Klicke hier, um alles zu exportieren, was mit diesem Tool hinzugefügt wurde
diff --git a/src/main/resources/locale/en.txt b/src/main/resources/locale/en.txt
index d8faa271..1528baad 100644
--- a/src/main/resources/locale/en.txt
+++ b/src/main/resources/locale/en.txt
@@ -621,7 +621,7 @@ dialog.contentEditor.editGenreThemeFit.confirmMessage|Are you sure that th
dialog.contentEditor.editGenreThemeFit.selectThemeGenre|Please select at least one genre/theme to continue!
dialog.contentEditor.editGenreThemeFit.success|The genre/theme fit has been edited successfully!
-dialog.startTasks.initialBackupOutdated|Warning:
The initial backup is no longer up-to-date.
This can result in problems.
d
Please create a new one!
(Backup -> Create backup -> Create new initial backup)
+dialog.startTasks.initialBackupOutdated|Warning:
The initial backup is no longer up-to-date.
This can result in problems.
Please create a new one!
(Backup -> Create backup -> Create new initial backup)
This check can be disabled in the settings.toml file.
disclaimer.disclaimerText|Important information:
- Backups will get created automatically but please created your own safety
copy in case something went wrong with the backups that this tool creates.
- Please always create a new initial backup every time the game is updated to prevent problems
- Your save game files can be found by clicking "Open Save Game Location" located in the utilities menu.
- Mods that have been applied may only take effect when you start a new game.
- Removing mods later won't necessarily remove them from your save games.
- Most spinners are locked to prevent the input of values that might break the game balance.
This can be circumvented by disabling the safety features in the settings.
- In case you don't know what an input field does hover over it with your mouse.
If you need additional help visit the Github repository and read the README.md file.
The Github repository can be opened by clicking Utilities -> Open Github Page.
If you encounter a bug please report it so i can fix it.
By clicking ok you accept that you have read this information.
@@ -884,6 +884,8 @@ window.main.utilities.openGithubPage|Open Github page
window.main.utilities.openMGT2Folder|Open MGT2 folder
window.main.utilities.openSaveGameFolder|Open save game folder
window.main.utilities.openSaveGameFolder.toolTip|Click to open the folder where the save games are stored
+window.main.utilities.openSettingsTomlFile|Open settings.toml file
+window.main.utilities.openSettingsTomlFile.toolTip|Click here to open the Settings.toml file
This file contains all settings, including those
that cannot be changed via the settings window.
Please be careful when editing the file!
window.main.actionAvailability.acceptMessageFirst|Disabled -> Accept that you have read the popup message first!
window.main.actionAvailability.noToExportAvailable|Disabled -> Nothing to export available
window.main.actionAvailability.exportAvailable|Click to export all publishers and genres that have been added