Skip to content

Commit

Permalink
Merge pull request MegaMek#1698 from Sleet01/Fix_1696_non_VTL_tech_av…
Browse files Browse the repository at this point in the history
…ailability_is_broken_or_at_least_unintuitive_MML

 Fix for Introductory tech level also showing Standard equipment in non-VTL mode.
  • Loading branch information
Sleet01 authored Jan 19, 2025
2 parents 2fa5233 + a493832 commit 4dcf73d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ public void setTechBase(boolean clan, boolean mixed) {
@Override
public SimpleTechLevel getTechLevel() {
try {
return SimpleTechLevel.valueOf(((String) cbTechLevel.getSelectedItem()).toUpperCase());
return SimpleTechLevel.parse((String) cbTechLevel.getSelectedItem());
} catch (Exception e) {
return SimpleTechLevel.STANDARD;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,9 @@ private void setupRowFilter() {
public boolean include(Entry<? extends EquipmentTableModel, ? extends Integer> entry) {
EquipmentTableModel equipModel = entry.getModel();
EquipmentType etype = equipModel.getType(entry.getIdentifier());
// Note: append `&& eSource.getTechManager().getGameYear() >= etype.getProductionDate()`
// or `etype.getCommonDate()` in case we wish to change the availability start year from
// the prototype/introduction date to something later.
return shouldShow(etype);
}
};
Expand Down

0 comments on commit 4dcf73d

Please sign in to comment.