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

Support vee construction data #1452

Merged
merged 86 commits into from
Oct 16, 2019
Merged
Show file tree
Hide file tree
Changes from 75 commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
35a41f0
Merge branch 'master' of /home/cwspain/IdeaProjects/megamek with conf…
neoancient Feb 4, 2019
ef3ee41
Merge remote-tracking branch 'origin/master'
neoancient Feb 4, 2019
409ad6e
Merge branch 'master' of https://github.com/MegaMek/megamek
neoancient Feb 14, 2019
9fecefe
Merge branch 'master' of https://github.com/MegaMek/megamek
neoancient Feb 18, 2019
9ea7d40
Merge remote-tracking branch 'origin/master'
neoancient Mar 19, 2019
37e8c09
Created enums for handling support vee chassis mod construction data.
neoancient Mar 27, 2019
626343c
Added enums for engine construction data.
neoancient Mar 28, 2019
dfad378
Merge branch 'support_vee' of ../megamek-all into support_vee
neoancient Mar 28, 2019
d26d913
Added some tech advancement data for SV components.
neoancient Mar 30, 2019
20b7abd
Changed intro date on WiGE support vee to ES (TM, p. 287).
neoancient Mar 30, 2019
052ed31
Added lookup methods for SVType and SVEngine.
neoancient Mar 31, 2019
92b00e5
Fixed validation for steam and maglev engines.
neoancient Mar 31, 2019
75fb4ee
Account for minimum weights for support vee engines.
neoancient Mar 31, 2019
437dbbe
Fuel weight calculations for fixed wing and airship support vehicles.
neoancient Apr 1, 2019
3a317f0
Changed TestSupportVehicle to extend TestEntity instead of TestTank.
neoancient Apr 1, 2019
94e940b
Added turret weight calculations.
neoancient Apr 1, 2019
52f8931
Added slot calculations.
neoancient Apr 1, 2019
04ab258
Added transport and crew slot calculations.
neoancient Apr 2, 2019
9c9c221
Fixed Engine validation and name problems with Steam and MagLev.
neoancient Apr 8, 2019
905d8a2
Validate engine type against support vehicle type.
neoancient Apr 9, 2019
6d6d45e
Weight class categories for fixed wing.
neoancient Apr 9, 2019
652653d
Method to check chassis mod compatibility
neoancient May 1, 2019
1dd4d57
short names for sv chassis mods
neoancient May 1, 2019
83ff623
Merge remote-tracking branch 'origin/master'
neoancient May 7, 2019
a953503
Changed TestSupportVehicle#ChassisModification
neoancient May 7, 2019
cb2c320
Slot calculations.
neoancient May 8, 2019
f4ef7d8
Override isSupportVehicle to return true for FixedWingSupport
neoancient May 8, 2019
732b919
Track base chassis fire control weight for omni support vehicles.
neoancient May 18, 2019
7f495d7
Advanced armor filtering for support vees.
neoancient May 25, 2019
f3346b4
Support vee armor calculation convenience methods.
neoancient May 27, 2019
12d2153
Calculate support vee armor weight correctly on load.
neoancient May 28, 2019
83702f3
Cleanup in TestSupportVehicle advanced armors.
neoancient May 28, 2019
4542135
Fixed logic in calculating armor weight.
neoancient May 28, 2019
ae3216b
Added support vehicle crew calculations.
neoancient May 31, 2019
51903fd
Merge remote-tracking branch 'origin/master'
neoancient Jun 7, 2019
ff3c94e
Merge remote-tracking branch 'origin/master'
neoancient Jun 10, 2019
a20abc8
Merge branch 'master' into support_vee
neoancient Jun 10, 2019
5d0e22b
Fixed chassis mod lookup test.
neoancient Jun 10, 2019
a71508b
Corrected premature rounding on SV ejection seat.
neoancient Jun 24, 2019
20c50d1
Cleaned up SV seating classes.
neoancient Jun 24, 2019
6d8e72c
Created SV ejection seat as transporter.
neoancient Jun 24, 2019
303e0f0
Adjust tech advancement for ratings B and C.
neoancient Jun 25, 2019
e540433
Added crew quarters constructors for number of crew rather than weight.
neoancient Jun 25, 2019
16543db
Fixed crew quarters slot calculations.
neoancient Jun 26, 2019
71a6641
FLeshed out SV fuel calculations.
neoancient Jul 1, 2019
be9d3a6
/.idea
neoancient Aug 2, 2019
e97123b
Merge remote-tracking branch 'origin/master'
neoancient Aug 2, 2019
a6de03c
removed /.idea
neoancient Aug 2, 2019
06d92fa
Merge branch 'master' into support_vee
neoancient Aug 2, 2019
b7ce527
Added field for omnivehicle sponson/pintle turret fixed weight.
neoancient Aug 7, 2019
a47fe6e
Updated TestSupportVehicle
neoancient Aug 7, 2019
358e251
Merge branch 'master' into support_vee
neoancient Aug 9, 2019
1fc2455
Account for omni base chassis weight in sponson/pintle tonnage calcul…
neoancient Aug 13, 2019
1f8d1eb
Added boolean field to Tank to mark trailer status.
neoancient Aug 13, 2019
8fa62e7
Added external engine type.
neoancient Aug 19, 2019
d99e783
Support for trailers with no engine.
neoancient Aug 19, 2019
ba066f4
Added method to determine when chassis mod is required.
neoancient Aug 19, 2019
50838c4
Fixed rail engine weight calculation.
neoancient Aug 19, 2019
0d4d758
Added rail as allowable non-engine trailer units.
neoancient Aug 19, 2019
8cddf99
Added missing String resources.
neoancient Aug 20, 2019
d1bb421
Handle saving and loading pod mounted bays and quarters.
neoancient Aug 20, 2019
e0e58d3
Separate spinners for pod-mounted quarters.
neoancient Aug 20, 2019
26763d7
Added some rail sprites to keep MM from barfing.
neoancient Aug 20, 2019
37fb42e
Added field for vehicle ICE fuel type.
neoancient Aug 21, 2019
4335bf6
Merge branch 'master' into support_vee
neoancient Aug 21, 2019
906ca29
Replaced string literals with constants for chassis mod lookup names.
neoancient Aug 21, 2019
1623b40
Added tech advancement to SVType.
neoancient Aug 21, 2019
128a4d2
Remove unused imports.
neoancient Aug 21, 2019
97c36b2
# WARNING: head commit changed in the meantime
neoancient Aug 21, 2019
9169f12
Fix small support vee chassis weight rounding.
neoancient Aug 21, 2019
883c015
Include fuel in SV weight calculation.
neoancient Aug 21, 2019
57a4c3b
Take floating point errors into account when rounding kg up.
neoancient Aug 22, 2019
8ac5886
Save support vehicle fuel tonnage.
neoancient Aug 22, 2019
365e4dd
Don't require base crew for SV trailers with no engine.
neoancient Aug 22, 2019
8553de9
Cleanup for FixedWingSupport
neoancient Aug 22, 2019
80ee8df
Merge remote-tracking branch 'origin/master' into support_vee
neoancient Sep 2, 2019
1702de4
Show BAR armor in SV weight breakdown.
neoancient Sep 2, 2019
391a7a2
Fix SV engine weight rounding.
neoancient Sep 3, 2019
1db8514
Apply hydrofoil SV MP boost.
neoancient Sep 3, 2019
e2d9dd3
Set max weight of 100 tons for hydrofoil chassis mod.
neoancient Sep 3, 2019
fb30731
Removed incorrect smallOnly flag from convertible chassis mod.
neoancient Sep 4, 2019
713931e
Override Entity#hasArmoredChassis in FixedWingSupport.
neoancient Sep 7, 2019
47ef9e5
Merge branch 'master' into support_vee
neoancient Oct 8, 2019
db7c30b
Merge remote-tracking branch 'origin/master' into support_vee
neoancient Oct 8, 2019
693d1fc
Added missing imports.
neoancient Oct 8, 2019
576e174
Added null check
neoancient Oct 8, 2019
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11,424 changes: 5,717 additions & 5,707 deletions megamek/data/images/units/mechset.txt

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
#building block data file
<BlockVersion>
1
</BlockVersion>

