diff --git a/changelog.md b/changelog.md index 0cfb6bff..0cf3b834 100644 --- a/changelog.md +++ b/changelog.md @@ -6,6 +6,10 @@ - Custom hardware icons can now be added - Hardware icons that have been set by editing the game files are now recognized. This means that they will be included when importing and exporting the hardware. +### Removed features +- It is no longer possible to add a description to custom hardware + - This is because the game no longer supports descriptions for custom hardware + ### Other - Updated some spinner values: - Global: diff --git a/src/main/java/com/github/lmh01/mgt2mt/content/Hardware.java b/src/main/java/com/github/lmh01/mgt2mt/content/Hardware.java index dab8bf07..b25184e2 100644 --- a/src/main/java/com/github/lmh01/mgt2mt/content/Hardware.java +++ b/src/main/java/com/github/lmh01/mgt2mt/content/Hardware.java @@ -17,7 +17,6 @@ public class Hardware extends AbstractAdvancedContent implements DependentContent, RequiresPictures { - String description; String date; public HardwareType hardwareType; int researchPoints; @@ -32,7 +31,6 @@ public class Hardware extends AbstractAdvancedContent implements DependentConten public Hardware(String name, Integer id, TranslationManager translationManager, - String description, String date, HardwareType hardwareType, int researchPoints, @@ -48,7 +46,6 @@ public Hardware(String name, if (onlyHandheld && onlyStationary) { throw new ModProcessingException("Unable to construct hardware: Invalid arguments"); } - this.description = description; this.date = date; this.hardwareType = hardwareType; this.researchPoints = researchPoints; @@ -66,7 +63,6 @@ public Map getMap() { Map map = new HashMap<>(); insertIdInMap(map); map.put("NAME EN", name); - map.put("DESC EN", description); map.put("TYP", Integer.toString(hardwareType.getId())); map.put("DATE", date); map.put("RES POINTS", Integer.toString(researchPoints)); @@ -108,7 +104,6 @@ public String getOptionPaneMessage() { return "" + I18n.INSTANCE.get("mod.hardware.addMod.optionPaneMessage.firstPart") + "

