Skip to content

Commit

Permalink
Add option to halve heat of streaks ala MML
Browse files Browse the repository at this point in the history
  • Loading branch information
lbmaian committed Dec 20, 2023
1 parent af51ba0 commit 8f2139f
Show file tree
Hide file tree
Showing 10 changed files with 93 additions and 41 deletions.
10 changes: 10 additions & 0 deletions saw/src/main/java/saw/gui/dlgPrefs.form
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,16 @@
</Constraint>
</Constraints>
</Component>
<Component class="javax.swing.JCheckBox" name="chkHeatStreaks">
<Properties>
<Property name="text" type="java.lang.String" value="Streaks have 50% fire rate (ala MML)"/>
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="0" gridY="8" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="4" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="17" weightX="0.0" weightY="0.0"/>
</Constraint>
</Constraints>
</Component>
<Component class="javax.swing.JLabel" name="jLabel19">
<Properties>
<Property name="text" type="java.lang.String" value="Non-BV Heat Calculations:"/>
Expand Down
13 changes: 13 additions & 0 deletions saw/src/main/java/saw/gui/dlgPrefs.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ private void SetState() {
chkHeatAllMP.setEnabled( true );
}
chkHeatUAC.setSelected( Prefs.getBoolean( "HeatACFullRate", false ) );
chkHeatStreaks.setSelected( Prefs.getBoolean( "HeatStreaksHalfRate", false ) );
chkCostAmmoMult.setSelected( Prefs.getBoolean( "CostAmmoMult", false ) );
chkAutoAddECM.setSelected( Prefs.getBoolean( "AutoAddECM", true ) );

