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

Mech/vehicle/omnivehicle turret fixes & improvements #316

Merged
merged 17 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
d7f6c6a
Quad mechs allow both torso and head turrets
lbmaian Nov 12, 2023
a3a90ea
Fix error if removing vehicle turret and adding item without selectin…
lbmaian Nov 12, 2023
04b2627
Revamp mech turrets to fix edge cases and allow equipment, align turr…
lbmaian Nov 12, 2023
d380751
Drag&drop equipment keeps mech turret status if applicable
lbmaian Nov 24, 2023
95d424f
Disallow mounting ammo in mech turret
lbmaian Dec 3, 2023
7c1d4cf
Align rear-mounting menu logic with others wrt menu visibility and co…
lbmaian Dec 3, 2023
87f1cc2
Fix regression from 04b2627 where items weren't actually added to mec…
lbmaian Dec 3, 2023
0fbb9c0
Fix regression from 2415ab5 and related omnivehicle that broke turret…
lbmaian Dec 3, 2023
0e8d8a4
Reallocated equipment retains turreted status
lbmaian Dec 7, 2023
b0aae89
Forgot to copy over some rear-mounting changes from frmMainWide to fr…
lbmaian Dec 7, 2023
b08ea43
Fix regression from b46d085 that inadvertently unset rear turret armor
lbmaian Dec 9, 2023
90e41a7
Fix omnivehicle turrets and other related fixes
lbmaian Dec 9, 2023
f3da3d3
Fix right sponson turret not being propagated to omni loadout
lbmaian Dec 10, 2023
5142633
Fix omnivehicle rear turret tonnage limit not being saved/loaded
lbmaian Dec 9, 2023
5954475
Unlocking omni chassis no longer unchecks omni and zeros out turret t…
lbmaian Dec 11, 2023
35a0523
Add color-coded turret tonnage limits and rear turret tonnage to info…
lbmaian Dec 11, 2023
41d44a5
Move omnivehicle turret tonnage check to pre-save tonnage validation
lbmaian Dec 11, 2023
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
2 changes: 2 additions & 0 deletions Data/Templates/Vee_HTML.html
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@
</tr>
<+-SSW_REMOVE_IF_BLANK-+><tr><td colspan="3">Power Amplifier:</td><td align="right"><+-SSW_POWER_AMP_TONNAGE-+></td></tr>
<+-SSW_REMOVE_IF_BLANK-+><tr><td colspan="3">Turret:</td><td align="right"><+-SSW_TURRET_TONNAGE-+></td></tr>
<+-SSW_REMOVE_IF_BLANK-+><tr><td colspan="3">Rear Turret:</td><td align="right"><+-SSW_REAR_TURRET_TONNAGE-+></td></tr>
<tr>
<td>Armor:</td>
<td colspan="2"><+-SSW_ARMOR_FACTOR-+> points - <+-SSW_ARMOR_TYPE-+></td>
Expand Down Expand Up @@ -190,6 +191,7 @@
<td align="center"><+-SSW_LEFT_ARMOR-+>/<+-SSW_RIGHT_ARMOR-+></td>
</tr>
<+-SSW_REMOVE_IF_BLANK-+><tr><td colspan="2" align="right">Turret:</td><td align="center"></td><td align="center"><+-SSW_TURRET_ARMOR-+></td></tr>
<+-SSW_REMOVE_IF_BLANK-+><tr><td colspan="2" align="right">Rear Turret:</td><td align="center"></td><td align="center"><+-SSW_REAR_TURRET_ARMOR-+></td></tr>
<+-SSW_REMOVE_IF_BLANK-+><tr><td colspan="2" align="right">Rotor:</td><td align="center"></td><td align="center"><+-SSW_ROTOR_ARMOR-+></td>
</tr>
<tr>
Expand Down
3 changes: 3 additions & 0 deletions saw/src/main/java/saw/filehandlers/HTMLWriter.java
Original file line number Diff line number Diff line change
Expand Up @@ -1326,11 +1326,13 @@ private void BuildHash() {
lookup.put( "<+-SSW_RIGHT_ARMOR-+>", "" + CurVee.GetArmor().GetLocationArmor( LocationIndex.CV_LOC_RIGHT ) );
lookup.put( "<+-SSW_REAR_ARMOR-+>", "" + CurVee.GetArmor().GetLocationArmor( LocationIndex.CV_LOC_REAR ) );
lookup.put( "<+-SSW_TURRET_ARMOR-+>", "" + (CurVee.isHasTurret1() ? CurVee.GetArmor().GetLocationArmor( LocationIndex.CV_LOC_TURRET1 ) : "") );
lookup.put( "<+-SSW_REAR_TURRET_ARMOR-+>", "" + (CurVee.isHasTurret2() ? CurVee.GetArmor().GetLocationArmor( LocationIndex.CV_LOC_TURRET2 ) : "") );
lookup.put( "<+-SSW_ROTOR_ARMOR-+>", "" + (CurVee.IsVTOL() ? CurVee.GetArmor().GetLocationArmor( LocationIndex.CV_LOC_ROTOR ) : "") );
lookup.put( "<+-SSW_FRONT_ARMOR_TYPE-+>", " (" + CurVee.GetArmor().GetFrontArmorType().LookupName() + ")" );
lookup.put( "<+-SSW_LEFT_ARMOR_TYPE-+>", " (" + CurVee.GetArmor().GetLeftArmorType().LookupName() + ")" );
lookup.put( "<+-SSW_RIGHT_ARMOR_TYPE-+>", " (" + CurVee.GetArmor().GetRightArmorType().LookupName() + ")" );
lookup.put( "<+-SSW_TURRET_ARMOR_TYPE-+>", (CurVee.isHasTurret1() ? " (" + CurVee.GetArmor().GetTurret1ArmorType().LookupName() + ")" : "") );
lookup.put( "<+-SSW_REAR_TURRET_ARMOR_TYPE-+>", (CurVee.isHasTurret2() ? " (" + CurVee.GetArmor().GetTurret2ArmorType().LookupName() + ")" : "") );
lookup.put( "<+-SSW_ROTOR_ARMOR_TYPE-+>", ( CurVee.IsVTOL() ? " (" + CurVee.GetArmor().GetRotorArmorType().LookupName() + ")" : "" ) );
lookup.put( "<+-SSW_REAR_ARMOR_TYPE-+>", " (" + CurVee.GetArmor().GetRearArmorType().LookupName() + ")" );
lookup.put( "<+-SSW_ARMOR_COVERAGE-+>", "" + CurVee.GetArmor().GetCoverage() );
Expand Down Expand Up @@ -1382,6 +1384,7 @@ private void BuildHash() {
lookup.put( "<+-SSW_CONTROLS_TONNAGE-+>", CurVee.GetControls() );
lookup.put( "<+-SSW_LIFTEQUIPMENT_TONNAGE-+>", (CurVee.GetLiftEquipmentTonnage() == 0) ? "" : CurVee.GetLiftEquipmentTonnage() + "" );
lookup.put( "<+-SSW_TURRET_TONNAGE-+>", (CurVee.GetLoadout().GetTurret().GetTonnage() == 0) ? "" : CurVee.GetLoadout().GetTurret().GetTonnage() + "" );
lookup.put( "<+-SSW_REAR_TURRET_TONNAGE-+>", (CurVee.GetLoadout().GetRearTurret().GetTonnage() == 0) ? "" : CurVee.GetLoadout().GetRearTurret().GetTonnage() + "" );
lookup.put( "<+-SSW_RULES_LEVEL-+>", CommonTools.GetRulesLevelString( CurVee.GetRulesLevel() ) );
if( CurVee.IsOmni() ) {
lookup.put( "<+-SSW_POD_TONNAGE-+>", FormatTonnage( ( CurVee.GetTonnage() - CurVee.GetCurrentTons() ), 1 ) );
Expand Down
30 changes: 23 additions & 7 deletions saw/src/main/java/saw/gui/frmVee.form
Original file line number Diff line number Diff line change
Expand Up @@ -413,15 +413,31 @@
<Properties>
<Property name="editable" type="boolean" value="false"/>
<Property name="horizontalAlignment" type="int" value="0"/>
<Property name="text" type="java.lang.String" value="Turret: 000.00"/>
<Property name="text" type="java.lang.String" value="Turret: 00.0/00.0"/>
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[100, 20]"/>
</Property>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[100, 20]"/>
</Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[100, 20]"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JTextField" name="txtRearTurretInfo">
<Properties>
<Property name="editable" type="boolean" value="false"/>
<Property name="horizontalAlignment" type="int" value="0"/>
<Property name="text" type="java.lang.String" value="Rear Turret: 00.0/00.0"/>
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[120, 20]"/>
</Property>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[120, 20]"/>
</Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[100, 20]"/>
<Dimension value="[120, 20]"/>
</Property>
</Properties>
</Component>
Expand All @@ -445,15 +461,15 @@
<Properties>
<Property name="editable" type="boolean" value="false"/>
<Property name="horizontalAlignment" type="int" value="0"/>
<Property name="text" type="java.lang.String" value="Cost: 000,000,000,000.00"/>
<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="[165, 20]"/>
<Dimension value="[120, 20]"/>
</Property>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[165, 20]"/>
<Dimension value="[120, 20]"/>
</Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[165, 20]"/>
<Dimension value="[120, 20]"/>
</Property>
</Properties>
</Component>
Expand Down Expand Up @@ -3563,7 +3579,7 @@
</Container>
</SubComponents>
</Container>
<Container class="javax.swing.JPanel" name="jPanel3">
<Container class="javax.swing.JPanel" name="pnlEquipment">
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription">
<JTabbedPaneConstraints tabName="Equipment">
Expand Down
Loading
Loading