" + I18n.INSTANCE.get("commonText.name") + ": " + name + "
" + - I18n.INSTANCE.get("commonText.description") + ": " + description + "
" + I18n.INSTANCE.get("commonText.unlockDate") + ": " + date + "
" + I18n.INSTANCE.get("commonText.researchPointCost") + ": " + researchPoints + "
" + I18n.INSTANCE.get("commonText.price") + ": " + price + "
" + diff --git a/src/main/java/com/github/lmh01/mgt2mt/content/manager/HardwareManager.java b/src/main/java/com/github/lmh01/mgt2mt/content/manager/HardwareManager.java index 6cc20754..1b29ae0e 100644 --- a/src/main/java/com/github/lmh01/mgt2mt/content/manager/HardwareManager.java +++ b/src/main/java/com/github/lmh01/mgt2mt/content/manager/HardwareManager.java @@ -146,7 +146,6 @@ public AbstractBaseContent constructContentFromMap(Map map) thro map.get("NAME EN"), getIdFromMap(map), new TranslationManager(map), - map.get("DESC EN"), map.get("DATE"), HardwareType.getFromId(Integer.parseInt(map.get("TYP"))), Integer.parseInt(map.get("RES POINTS")), @@ -212,7 +211,6 @@ public AbstractBaseContent constructContentFromImportMap(Map map (String) map.get("NAME EN"), getIdFromMap(map), new TranslationManager(map), - (String) map.get("DESC EN"), (String) map.get("DATE"), HardwareType.getFromId(Integer.parseInt((String) map.get("TYP"))), Integer.parseInt((String) map.get("RES POINTS")), @@ -233,10 +231,6 @@ public void openAddModGui() throws ModProcessingException { final Map[] mapNameTranslations = new Map[]{new HashMap<>()}; AtomicBoolean nameTranslationsAdded = new AtomicBoolean(false); JButton buttonAddNameTranslations = WindowHelper.getAddTranslationsButton(mapNameTranslations, nameTranslationsAdded, 0); - JTextField textFieldDescription = new JTextField(I18n.INSTANCE.get("mod.hardware.addMod.components.textFieldDescription.initialValue")); - final Map[] mapDescriptionTranslation = new Map[]{new HashMap<>()}; - AtomicBoolean descriptionTranslationsAdded = new AtomicBoolean(false); - JButton buttonAddDescriptionTranslations = WindowHelper.getAddTranslationsButton(mapDescriptionTranslation, descriptionTranslationsAdded, 1); JComboBox comboBoxUnlockMonth = WindowHelper.getUnlockMonthComboBox(); JSpinner spinnerUnlockYear = WindowHelper.getUnlockYearSpinner(); JComboBox comboBoxType = WindowHelper.getComboBox(HardwareType.class, "mod.hardware.addMod.components.comboBox.type.toolTip", HardwareType.CPU.getTypeName()); @@ -280,10 +274,10 @@ public void openAddModGui() throws ModProcessingException { } }); - Object[] params = {WindowHelper.getNamePanel(textFieldName), buttonAddNameTranslations, WindowHelper.getDescriptionPanel(textFieldDescription), buttonAddDescriptionTranslations, WindowHelper.getUnlockDatePanel(comboBoxUnlockMonth, spinnerUnlockYear), WindowHelper.getTypePanel(comboBoxType), WindowHelper.getSpinnerPanel(spinnerResearchPoints, SpinnerType.RESEARCH_POINT_COST), WindowHelper.getSpinnerPanel(spinnerCost, SpinnerType.PRICE), WindowHelper.getSpinnerPanel(spinnerDevelopmentCost, SpinnerType.DEVELOPMENT_COST), WindowHelper.getSpinnerPanel(spinnerTechLevel, SpinnerType.TECH_LEVEL), checkBoxEnableExclusivity, comboBoxExclusivity, componentRatingDescription, buttonCustomIcon}; + Object[] params = {WindowHelper.getNamePanel(textFieldName), buttonAddNameTranslations, WindowHelper.getUnlockDatePanel(comboBoxUnlockMonth, spinnerUnlockYear), WindowHelper.getTypePanel(comboBoxType), WindowHelper.getSpinnerPanel(spinnerResearchPoints, SpinnerType.RESEARCH_POINT_COST), WindowHelper.getSpinnerPanel(spinnerCost, SpinnerType.PRICE), WindowHelper.getSpinnerPanel(spinnerDevelopmentCost, SpinnerType.DEVELOPMENT_COST), WindowHelper.getSpinnerPanel(spinnerTechLevel, SpinnerType.TECH_LEVEL), checkBoxEnableExclusivity, comboBoxExclusivity, componentRatingDescription, buttonCustomIcon}; while (true) { if (JOptionPane.showConfirmDialog(null, params, I18n.INSTANCE.get("commonText.add.upperCase") + ": " + getType(), JOptionPane.OK_CANCEL_OPTION) == JOptionPane.OK_OPTION) { - if (!textFieldName.getText().equals(I18n.INSTANCE.get("mod.hardware.addMod.components.textFieldName.initialValue")) && !textFieldDescription.getText().equals(I18n.INSTANCE.get("mod.hardware.addMod.components.textFieldDescription.initialValue"))) { + if (!textFieldName.getText().equals(I18n.INSTANCE.get("mod.hardware.addMod.components.textFieldName.initialValue"))) { boolean modAlreadyExists = false; for (String string : getContentByAlphabet()) { if (textFieldName.getText().equals(string)) { @@ -327,8 +321,7 @@ public void openAddModGui() throws ModProcessingException { AbstractBaseContent hardware = new Hardware( textFieldName.getText(), null, - new TranslationManager(mapNameTranslations[0], mapDescriptionTranslation[0]), - textFieldDescription.getText(), + new TranslationManager(mapNameTranslations[0]), Months.getDataNameByTypeName(Objects.requireNonNull(comboBoxUnlockMonth.getSelectedItem()).toString()) + " " + spinnerUnlockYear.getValue().toString(), hT, Integer.parseInt(spinnerResearchPoints.getValue().toString()), diff --git a/src/main/resources/locale/de.txt b/src/main/resources/locale/de.txt index 42f0f67f..d7ffc40a 100644 --- a/src/main/resources/locale/de.txt +++ b/src/main/resources/locale/de.txt @@ -533,7 +533,6 @@ mod.hardwareFeature.addMod.components.checkBoxOnlyStationary.toolTip|Aktiviere d mod.hardwareFeature.addMod.components.textFieldDescription.initialValue|GIB EINE BESCHREIBUNG FÜR DIE HARDWARE EIN mod.hardware.addMod.optionPaneMessage.firstPart|Diese Hardware hinzufügen? mod.hardware.addMod.components.textFieldName.initialValue|GIB EINEN NAMEN FÜR DIE HARDWARE EIN -mod.hardware.addMod.components.textFieldDescription.initialValue|GIB EINEN BESCHREIBUNG FÜR DIE HARDWARE EIN mod.hardware.addMod.components.comboBox.type.toolTip|Wähle aus, von welchem Typ die Hardware sein soll mod.hardware.addMod.components.checkBox.exclusiveConsole|Exlusivität für eine Konsolenart aktivieren mod.hardware.addMod.components.checkBox.exclusiveConsole.toolTip|Aktiviere dieses Kästchen, damit die Hardware nur für eine bestimmte Konsolenart benutzt werden können soll
Die erlaubte Konsolenart kann unten ausgewählt werden diff --git a/src/main/resources/locale/en.txt b/src/main/resources/locale/en.txt index 91bc79ac..6ff17802 100644 --- a/src/main/resources/locale/en.txt +++ b/src/main/resources/locale/en.txt @@ -534,7 +534,6 @@ mod.hardwareFeature.addMod.components.checkBoxOnlyStationary.toolTip|Aktiviere d mod.hardwareFeature.addMod.components.textFieldDescription.initialValue|ENTER HARDWARE FEATURE DESCRIPTION mod.hardware.addMod.optionPaneMessage.firstPart|Add this hardware? mod.hardware.addMod.components.textFieldName.initialValue|ENTER HARDWARE NAME -mod.hardware.addMod.components.textFieldDescription.initialValue|ENTER HARDWARE DESCRIPTION mod.hardware.addMod.components.comboBox.type.toolTip|Select what type the hardware should be mod.hardware.addMod.components.checkBox.exclusiveConsole|Enable console exclusivity mod.hardware.addMod.components.checkBox.exclusiveConsole.toolTip|Check this box to make the hardware exclusive for a specific hardware type.
You can select the allowed console type below