Expand Down Expand Up @@ -156,6 +157,7 @@ private void SaveState() {
Prefs.putBoolean( "HeatExcludeJumpMP", chkHeatJumpMP.isSelected() );
Prefs.putBoolean( "HeatExcludeAllMP", chkHeatAllMP.isSelected() );
Prefs.putBoolean( "HeatACFullRate", chkHeatUAC.isSelected() );
Prefs.putBoolean( "HeatStreaksHalfRate", chkHeatStreaks.isSelected() );
Prefs.putBoolean( "CostAmmoMult", chkCostAmmoMult.isSelected() );
Prefs.putBoolean( "UseMaxArmorInstead", chkMaxNotInt.isSelected() );
Prefs.putBoolean( "ArmorUseCustomPercent", chkCustomPercents.isSelected() );
Expand Down Expand Up @@ -221,6 +223,7 @@ private void SetDefaults() {
Prefs.putBoolean( "HeatExcludeJumpMP", false );
Prefs.putBoolean( "HeatExcludeAllMP", false );
Prefs.putBoolean( "HeatACFullRate", false );
Prefs.putBoolean( "HeatStreaksHalfRate", false );
Prefs.putBoolean( "CostAmmoMult", false );
Prefs.putBoolean( "UseMaxArmorInstead", false );
Prefs.putBoolean( "ArmorUseCustomPercent", false );
Expand Down Expand Up @@ -300,6 +303,7 @@ private void initComponents() {
chkHeatJumpMP = new javax.swing.JCheckBox();
chkHeatAllMP = new javax.swing.JCheckBox();
chkHeatUAC = new javax.swing.JCheckBox();
chkHeatStreaks = new javax.swing.JCheckBox();
jLabel19 = new javax.swing.JLabel();
jPanel15 = new javax.swing.JPanel();
chkCostAmmoMult = new javax.swing.JCheckBox();
Expand Down Expand Up @@ -671,6 +675,14 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
gridBagConstraints.insets = new java.awt.Insets(4, 0, 0, 0);
jPanel8.add(chkHeatUAC, gridBagConstraints);

chkHeatStreaks.setText("Streaks have 50% fire rate (ala MML)");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 8;
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
gridBagConstraints.insets = new java.awt.Insets(4, 0, 0, 0);
jPanel8.add(chkHeatStreaks, gridBagConstraints);

jLabel19.setText("Non-BV Heat Calculations:");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
Expand Down Expand Up @@ -1695,6 +1707,7 @@ private void btnDefaultImagePathActionPerformed(java.awt.event.ActionEvent evt)
private javax.swing.JCheckBox chkHeatJumpMP;
private javax.swing.JCheckBox chkHeatOSWeapons;
private javax.swing.JCheckBox chkHeatRearWeapons;
private javax.swing.JCheckBox chkHeatStreaks;
private javax.swing.JCheckBox chkHeatSystems;
private javax.swing.JCheckBox chkHeatUAC;
private javax.swing.JCheckBox chkLoadLastMech;
Expand Down
10 changes: 10 additions & 0 deletions ssw/src/main/java/ssw/gui/dlgPrefs.form
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,16 @@
</Constraint>
</Constraints>
</Component>
<Component class="javax.swing.JCheckBox" name="chkHeatStreaks">
<Properties>
<Property name="text" type="java.lang.String" value="Streaks have 50% fire rate (ala MML)"/>
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="0" gridY="8" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="4" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="17" weightX="0.0" weightY="0.0"/>
</Constraint>
</Constraints>
</Component>
<Component class="javax.swing.JLabel" name="jLabel19">
<Properties>
<Property name="text" type="java.lang.String" value="Non-BV Heat Calculations:"/>
Expand Down
13 changes: 13 additions & 0 deletions ssw/src/main/java/ssw/gui/dlgPrefs.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ private void SetState() {
chkHeatAllMP.setEnabled( true );
}
chkHeatUAC.setSelected( Prefs.getBoolean( "HeatACFullRate", false ) );
chkHeatStreaks.setSelected( Prefs.getBoolean( "HeatStreaksHalfRate", false ) );
chkCostAmmoMult.setSelected( Prefs.getBoolean( "CostAmmoMult", false ) );
chkAutoAddECM.setSelected( Prefs.getBoolean( "AutoAddECM", true ) );

Expand Down Expand Up @@ -153,6 +154,7 @@ private void SaveState() {
Prefs.putBoolean( "HeatExcludeJumpMP", chkHeatJumpMP.isSelected() );
Prefs.putBoolean( "HeatExcludeAllMP", chkHeatAllMP.isSelected() );
Prefs.putBoolean( "HeatACFullRate", chkHeatUAC.isSelected() );
Prefs.putBoolean( "HeatStreaksHalfRate", chkHeatStreaks.isSelected() );
Prefs.putBoolean( "CostAmmoMult", chkCostAmmoMult.isSelected() );
Prefs.putBoolean( "UseMaxArmorInstead", chkMaxNotInt.isSelected() );
Prefs.putBoolean( "ArmorUseCustomPercent", chkCustomPercents.isSelected() );
Expand Down Expand Up @@ -216,6 +218,7 @@ private void SetDefaults() {
Prefs.putBoolean( "HeatExcludeJumpMP", false );
Prefs.putBoolean( "HeatExcludeAllMP", false );
Prefs.putBoolean( "HeatACFullRate", false );
Prefs.putBoolean( "HeatStreaksHalfRate", false );
Prefs.putBoolean( "CostAmmoMult", false );
Prefs.putBoolean( "UseMaxArmorInstead", false );
Prefs.putBoolean( "ArmorUseCustomPercent", false );
Expand Down Expand Up @@ -295,6 +298,7 @@ private void initComponents() {
chkHeatJumpMP = new javax.swing.JCheckBox();
chkHeatAllMP = new javax.swing.JCheckBox();
chkHeatUAC = new javax.swing.JCheckBox();
chkHeatStreaks = new javax.swing.JCheckBox();
jLabel19 = new javax.swing.JLabel();
jPanel15 = new javax.swing.JPanel();
chkCostAmmoMult = new javax.swing.JCheckBox();
Expand Down Expand Up @@ -665,6 +669,14 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
gridBagConstraints.insets = new java.awt.Insets(4, 0, 0, 0);
jPanel8.add(chkHeatUAC, gridBagConstraints);

chkHeatStreaks.setText("Streaks have 50% fire rate (ala MML)");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 8;
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
gridBagConstraints.insets = new java.awt.Insets(4, 0, 0, 0);
jPanel8.add(chkHeatStreaks, gridBagConstraints);

jLabel19.setText("Non-BV Heat Calculations:");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
Expand Down Expand Up @@ -1681,6 +1693,7 @@ private void btnDefaultImagePathActionPerformed(java.awt.event.ActionEvent evt)
private javax.swing.JCheckBox chkHeatJumpMP;
private javax.swing.JCheckBox chkHeatOSWeapons;
private javax.swing.JCheckBox chkHeatRearWeapons;
private javax.swing.JCheckBox chkHeatStreaks;
private javax.swing.JCheckBox chkHeatSystems;
private javax.swing.JCheckBox chkHeatUAC;
private javax.swing.JCheckBox chkLoadLastMech;
Expand Down
14 changes: 7 additions & 7 deletions ssw/src/main/java/ssw/gui/frmMain.form
Original file line number Diff line number Diff line change
Expand Up @@ -8156,15 +8156,15 @@
<Font name="Arial" size="11" style="0"/>
</Property>
<Property name="horizontalAlignment" type="int" value="0"/>
<Property name="text" type="java.lang.String" value="Max Heat: 000"/>
<Property name="text" type="java.lang.String" value="Max Heat: 00.0"/>
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[77, 20]"/>
<Dimension value="[87, 20]"/>
</Property>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[77, 20]"/>
<Dimension value="[87, 20]"/>
</Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[77, 20]"/>
<Dimension value="[87, 20]"/>
</Property>
</Properties>
</Component>
Expand Down Expand Up @@ -8253,13 +8253,13 @@
<Property name="horizontalAlignment" type="int" value="0"/>
<Property name="text" type="java.lang.String" value="Cost: 000,000,000"/>
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[125, 20]"/>
<Dimension value="[115, 20]"/>
</Property>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[125, 20]"/>
<Dimension value="[115, 20]"/>
</Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[125, 20]"/>
<Dimension value="[115, 20]"/>
</Property>
</Properties>
</Component>
Expand Down
16 changes: 8 additions & 8 deletions ssw/src/main/java/ssw/gui/frmMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -2163,7 +2163,7 @@ public void RefreshInfoPane() {
txtInfoTonnage.setText( "Tons: " + CurMech.GetCurrentTons() );
txtInfoFreeTons.setText( "Free Tons: " + ( CurMech.GetTonnage() - CurMech.GetCurrentTons() ) );
}
txtInfoMaxHeat.setText( "Max Heat: " + CurMech.GetMaxHeat() );
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() );
Expand Down Expand Up @@ -9895,10 +9895,10 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
txtInfoMaxHeat.setEditable(false);
txtInfoMaxHeat.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N
txtInfoMaxHeat.setHorizontalAlignment(javax.swing.JTextField.CENTER);
txtInfoMaxHeat.setText("Max Heat: 000");
txtInfoMaxHeat.setMaximumSize(new java.awt.Dimension(77, 20));
txtInfoMaxHeat.setMinimumSize(new java.awt.Dimension(77, 20));
txtInfoMaxHeat.setPreferredSize(new java.awt.Dimension(77, 20));
txtInfoMaxHeat.setText("Max Heat: 00.0");
txtInfoMaxHeat.setMaximumSize(new java.awt.Dimension(87, 20));
txtInfoMaxHeat.setMinimumSize(new java.awt.Dimension(87, 20));
txtInfoMaxHeat.setPreferredSize(new java.awt.Dimension(87, 20));
pnlInfoPanel.add(txtInfoMaxHeat);

txtInfoHeatDiss.setEditable(false);
Expand Down Expand Up @@ -9941,9 +9941,9 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
txtInfoCost.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N
txtInfoCost.setHorizontalAlignment(javax.swing.JTextField.CENTER);
txtInfoCost.setText("Cost: 000,000,000");
txtInfoCost.setMaximumSize(new java.awt.Dimension(125, 20));
txtInfoCost.setMinimumSize(new java.awt.Dimension(125, 20));
txtInfoCost.setPreferredSize(new java.awt.Dimension(125, 20));
txtInfoCost.setMaximumSize(new java.awt.Dimension(115, 20));
txtInfoCost.setMinimumSize(new java.awt.Dimension(115, 20));
txtInfoCost.setPreferredSize(new java.awt.Dimension(115, 20));
pnlInfoPanel.add(txtInfoCost);

gridBagConstraints = new java.awt.GridBagConstraints();
Expand Down
14 changes: 7 additions & 7 deletions ssw/src/main/java/ssw/gui/frmMainWide.form
Original file line number Diff line number Diff line change
Expand Up @@ -7999,15 +7999,15 @@
<Font name="Arial" size="11" style="0"/>
</Property>
<Property name="horizontalAlignment" type="int" value="0"/>
<Property name="text" type="java.lang.String" value="Max Heat: 000"/>
<Property name="text" type="java.lang.String" value="Max Heat: 00.0"/>
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[77, 20]"/>
<Dimension value="[87, 20]"/>
</Property>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[77, 20]"/>
<Dimension value="[87, 20]"/>
</Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[77, 20]"/>
<Dimension value="[87, 20]"/>
</Property>
</Properties>
</Component>
Expand Down Expand Up @@ -8096,13 +8096,13 @@
<Property name="horizontalAlignment" type="int" value="0"/>
<Property name="text" type="java.lang.String" value="Cost: 000,000,000"/>
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[125, 20]"/>
<Dimension value="[115, 20]"/>
</Property>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[125, 20]"/>
<Dimension value="[115, 20]"/>
</Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[125, 20]"/>
<Dimension value="[115, 20]"/>
</Property>
</Properties>
</Component>
Expand Down
16 changes: 8 additions & 8 deletions ssw/src/main/java/ssw/gui/frmMainWide.java
Original file line number Diff line number Diff line change
Expand Up @@ -2157,7 +2157,7 @@ public void RefreshInfoPane() {
txtInfoTonnage.setText( "Tons: " + CurMech.GetCurrentTons() );
txtInfoFreeTons.setText( "Free Tons: " + ( CurMech.GetTonnage() - CurMech.GetCurrentTons() ) );
}
txtInfoMaxHeat.setText( "Max Heat: " + CurMech.GetMaxHeat() );
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() );
Expand Down Expand Up @@ -9718,10 +9718,10 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
txtInfoMaxHeat.setEditable(false);
txtInfoMaxHeat.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N
txtInfoMaxHeat.setHorizontalAlignment(javax.swing.JTextField.CENTER);
txtInfoMaxHeat.setText("Max Heat: 000");
txtInfoMaxHeat.setMaximumSize(new java.awt.Dimension(77, 20));
txtInfoMaxHeat.setMinimumSize(new java.awt.Dimension(77, 20));
txtInfoMaxHeat.setPreferredSize(new java.awt.Dimension(77, 20));
txtInfoMaxHeat.setText("Max Heat: 00.0");
txtInfoMaxHeat.setMaximumSize(new java.awt.Dimension(87, 20));
txtInfoMaxHeat.setMinimumSize(new java.awt.Dimension(87, 20));
txtInfoMaxHeat.setPreferredSize(new java.awt.Dimension(87, 20));
pnlInfoPanel.add(txtInfoMaxHeat);

txtInfoHeatDiss.setEditable(false);
Expand Down Expand Up @@ -9764,9 +9764,9 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
txtInfoCost.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N
txtInfoCost.setHorizontalAlignment(javax.swing.JTextField.CENTER);
txtInfoCost.setText("Cost: 000,000,000");
txtInfoCost.setMaximumSize(new java.awt.Dimension(125, 20));
txtInfoCost.setMinimumSize(new java.awt.Dimension(125, 20));
txtInfoCost.setPreferredSize(new java.awt.Dimension(125, 20));
txtInfoCost.setMaximumSize(new java.awt.Dimension(115, 20));
txtInfoCost.setMinimumSize(new java.awt.Dimension(115, 20));
txtInfoCost.setPreferredSize(new java.awt.Dimension(115, 20));
pnlInfoPanel.add(txtInfoCost);

txtChatInfo.setBackground(new java.awt.Color(238, 238, 238));
Expand Down
2 changes: 1 addition & 1 deletion sswlib/src/main/java/Print/PrintMech.java
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ 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( "Weapon Heat (" + CurMech.GetWeaponHeat(false, false, true, false) + ")", p[PrintConsts.MAX_HEAT].x-1, p[PrintConsts.MAX_HEAT].y-7 );
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 );
Expand Down
Loading

0 comments on commit 8f2139f

Please sign in to comment.