diff --git a/src/main/java/com/github/lmh01/mgt2mt/MadGamesTycoon2ModTool.java b/src/main/java/com/github/lmh01/mgt2mt/MadGamesTycoon2ModTool.java index f6740dfc..e73d124e 100644 --- a/src/main/java/com/github/lmh01/mgt2mt/MadGamesTycoon2ModTool.java +++ b/src/main/java/com/github/lmh01/mgt2mt/MadGamesTycoon2ModTool.java @@ -13,7 +13,7 @@ public class MadGamesTycoon2ModTool { private static final Logger LOGGER = LoggerFactory.getLogger(MadGamesTycoon2ModTool.class); - public static final String VERSION = "2.0.1";//Version numbers that include "dev" are not checked for updates / tool will notify if update is available + public static final String VERSION = "2.0.2-dev";//Version numbers that include "dev" are not checked for updates / tool will notify if update is available public static final String CURRENT_RELEASE_VERSION = "2.0.1";//When this version number has been detected as the newest release version the update available message is held back public static void main(String[] args){ Settings.importSettings(); 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 c50f176c..fdab70db 100644 --- a/src/main/java/com/github/lmh01/mgt2mt/mod/GameplayFeatureMod.java +++ b/src/main/java/com/github/lmh01/mgt2mt/mod/GameplayFeatureMod.java @@ -276,7 +276,12 @@ public void menuActionAddMod() { JButton buttonBadGenres = new JButton(I18n.INSTANCE.get("mod.gameplayFeature.addMod.components.button.selectBadGenres")); buttonBadGenres.setToolTipText(I18n.INSTANCE.get("mod.gameplayFeature.addMod.components.button.selectBadGenres.toolTip")); buttonBadGenres.addActionListener(actionEvent -> { - badGenreIds[0] = Utils.getSelectedEntries("Select the genre(s) that don't work with your gameplay feature", I18n.INSTANCE.get("mod.gameplayFeature.addMod.components.button.genres.title"), ModManager.genreMod.getAnalyzer().getContentByAlphabet(), ModManager.genreMod.getAnalyzer().getContentByAlphabet(), true); + ArrayList goodGenrePositions = Utils.getSelectedEntries("Select the genre(s) that don't work with your gameplay feature", I18n.INSTANCE.get("mod.gameplayFeature.addMod.components.button.genres.title"), ModManager.genreMod.getAnalyzer().getContentByAlphabet(), ModManager.genreMod.getAnalyzer().getContentByAlphabet(), true); + ArrayList badGenreIdsOut = new ArrayList<>(); + for(Integer integer : goodGenrePositions){ + badGenreIdsOut.add(ModManager.genreMod.getAnalyzer().getContentIdByName(ModManager.genreMod.getAnalyzer().getContentByAlphabet()[integer])); + } + badGenreIds[0] = badGenreIdsOut; if(badGenreIds[0].size() != 0){ boolean mutualEntries = Utils.checkForMutualEntries(badGenreIds[0], goodGenreIds[0]); if(Settings.disableSafetyFeatures || !mutualEntries){ @@ -293,7 +298,12 @@ public void menuActionAddMod() { JButton buttonGoodGenres = new JButton(I18n.INSTANCE.get("mod.gameplayFeature.addMod.components.button.selectGoodGenres")); buttonGoodGenres.setToolTipText(I18n.INSTANCE.get("mod.gameplayFeature.addMod.components.button.selectGoodGenres.toolTip")); buttonGoodGenres.addActionListener(actionEvent -> { - goodGenreIds[0] = Utils.getSelectedEntries("Select the genre(s) that work with your gameplay feature", I18n.INSTANCE.get("mod.gameplayFeature.addMod.components.button.genres.title"), ModManager.genreMod.getAnalyzer().getContentByAlphabet(), ModManager.genreMod.getAnalyzer().getContentByAlphabet(), true); + ArrayList goodGenrePositions = Utils.getSelectedEntries("Select the genre(s) that work with your gameplay feature", I18n.INSTANCE.get("mod.gameplayFeature.addMod.components.button.genres.title"), ModManager.genreMod.getAnalyzer().getContentByAlphabet(), ModManager.genreMod.getAnalyzer().getContentByAlphabet(), true); + ArrayList goodGenreIdsOut = new ArrayList<>(); + for(Integer integer : goodGenrePositions){ + goodGenreIdsOut.add(ModManager.genreMod.getAnalyzer().getContentIdByName(ModManager.genreMod.getAnalyzer().getContentByAlphabet()[integer])); + } + goodGenreIds[0] = goodGenreIdsOut; if(goodGenreIds[0].size() != 0){ boolean mutualEntries = Utils.checkForMutualEntries(badGenreIds[0], goodGenreIds[0]); if(Settings.disableSafetyFeatures || !mutualEntries){