161
161
import mekhq .campaign .personnel .Person ;
162
162
import mekhq .campaign .personnel .PersonnelOptions ;
163
163
import mekhq .campaign .personnel .RandomDependents ;
164
- import mekhq .campaign .personnel .skills .Skill ;
165
- import mekhq .campaign .personnel .skills .SkillType ;
166
164
import mekhq .campaign .personnel .SpecialAbility ;
167
165
import mekhq .campaign .personnel .autoAwards .AutoAwardsController ;
168
166
import mekhq .campaign .personnel .death .RandomDeath ;
@@ -1930,8 +1928,8 @@ public Person newPerson(final PersonnelRole primaryRole, final String factionCod
1930
1928
* @return A new {@link Person}.
1931
1929
*/
1932
1930
public Person newPerson (final PersonnelRole primaryRole , final PersonnelRole secondaryRole ,
1933
- final AbstractFactionSelector factionSelector , final AbstractPlanetSelector planetSelector ,
1934
- final Gender gender ) {
1931
+ final AbstractFactionSelector factionSelector , final AbstractPlanetSelector planetSelector ,
1932
+ final Gender gender ) {
1935
1933
return newPerson (primaryRole , secondaryRole , getPersonnelGenerator (factionSelector , planetSelector ), gender );
1936
1934
}
1937
1935
@@ -1958,7 +1956,7 @@ public Person newPerson(final PersonnelRole primaryRole, final AbstractPersonnel
1958
1956
* @return A new {@link Person} configured using {@code personnelGenerator}.
1959
1957
*/
1960
1958
public Person newPerson (final PersonnelRole primaryRole , final PersonnelRole secondaryRole ,
1961
- final AbstractPersonnelGenerator personnelGenerator , final Gender gender ) {
1959
+ final AbstractPersonnelGenerator personnelGenerator , final Gender gender ) {
1962
1960
final Person person = personnelGenerator .generate (this , primaryRole , secondaryRole , gender );
1963
1961
1964
1962
// Assign a random portrait after we generate a new person
@@ -2320,17 +2318,20 @@ public void checkBloodnameAdd(Person person, boolean ignoreDice) {
2320
2318
switch (person .getPrimaryRole ()) {
2321
2319
case GROUND_VEHICLE_DRIVER :
2322
2320
bloodnameTarget += person .hasSkill (SkillType .S_PILOT_GVEE ) ?
2323
- person .getSkill (SkillType .S_PILOT_GVEE ).getFinalSkillValue (options ) :
2321
+ person .getSkill (SkillType .S_PILOT_GVEE )
2322
+ .getFinalSkillValue (options ) :
2324
2323
TargetRoll .AUTOMATIC_FAIL ;
2325
2324
break ;
2326
2325
case NAVAL_VEHICLE_DRIVER :
2327
2326
bloodnameTarget += person .hasSkill (SkillType .S_PILOT_NVEE ) ?
2328
- person .getSkill (SkillType .S_PILOT_NVEE ).getFinalSkillValue (options ) :
2327
+ person .getSkill (SkillType .S_PILOT_NVEE )
2328
+ .getFinalSkillValue (options ) :
2329
2329
TargetRoll .AUTOMATIC_FAIL ;
2330
2330
break ;
2331
2331
case VTOL_PILOT :
2332
2332
bloodnameTarget += person .hasSkill (SkillType .S_PILOT_VTOL ) ?
2333
- person .getSkill (SkillType .S_PILOT_VTOL ).getFinalSkillValue (options ) :
2333
+ person .getSkill (SkillType .S_PILOT_VTOL )
2334
+ .getFinalSkillValue (options ) :
2334
2335
TargetRoll .AUTOMATIC_FAIL ;
2335
2336
break ;
2336
2337
default :
@@ -2371,7 +2372,8 @@ public void checkBloodnameAdd(Person person, boolean ignoreDice) {
2371
2372
case VESSEL_NAVIGATOR :
2372
2373
bloodnameTarget += 2 *
2373
2374
(person .hasSkill (SkillType .S_NAV ) ?
2374
- person .getSkill (SkillType .S_NAV ).getFinalSkillValue (options ) :
2375
+ person .getSkill (SkillType .S_NAV )
2376
+ .getFinalSkillValue (options ) :
2375
2377
TargetRoll .AUTOMATIC_FAIL );
2376
2378
break ;
2377
2379
default :
@@ -2654,7 +2656,7 @@ public AbstractPlanetSelector getPlanetSelector(final RandomOriginOptions option
2654
2656
* @return An {@link AbstractPersonnelGenerator} to use when creating new personnel.
2655
2657
*/
2656
2658
public AbstractPersonnelGenerator getPersonnelGenerator (final AbstractFactionSelector factionSelector ,
2657
- final AbstractPlanetSelector planetSelector ) {
2659
+ final AbstractPlanetSelector planetSelector ) {
2658
2660
final DefaultPersonnelGenerator generator = new DefaultPersonnelGenerator (factionSelector , planetSelector );
2659
2661
generator .setNameGenerator (RandomNameGenerator .getInstance ());
2660
2662
generator .setSkillPreferences (getRandomSkillPreferences ());
@@ -2829,7 +2831,7 @@ private int getDefaultStockPercent(Part part) {
2829
2831
* @param ignoreSparesUnderQuality spares with a quality lower than this threshold are excluded from counting.
2830
2832
*/
2831
2833
private void updatePartInUseData (PartInUse partInUse , Part incomingPart , boolean ignoreMothballedUnits ,
2832
- PartQuality ignoreSparesUnderQuality ) {
2834
+ PartQuality ignoreSparesUnderQuality ) {
2833
2835
Unit unit = incomingPart .getUnit ();
2834
2836
if (unit != null ) {
2835
2837
// Ignore conventional infantry
@@ -2875,7 +2877,7 @@ private void updatePartInUseData(PartInUse partInUse, Part incomingPart, boolean
2875
2877
* @param ignoreSparesUnderQuality don't count spare parts lower than this quality
2876
2878
*/
2877
2879
public void updatePartInUse (PartInUse partInUse , boolean ignoreMothballedUnits ,
2878
- PartQuality ignoreSparesUnderQuality ) {
2880
+ PartQuality ignoreSparesUnderQuality ) {
2879
2881
partInUse .setUseCount (0 );
2880
2882
partInUse .setStoreCount (0 );
2881
2883
partInUse .setTransferCount (0 );
@@ -2932,7 +2934,7 @@ public void updatePartInUse(PartInUse partInUse, boolean ignoreMothballedUnits,
2932
2934
*/
2933
2935
2934
2936
public Set <PartInUse > getPartsInUse (boolean ignoreMothballedUnits , boolean isResupply ,
2935
- PartQuality ignoreSparesUnderQuality ) {
2937
+ PartQuality ignoreSparesUnderQuality ) {
2936
2938
// java.util.Set doesn't supply a get(Object) method, so we have to use a
2937
2939
// java.util.Map
2938
2940
Map <PartInUse , PartInUse > inUse = new HashMap <>();
@@ -3290,7 +3292,8 @@ public TargetRoll getTargetFor(Person medWork, Person doctor) {
3290
3292
if (getPatientsFor (doctor ) > 25 ) {
3291
3293
return new TargetRoll (TargetRoll .IMPOSSIBLE , doctor .getFullName () + " already has 25 patients." );
3292
3294
}
3293
- TargetRoll target = new TargetRoll (skill .getFinalSkillValue (doctor .getOptions ()), skill .getSkillLevel ().toString ());
3295
+ TargetRoll target = new TargetRoll (skill .getFinalSkillValue (doctor .getOptions ()),
3296
+ skill .getSkillLevel ().toString ());
3294
3297
if (target .getValue () == TargetRoll .IMPOSSIBLE ) {
3295
3298
return target ;
3296
3299
}
@@ -3789,7 +3792,7 @@ public boolean canPayFor(IAcquisitionWork acquisition) {
3789
3792
* @return The result of the rolls.
3790
3793
*/
3791
3794
public PartAcquisitionResult findContactForAcquisition (IAcquisitionWork acquisition , Person person ,
3792
- PlanetarySystem system ) {
3795
+ PlanetarySystem system ) {
3793
3796
TargetRoll target = getTargetForAcquisition (acquisition , person );
3794
3797
3795
3798
String impossibleSentencePrefix = person == null ?
@@ -3900,7 +3903,7 @@ public boolean acquireEquipment(IAcquisitionWork acquisition, Person person) {
3900
3903
* successful.
3901
3904
*/
3902
3905
private boolean acquireEquipment (IAcquisitionWork acquisition , Person person , PlanetarySystem system ,
3903
- int transitDays ) {
3906
+ int transitDays ) {
3904
3907
boolean found = false ;
3905
3908
String report = "" ;
3906
3909
@@ -6322,7 +6325,7 @@ public void removeFunds(final TransactionType type, final Money quantity, @Nulla
6322
6325
* @param individualPayouts Map of Person to the Money they're owed
6323
6326
*/
6324
6327
public void payPersonnel (TransactionType type , Money quantity , String description ,
6325
- Map <Person , Money > individualPayouts ) {
6328
+ Map <Person , Money > individualPayouts ) {
6326
6329
getFinances ().debit (type ,
6327
6330
getLocalDate (),
6328
6331
quantity ,
@@ -7456,7 +7459,7 @@ public TargetRoll getTargetForAcquisition(final IAcquisitionWork acquisition, fi
7456
7459
* an impossible/automatic result under specific circumstances.
7457
7460
*/
7458
7461
public TargetRoll getTargetForAcquisition (final IAcquisitionWork acquisition , final @ Nullable Person person ,
7459
- final boolean checkDaysToWait ) {
7462
+ final boolean checkDaysToWait ) {
7460
7463
if (getCampaignOptions ().getAcquisitionSkill ().equals (S_AUTO )) {
7461
7464
return new TargetRoll (TargetRoll .AUTOMATIC_SUCCESS , "Automatic Success" );
7462
7465
}
@@ -7489,7 +7492,8 @@ public TargetRoll getTargetForAcquisition(final IAcquisitionWork acquisition, fi
7489
7492
return new TargetRoll (TargetRoll .IMPOSSIBLE , "It is extinct!" );
7490
7493
}
7491
7494
7492
- TargetRoll target = new TargetRoll (skill .getFinalSkillValue (person .getOptions ()), skill .getSkillLevel ().toString ());
7495
+ TargetRoll target = new TargetRoll (skill .getFinalSkillValue (person .getOptions ()),
7496
+ skill .getSkillLevel ().toString ());
7493
7497
target .append (acquisition .getAllAcquisitionMods ());
7494
7498
7495
7499
if (getCampaignOptions ().isUseAtB () && getCampaignOptions ().isRestrictPartsByMission ()) {
@@ -8712,7 +8716,7 @@ public Set<Unit> getTransportsByType(CampaignTransportType campaignTransportType
8712
8716
* @return units that have that transport type
8713
8717
*/
8714
8718
public Set <Unit > getTransportsByType (CampaignTransportType campaignTransportType , TransporterType transporterType ,
8715
- double unitSize ) {
8719
+ double unitSize ) {
8716
8720
return Objects .requireNonNull (getCampaignTransporterMap (campaignTransportType ))
8717
8721
.getTransportsByType (transporterType , unitSize );
8718
8722
}
@@ -9540,7 +9544,7 @@ public ImageIcon getCampaignFactionIcon() {
9540
9544
if (campaignIcon .getFilename () == null ) {
9541
9545
icon = getFactionLogo (this , getFaction ().getShortName (), true );
9542
9546
} else {
9543
- icon = new ImageIcon ( campaignIcon .getFilename () );
9547
+ icon = campaignIcon .getImageIcon ( );
9544
9548
}
9545
9549
return icon ;
9546
9550
}
0 commit comments