From 0d9663bdee4af357dcefab50dfc63499200a7687 Mon Sep 17 00:00:00 2001 From: Pavel Braginskiy Date: Tue, 19 Mar 2024 22:38:31 -0400 Subject: [PATCH] If 'Use game year' enabled, use that year for unit search --- .../megameklab/ui/dialog/MegaMekLabUnitSelectorDialog.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/megameklab/src/megameklab/ui/dialog/MegaMekLabUnitSelectorDialog.java b/megameklab/src/megameklab/ui/dialog/MegaMekLabUnitSelectorDialog.java index 5e9ebe287..c0d57c636 100644 --- a/megameklab/src/megameklab/ui/dialog/MegaMekLabUnitSelectorDialog.java +++ b/megameklab/src/megameklab/ui/dialog/MegaMekLabUnitSelectorDialog.java @@ -52,6 +52,9 @@ public MegaMekLabUnitSelectorDialog(JFrame parent, UnitLoadingDialog unitLoading gameTechLevel = TechConstants.T_SIMPLE_UNOFFICIAL; allowPickWithoutClose = false; eraBasedTechLevel = CConfig.getBooleanParam(CConfig.TECH_PROGRESSION); + if (CConfig.getBooleanParam(CConfig.TECH_USE_YEAR)) { + allowedYear = CConfig.getIntParam(CConfig.TECH_YEAR); + } initialize(); run(); setVisible(true); @@ -130,7 +133,7 @@ void closeWithoutSelection() { @Override protected void select(boolean close) { chosenEntity = getSelectedEntity(); - + if (close) { setVisible(false); } else if (entityPickCallback != null) {