Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert to use ETYPE_AERO in MML #1437

Merged
merged 1 commit into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions megameklab/src/megameklab/ui/MenuBar.java
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ private JMenu createSwitchUnitTypeMenu() {
final JMenuItem miSwitchToFighter = new JMenuItem(resources.getString("miSwitchToFighter.text"));
miSwitchToFighter.setName("miSwitchToFighter");
miSwitchToFighter.setMnemonic(KeyEvent.VK_A);
miSwitchToFighter.addActionListener(evt -> owner.newUnit(Entity.ETYPE_AEROSPACEFIGHTER));
miSwitchToFighter.addActionListener(evt -> owner.newUnit(Entity.ETYPE_AERO));
switchUnitTypeMenu.add(miSwitchToFighter);
}

Expand Down Expand Up @@ -1058,7 +1058,7 @@ private void jMenuResetEntity_actionPerformed(ActionEvent event) {
} else if (en.hasETypeFlag(Entity.ETYPE_JUMPSHIP)) {
getUnitMainUi().createNewUnit(Entity.ETYPE_JUMPSHIP);
} else if (owner.getEntity() instanceof Aero) {
getUnitMainUi().createNewUnit(Entity.ETYPE_AEROSPACEFIGHTER, en.isPrimitive());
getUnitMainUi().createNewUnit(Entity.ETYPE_AERO, en.isPrimitive());
} else if (owner.getEntity() instanceof BattleArmor) {
getUnitMainUi().createNewUnit(Entity.ETYPE_BATTLEARMOR);
} else if (owner.getEntity() instanceof Infantry) {
Expand Down
2 changes: 1 addition & 1 deletion megameklab/src/megameklab/ui/dialog/UiLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public static void loadUi(Entity newUnit, String fileName) {
} else if (newUnit.hasETypeFlag(Entity.ETYPE_JUMPSHIP)) {
new UiLoader(Entity.ETYPE_JUMPSHIP, newUnit.isPrimitive(), false, newUnit, fileName).show();
} else if ((newUnit instanceof Aero) && !(newUnit instanceof FixedWingSupport)) {
new UiLoader(Entity.ETYPE_AEROSPACEFIGHTER, newUnit.isPrimitive(), false, newUnit, fileName).show();
new UiLoader(Entity.ETYPE_AERO, newUnit.isPrimitive(), false, newUnit, fileName).show();
} else if (newUnit instanceof BattleArmor) {
new UiLoader(Entity.ETYPE_BATTLEARMOR, false, false, newUnit, fileName).show();
} else if (newUnit instanceof Infantry) {
Expand Down
4 changes: 2 additions & 2 deletions megameklab/src/megameklab/ui/fighterAero/ASMainUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public class ASMainUI extends MegaMekLabMainUI {

public ASMainUI(boolean primitive) {
super();
createNewUnit(Entity.ETYPE_AEROSPACEFIGHTER, primitive);
createNewUnit(Entity.ETYPE_AERO, primitive);
finishSetup();
}

Expand Down Expand Up @@ -88,7 +88,7 @@ public void reloadTabs() {
@Override
public void createNewUnit(long entityType, boolean isPrimitive, boolean isIndustrial, Entity oldEntity) {

if (entityType == Entity.ETYPE_AEROSPACEFIGHTER) {
if (entityType == Entity.ETYPE_AERO) {
setEntity(new AeroSpaceFighter());
getEntity().setTechLevel(TechConstants.T_IS_TW_NON_BOX);
} else if (entityType == Entity.ETYPE_CONV_FIGHTER) {
Expand Down
Loading