53
53
import megamek .Version ;
54
54
import megamek .client .ui .swing .tileset .EntityImage ;
55
55
import megamek .codeUtilities .MathUtility ;
56
- import megamek .common .CrewType ;
57
56
import megamek .common .*;
57
+ import megamek .common .CrewType ;
58
58
import megamek .common .annotations .Nullable ;
59
59
import megamek .common .equipment .AmmoMounted ;
60
60
import megamek .common .equipment .ArmorType ;
86
86
import mekhq .campaign .parts .equipment .*;
87
87
import mekhq .campaign .personnel .Person ;
88
88
import mekhq .campaign .personnel .PersonnelOptions ;
89
- import mekhq .campaign .personnel .skills .SkillType ;
90
89
import mekhq .campaign .personnel .enums .PersonnelRole ;
91
90
import mekhq .campaign .personnel .skills .SkillType ;
92
91
import mekhq .campaign .unit .enums .CrewAssignmentState ;
@@ -444,7 +443,7 @@ private void addTransportedUnitType(AbstractTransportedUnitsSummary transportedU
444
443
*/
445
444
@ Deprecated (since = "0.50.04" , forRemoval = true )
446
445
private void fixTransportedUnitReferences (AbstractTransportedUnitsSummary currentTransportedUnits ,
447
- Set <Unit > newTransportedUnits ) {
446
+ Set <Unit > newTransportedUnits ) {
448
447
currentTransportedUnits .replaceTransportedUnits (newTransportedUnits );
449
448
}
450
449
@@ -576,7 +575,7 @@ public boolean hasTransportAssignment(CampaignTransportType campaignTransportTyp
576
575
* @see CampaignTransportType
577
576
*/
578
577
public void setTransportAssignment (CampaignTransportType campaignTransportType ,
579
- @ Nullable ITransportAssignment assignment ) {
578
+ @ Nullable ITransportAssignment assignment ) {
580
579
if (campaignTransportType .isShipTransport ()) {
581
580
if (assignment .getClass ().isAssignableFrom (campaignTransportType .getTransportAssignmentType ())) {
582
581
setTransportShipAssignment ((TransportShipAssignment ) assignment );
@@ -2368,7 +2367,7 @@ public double getCurrentTacticalTransportCapacity(TransporterType transporterTyp
2368
2367
* @see CampaignTransportType
2369
2368
*/
2370
2369
public double getCurrentTransportCapacity (CampaignTransportType campaignTransportType ,
2371
- TransporterType transporterType ) {
2370
+ TransporterType transporterType ) {
2372
2371
return getTransportedUnitsSummary (campaignTransportType ).getCurrentTransportCapacity (transporterType );
2373
2372
}
2374
2373
@@ -2494,7 +2493,7 @@ public Set<Unit> loadTacticalTransport(TransporterType transporterType, Set<Unit
2494
2493
*/
2495
2494
@ Deprecated (since = "0.50.04" , forRemoval = true )
2496
2495
public @ Nullable Unit loadTacticalTransport (Unit transportedUnit , @ Nullable Transporter transportedLocation ,
2497
- TransporterType transporterType ) {
2496
+ TransporterType transporterType ) {
2498
2497
return getTacticalTransportedUnitsSummary ().loadTransport (transportedLocation ,
2499
2498
transporterType ,
2500
2499
transportedUnit );
@@ -2515,7 +2514,7 @@ public Set<Unit> loadTacticalTransport(TransporterType transporterType, Set<Unit
2515
2514
* @see TransporterType#TANK_TRAILER_HITCH
2516
2515
*/
2517
2516
public @ Nullable Unit towTrailer (Unit transportedUnit , @ Nullable Transporter transportedLocation ,
2518
- TransporterType transporterType ) {
2517
+ TransporterType transporterType ) {
2519
2518
return ((TowTransportedUnitsSummary ) getTransportedUnitsSummary (CampaignTransportType .TOW_TRANSPORT )).towTrailer (
2520
2519
transportedUnit ,
2521
2520
transportedLocation ,
@@ -4703,7 +4702,9 @@ public void resetPilotAndEntity() {
4703
4702
if (getCampaign ().getCampaignOptions ().isUseTactics ()) {
4704
4703
// Tactics command bonus. This should actually reflect the unit's commander
4705
4704
if (null != commander && commander .hasSkill (SkillType .S_TACTICS )) {
4706
- entity .getCrew ().setCommandBonus (commander .getSkill (SkillType .S_TACTICS ).getFinalSkillValue (commander .getOptions ()));
4705
+ entity .getCrew ()
4706
+ .setCommandBonus (commander .getSkill (SkillType .S_TACTICS )
4707
+ .getFinalSkillValue (commander .getOptions ()));
4707
4708
}
4708
4709
}
4709
4710
@@ -5134,7 +5135,8 @@ private void assignToCrewSlot(Person person, int slot, String gunType, String dr
5134
5135
if (person .hasSkill (driveType )) {
5135
5136
piloting = person .getSkill (driveType ).getFinalSkillValue (options );
5136
5137
}
5137
- if (person .hasSkill (SkillType .S_ARTILLERY ) && person .getSkill (SkillType .S_ARTILLERY ).getFinalSkillValue (options ) < artillery ) {
5138
+ if (person .hasSkill (SkillType .S_ARTILLERY ) &&
5139
+ person .getSkill (SkillType .S_ARTILLERY ).getFinalSkillValue (options ) < artillery ) {
5138
5140
artillery = person .getSkill (SkillType .S_ARTILLERY ).getFinalSkillValue (options );
5139
5141
}
5140
5142
entity .getCrew ().setPiloting (Math .min (max (piloting , 0 ), 8 ), slot );
@@ -5896,10 +5898,11 @@ public void startActivating(@Nullable Person activationTech, boolean isGM) {
5896
5898
addVesselCrew (assignedEngineer );
5897
5899
} else if (activationTech != null && activationTech .isTechLargeVessel ()) {
5898
5900
addVesselCrew (activationTech );
5899
- } else {
5901
+ } else if (! isGM ) {
5900
5902
// In this case there is nothing to be done, we cant activate this unit.
5901
5903
return ;
5902
5904
}
5905
+
5903
5906
resetEngineer ();
5904
5907
} else {
5905
5908
tech = activationTech ;
0 commit comments