##Write the version number just in case...
<Version>
MAM0
</Version>

<UnitType>
LargeSupportTank
</UnitType>

<Name>
Adelante Passenger-Cargo Train
</Name>

<Model>
(Standard)
</Model>

<year>
2919
</year>

<originalBuildYear>
2919
</originalBuildYear>

<type>
IS Level 4
</type>

<motion_type>
Rail
</motion_type>

<transporters>
crewquarters:35.0:0
cargobay:28.0:1:2
</transporters>

<cruiseMP>
12
</cruiseMP>

<engine_type>
0
</engine_type>

<internal_type>
-1
</internal_type>

<armor>
40
35
35
35
35
20
</armor>

<Body Equipment>
SV Chassis Mod [Tractor]
</Body Equipment>

<Front Equipment>
</Front Equipment>

<Front Right Equipment>
</Front Right Equipment>

<Front Left Equipment>
</Front Left Equipment>

<Rear Right Equipment>
</Rear Right Equipment>

<Rear Left Equipment>
</Rear Left Equipment>

<Rear Equipment>
Hitch
</Rear Equipment>

<barrating>
7
</barrating>

<structural_tech_rating>
3
</structural_tech_rating>

<source>
TRO:Vehicle Annex
</source>

<tonnage>
600.0
</tonnage>

Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
#building block data file
<BlockVersion>
1
</BlockVersion>

