Skip to content

Commit

Permalink
Merge pull request #1310 from MegaMek/unit_selector_tech_level
Browse files Browse the repository at this point in the history
Unit selector filtering
  • Loading branch information
SJuliez authored Sep 8, 2023
2 parents add8a2a + b67f6f2 commit edb67cc
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import megamek.common.Entity;
import megamek.common.MechSummary;
import megamek.common.TechConstants;
import megameklab.util.CConfig;

import javax.swing.*;
import java.awt.*;
Expand All @@ -46,6 +47,7 @@ public MegaMekLabUnitSelectorDialog(JFrame parent, UnitLoadingDialog unitLoading
super(parent, unitLoadingDialog);
gameTechLevel = TechConstants.T_SIMPLE_UNOFFICIAL;
allowPickWithoutClose = false;
eraBasedTechLevel = CConfig.getBooleanParam(CConfig.TECH_PROGRESSION);
initialize();
run();
setVisible(true);
Expand All @@ -60,6 +62,7 @@ public MegaMekLabUnitSelectorDialog(JFrame parent, UnitLoadingDialog unitLoading
super(parent, unitLoadingDialog);
gameTechLevel = TechConstants.T_SIMPLE_UNOFFICIAL;
allowPickWithoutClose = true;
eraBasedTechLevel = CConfig.getBooleanParam(CConfig.TECH_PROGRESSION);
this.entityPickCallback = entityPickCallback;
initialize();
// This overrides the default close behavior to avoid selecting another unit when closing with ESC or
Expand Down

0 comments on commit edb67cc

Please sign in to comment.