Skip to content

Commit

Permalink
No Booster in Omni pods + Clear Use flags
Browse files Browse the repository at this point in the history
Cannot add booster to an omni pod.
When you change tech it clears the flags so that you don't have to click, unclick, and re-click to add.
  • Loading branch information
George Blouin authored and George Blouin committed Jan 31, 2023
1 parent 261b67a commit ea09ef4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
6 changes: 4 additions & 2 deletions saw/src/main/java/saw/gui/frmVee.java
Original file line number Diff line number Diff line change
Expand Up @@ -7129,7 +7129,7 @@ private void RefreshEquipment() {
} else {
chkSupercharger.setEnabled( false );
}
if( CurVee.IsVTOL() && CommonTools.IsAllowed( CurVee.GetLoadout().GetVTOLBooster().GetAvailability(), CurVee ) ) {
if( CurVee.IsVTOL() && CommonTools.IsAllowed( CurVee.GetLoadout().GetVTOLBooster().GetAvailability(), CurVee ) && !CurVee.IsOmni()) {
chkJetBooster.setEnabled( true );
} else {
chkJetBooster.setEnabled( false );
Expand Down Expand Up @@ -7304,6 +7304,7 @@ private void UnlockGUIFromOmni() {
chkYearRestrict.setEnabled( true );
//chkBSPFD.setEnabled( true );
chkSupercharger.setEnabled( true );
chkJetBooster.setEnabled(true);
chkEnviroSealing.setEnabled( false );
// now enable the Omni controls
cmbOmniVariant.setSelectedItem("");
Expand Down Expand Up @@ -8576,7 +8577,7 @@ private void CheckEquipment() {
}

private void LockGUIForOmni() {
// this locks most of the GUI controls. Used mainly by Omnimechs.
// this locks most of the GUI controls. Used mainly by OmniVehicles.
isLocked = true;

chkOmniVee.setSelected( true );
Expand All @@ -8601,6 +8602,7 @@ private void LockGUIForOmni() {
btnLockChassis.setEnabled( false );
chkYearRestrict.setEnabled( false );
chkTrailer.setEnabled( false );
chkJetBooster.setEnabled(false);
if( CurVee.GetBaseLoadout().GetJumpJets().GetNumJJ() > 0 ) {
//cmbJumpJetType.setEnabled( false );
}
Expand Down
6 changes: 4 additions & 2 deletions saw/src/main/java/saw/gui/frmVeeWide.java
Original file line number Diff line number Diff line change
Expand Up @@ -6407,7 +6407,7 @@ private void RefreshEquipment() {
} else {
chkSupercharger.setEnabled( false );
}
if( CurVee.IsVTOL() && CommonTools.IsAllowed( CurVee.GetLoadout().GetVTOLBooster().GetAvailability(), CurVee ) ) {
if( CurVee.IsVTOL() && CommonTools.IsAllowed( CurVee.GetLoadout().GetVTOLBooster().GetAvailability(), CurVee ) && !CurVee.isOmni() ) {
chkJetBooster.setEnabled( true );
} else {
chkJetBooster.setEnabled( false );
Expand Down Expand Up @@ -6578,6 +6578,7 @@ private void UnlockGUIFromOmni() {
chkYearRestrict.setEnabled( true );
//chkBSPFD.setEnabled( true );
chkSupercharger.setEnabled( true );
chkJetBooster.setEnabled(true);
chkEnviroSealing.setEnabled( false );
// now enable the Omni controls
cmbOmniVariant.setEnabled( false );
Expand Down Expand Up @@ -6847,7 +6848,7 @@ private void CheckEquipment() {
}

private void LockGUIForOmni() {
// this locks most of the GUI controls. Used mainly by Omnimechs.
// this locks most of the GUI controls. Used mainly by OmniVehichles.
isLocked = true;

chkOmniVee.setSelected( true );
Expand Down Expand Up @@ -6888,6 +6889,7 @@ private void LockGUIForOmni() {

chkFractional.setEnabled( false );
chkEnviroSealing.setEnabled( false );
chkJetBooster.setEnabled(false);
if( CurVee.GetBaseLoadout().HasSupercharger() ) {
chkSupercharger.setEnabled( false );
}
Expand Down
2 changes: 2 additions & 0 deletions sswlib/src/main/java/components/CVLoadout.java
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@ public void FullUnallocate() {

public void ClearLoadout() {
FullUnallocate();
UsingSupercharger = false;
UsingVTOLBooster = false;
Owner.SetChanged( true );
}

Expand Down

0 comments on commit ea09ef4

Please sign in to comment.