##Write the version number just in case...
<Version>
MAM0
</Version>

<UnitType>
SupportTank
</UnitType>

<Name>
TGV Omni Railcar
</Name>

<Model>
Primary Configuration
</Model>

<year>
3062
</year>

<originalBuildYear>
3062
</originalBuildYear>

<type>
IS Level 3
</type>

<motion_type>
Rail
</motion_type>

<transporters>
1stclassquarters:90.0:0:omni
2ndclassquarters:7.0:0:omni
cargobay:4.5:1:3:omni
BattleArmorHandles - troopers:-1
</transporters>

<cruiseMP>
0
</cruiseMP>

<engine_type>
8
</engine_type>

<internal_type>
-1
</internal_type>

<omni>
1
</omni>

<armor>
16
16
16
15
</armor>

<Body Equipment>
SV Chassis Mod [Trailer]
SV Chassis Mod [Tractor]
OmniChassisMod
</Body Equipment>

<Front Equipment>
</Front Equipment>

<Right Equipment>
</Right Equipment>

<Left Equipment>
</Left Equipment>

<Rear Equipment>
Hitch
</Rear Equipment>

<barrating>
9
</barrating>

<structural_tech_rating>
5
</structural_tech_rating>

<source>
TRO: Vehicle Annex
</source>

<tonnage>
120.0
</tonnage>

<baseChassisFireConWeight>
0.0
</baseChassisFireConWeight>

5 changes: 4 additions & 1 deletion megamek/i18n/megamek/client/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1870,7 +1870,10 @@ MovementType.Aerodyne=Aerodyne
MovementType.Spheroid=Spheroid
MovementType.AirMech=AirMech
MovementType.Fighter=Fighter

MovementType.Rail=Rail
MovementType.MagLev=MagLev
MovementType.Airship=Airship
MovementType.StationKeeping=Station Keeping
#Map/Hex Notes
NoteDialog.action=Create/Edit Note
NoteDialog.Done=Done
Expand Down
8 changes: 7 additions & 1 deletion megamek/i18n/megamek/common/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Engine.invalidSphereOnly=Light/Fission engines Inner Sphere only
Engine.Large=\ Large
Engine.Light=\ Light
Engine.Vehicle=\ [Vehicle]
Engine.Fusion=\ Fusion
Engine.XL=\ XL
Engine.XXL=\ XXL
Engine.Fission=\ Fission
Expand All @@ -40,6 +41,8 @@ Engine.None=\ None
Engine.Steam=\ Steam
Engine.Battery=\ Battery
Engine.Solar=\ Solar
Engine.MagLev=\ MagLev
Engine.External=\ External
Entity.sensor_range_vs_ground_target=Air to Ground Range
EntityWeightClass.0=Ultra Light/PA(L)/Exoskeleton
EntityWeightClass.1=Light
Expand Down Expand Up @@ -430,4 +433,7 @@ MovementType.Aerodyne=Aerodyne
MovementType.Spheroid=Spheroid
MovementType.AirMech=AirMech
MovementType.Fighter=Fighter

