diff --git a/ssw/src/main/java/ssw/gui/frmMain.java b/ssw/src/main/java/ssw/gui/frmMain.java index 5213101e..ddb1f92c 100644 --- a/ssw/src/main/java/ssw/gui/frmMain.java +++ b/ssw/src/main/java/ssw/gui/frmMain.java @@ -856,11 +856,11 @@ private void FixJJSpinnerModel() { } if( CurMech.GetJumpJets().IsImproved() ) { - if( CurMech.GetArmor().IsHardened() && !CurMech.GetJumpJets().IsImproved() ) { - max = CurMech.GetRunningMP() - 1; - } else { + // if( CurMech.GetArmor().IsHardened() && !CurMech.GetJumpJets().IsImproved() ) { + // max = CurMech.GetRunningMP() - 1; + // } else { max = CurMech.GetRunningMP(); - } + // } } else { max = CurMech.GetWalkingMP(); } @@ -1796,6 +1796,8 @@ private void RecalcArmor() { } } SetPatchworkArmor(); + // Included to update run speed if hardened armor is added/removed. + FixWalkMPSpinner(); } private void SetPatchworkArmor() { @@ -2163,7 +2165,12 @@ public void RefreshInfoPane() { txtInfoTonnage.setText( "Tons: " + CurMech.GetCurrentTons() ); txtInfoFreeTons.setText( "Free Tons: " + ( CurMech.GetTonnage() - CurMech.GetCurrentTons() ) ); } - txtInfoMaxHeat.setText( "Max Heat: " + String.format( "%1$,.1f", CurMech.GetMaxHeat() ) ); + // Change to make string format reactive. + if(CurMech.GetMaxHeat() % 2 == 0) { + txtInfoMaxHeat.setText( "Max Heat: " + String.format( "%1$,.0f", CurMech.GetMaxHeat() ) ); + } else { + txtInfoMaxHeat.setText( "Max Heat: " + String.format( "%1$,.1f", CurMech.GetMaxHeat() ) ); + } txtInfoHeatDiss.setText( "Heat Dissipation: " + CurMech.GetHeatSinks().TotalDissipation() ); txtInfoFreeCrits.setText( "Free Crits: " + CurMech.GetLoadout().FreeCrits() ); txtInfoUnplaced.setText( "Unplaced Crits: " + CurMech.GetLoadout().UnplacedCrits() ); diff --git a/ssw/src/main/java/ssw/gui/frmMainWide.java b/ssw/src/main/java/ssw/gui/frmMainWide.java index b916b727..765df0ef 100644 --- a/ssw/src/main/java/ssw/gui/frmMainWide.java +++ b/ssw/src/main/java/ssw/gui/frmMainWide.java @@ -852,11 +852,11 @@ private void FixJJSpinnerModel() { } if( CurMech.GetJumpJets().IsImproved() ) { - if( CurMech.GetArmor().IsHardened() && !CurMech.GetJumpJets().IsImproved() ) { - max = CurMech.GetRunningMP() - 1; - } else { + // if( CurMech.GetArmor().IsHardened() && !CurMech.GetJumpJets().IsImproved() ) { + // max = CurMech.GetRunningMP() - 1; + // } else { max = CurMech.GetRunningMP(); - } + // } } else { max = CurMech.GetWalkingMP(); } @@ -1790,6 +1790,8 @@ private void RecalcArmor() { } } SetPatchworkArmor(); + // Included to update run speed if hardened armor is added/removed. + FixWalkMPSpinner(); } private void SetPatchworkArmor() { @@ -2157,7 +2159,12 @@ public void RefreshInfoPane() { txtInfoTonnage.setText( "Tons: " + CurMech.GetCurrentTons() ); txtInfoFreeTons.setText( "Free Tons: " + ( CurMech.GetTonnage() - CurMech.GetCurrentTons() ) ); } - txtInfoMaxHeat.setText( "Max Heat: " + String.format( "%1$,.1f", CurMech.GetMaxHeat() ) ); + // Change to make string format reactive. + if(CurMech.GetMaxHeat() % 2 == 0) { + txtInfoMaxHeat.setText( "Max Heat: " + String.format( "%1$,.0f", CurMech.GetMaxHeat() ) ); + } else { + txtInfoMaxHeat.setText( "Max Heat: " + String.format( "%1$,.1f", CurMech.GetMaxHeat() ) ); + } txtInfoHeatDiss.setText( "Heat Dissipation: " + CurMech.GetHeatSinks().TotalDissipation() ); txtInfoFreeCrits.setText( "Free Crits: " + CurMech.GetLoadout().FreeCrits() ); txtInfoUnplaced.setText( "Unplaced Crits: " + CurMech.GetLoadout().UnplacedCrits() ); diff --git a/sswlib/src/main/java/Print/PrintMech.java b/sswlib/src/main/java/Print/PrintMech.java index c0700074..8c28e7f7 100644 --- a/sswlib/src/main/java/Print/PrintMech.java +++ b/sswlib/src/main/java/Print/PrintMech.java @@ -553,7 +553,12 @@ private void DrawMechData( Graphics2D graphics ) { graphics.drawString( String.format( "%1$,d", CurMech.GetCurrentBV() ), p[PrintConsts.BV2].x, p[PrintConsts.BV2].y ); else graphics.drawString( String.format( "%1$,.0f (Base: %2$,d)", BV, CurMech.GetCurrentBV() ), p[PrintConsts.BV2].x, p[PrintConsts.BV2].y ); - graphics.drawString( String.format( "Weapon Heat (%1$,.1f)", CurMech.GetWeaponHeat() ), p[PrintConsts.MAX_HEAT].x-1, p[PrintConsts.MAX_HEAT].y-7 ); + // Change to make string format reactive. + if (CurMech.GetWeaponHeat() % 2 == 0) { + graphics.drawString( String.format( "Weapon Heat (%1$,.0f)", CurMech.GetWeaponHeat() ), p[PrintConsts.MAX_HEAT].x-1, p[PrintConsts.MAX_HEAT].y-7 ); + } else { + graphics.drawString( String.format( "Weapon Heat (%1$,.1f)", CurMech.GetWeaponHeat() ), p[PrintConsts.MAX_HEAT].x-1, p[PrintConsts.MAX_HEAT].y-7 ); + } graphics.drawString( "Dissipation (" + CurMech.GetHeatSinks().TotalDissipation() + ")", p[PrintConsts.MAX_HEAT].x-1, p[PrintConsts.MAX_HEAT].y+1 ); //graphics.drawString( "Weapon Heat (" + CurMech.GetWeaponHeat(false, false, true, false) + ")", p[PrintConsts.MAX_HEAT].x-1, p[PrintConsts.MAX_HEAT].y ); graphics.setFont( PrintConsts.SmallFont ); diff --git a/sswlib/src/main/java/components/Mech.java b/sswlib/src/main/java/components/Mech.java index fb72cddf..9b6d7500 100644 --- a/sswlib/src/main/java/components/Mech.java +++ b/sswlib/src/main/java/components/Mech.java @@ -1982,11 +1982,19 @@ public void SetWalkMP( int mp ) throws Exception { } public int GetRunningMP() { - return (int) Math.floor( GetWalkingMP() * 1.5 + 0.5 ); + if(CurArmor.IsHardened()) { + return (int) Math.floor( GetWalkingMP() * 1.5 - 0.5 ); + } else { + return (int) Math.floor( GetWalkingMP() * 1.5 + 0.5 ); + } } public int GetRunningMP( int MiniMult ) { - return (int) Math.floor( ( GetWalkingMP() * MiniMult ) * 1.5 + 0.5 ); + if(CurArmor.IsHardened()) { + return (int) Math.floor( ( GetWalkingMP() * MiniMult ) * 1.5 - 0.5 ); + } else { + return (int) Math.floor( ( GetWalkingMP() * MiniMult ) * 1.5 + 0.5 ); + } } public int GetAdjustedRunningMP( boolean BV, boolean MASCTSM ) { @@ -2292,7 +2300,7 @@ public double GetWeaponHeat() return GetWeaponHeat(Prefs.getBoolean("HeatExcludeOS", false), Prefs.getBoolean( "HeatExcludeRear", false), Prefs.getBoolean( "HeatACFullRate", false), - Prefs.getBoolean( "HeatStreaksHalfRate", false), + Prefs.getBoolean( "HeatStreaksHalfRate", false), Prefs.getBoolean( "HeatExcludeEquips", false)); }