Skip to content

Commit

Permalink
If 'Use game year' enabled, use that year for unit search
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelbraginskiy committed Mar 20, 2024
1 parent 18d2f85 commit 0d9663b
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -130,7 +133,7 @@ void closeWithoutSelection() {
@Override
protected void select(boolean close) {
chosenEntity = getSelectedEntity();

if (close) {
setVisible(false);
} else if (entityPickCallback != null) {
Expand Down

0 comments on commit 0d9663b

Please sign in to comment.