MovementType.Rail=Rail
MovementType.MagLev=MagLev
MovementType.Airship=Airship
MovementType.StationKeeping=Station Keeping
32 changes: 32 additions & 0 deletions megamek/src/megamek/client/ui/swing/MechTileset.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ public class MechTileset {
private String SUBMARINE_STRING = "default_submarine"; //$NON-NLS-1$
private String HYDROFOIL_STRING = "default_hydrofoil"; //$NON-NLS-1$
private String VTOL_STRING = "default_vtol"; //$NON-NLS-1$
private String RAIL_TRACTOR_STRING = "default_rail_tractor"; //$NON-NLS-1$
private String RAIL_MAGLEV_STRING = "default_maglev_tractor"; //$NON-NLS-1$
private String TRAILER_STRING = "default_trailer"; //$NON-NLS-1$
private String SMALL_TRAILER_STRING = "default_small_trailer"; //$NON-NLS-1$
private String LARGE_TRAILER_STRING = "default_large_trailer"; //$NON-NLS-1$
private String INF_STRING = "default_infantry"; //$NON-NLS-1$
private String BA_STRING = "default_ba"; //$NON-NLS-1$
private String PROTO_STRING = "default_proto"; //$NON-NLS-1$
Expand Down Expand Up @@ -138,6 +143,11 @@ public class MechTileset {
private MechEntry default_submarine;
private MechEntry default_hydrofoil;
private MechEntry default_vtol;
private MechEntry default_rail_tractor;
private MechEntry default_maglev_tractor;
private MechEntry default_trailer;
private MechEntry default_large_trailer;
private MechEntry default_small_trailer;
private MechEntry default_inf;
private MechEntry default_ba;
private MechEntry default_proto;
Expand Down Expand Up @@ -306,6 +316,17 @@ public MechEntry genericFor(Entity entity, int secondaryPos) {
return default_hydrofoil;
}
if (entity instanceof Tank) {
if (entity.isTrailer()) {
if (entity.isSuperHeavy()) {
return default_large_trailer;
} else if ((entity.getWeightClass() == EntityWeightClass.WEIGHT_LIGHT)
|| (entity.getWeightClass() == EntityWeightClass.WEIGHT_MEDIUM)
|| (entity.getWeightClass() == EntityWeightClass.WEIGHT_SMALL_SUPPORT)) {
return default_small_trailer;
} else {
return default_trailer;
}
}
if (entity.getMovementMode() == EntityMovementMode.TRACKED) {
if (entity.getWeightClass() == EntityWeightClass.WEIGHT_HEAVY) {
return default_tracked_heavy;
Expand All @@ -330,6 +351,12 @@ public MechEntry genericFor(Entity entity, int secondaryPos) {
if (entity.getMovementMode() == EntityMovementMode.WIGE) {
return default_wige;
}
if (entity.getMovementMode() == EntityMovementMode.RAIL) {
return default_rail_tractor;
}
if (entity.getMovementMode() == EntityMovementMode.MAGLEV) {
return default_maglev_tractor;
}
}
if (entity instanceof GunEmplacement) {
return default_gun_emplacement;
Expand Down Expand Up @@ -487,6 +514,11 @@ public void loadFromFile(String filename) throws IOException {
default_submarine = exact.get(SUBMARINE_STRING.toUpperCase());
default_hydrofoil = exact.get(HYDROFOIL_STRING.toUpperCase());
default_vtol = exact.get(VTOL_STRING.toUpperCase());
default_rail_tractor = exact.get(RAIL_TRACTOR_STRING.toUpperCase());
default_maglev_tractor = exact.get(RAIL_MAGLEV_STRING.toUpperCase());
default_trailer = exact.get(TRAILER_STRING.toUpperCase());
default_small_trailer = exact.get(SMALL_TRAILER_STRING.toUpperCase());
default_large_trailer = exact.get(LARGE_TRAILER_STRING.toUpperCase());
default_inf = exact.get(INF_STRING.toUpperCase());
default_ba = exact.get(BA_STRING.toUpperCase());
default_proto = exact.get(PROTO_STRING.toUpperCase());
Expand Down
4 changes: 4 additions & 0 deletions megamek/src/megamek/common/Aero.java
Original file line number Diff line number Diff line change
Expand Up @@ -809,6 +809,10 @@ public int getRightThrustHits() {
return rightThrustHits;
}

public int getOriginalFuel() {
return fuel;
}

public int getFuel() {
if ((getPartialRepairs().booleanOption("aero_asf_fueltank_crit"))
|| (getPartialRepairs().booleanOption("aero_fueltank_crit"))) {
Expand Down
Loading