Skip to content

Commit

Permalink
Fixing merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Windchild292 committed Aug 6, 2021
2 parents 05fdddd + 61ef12e commit 72d54ff
Show file tree
Hide file tree
Showing 96 changed files with 2,556 additions and 3,059 deletions.
2 changes: 1 addition & 1 deletion MekHQ/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ task stageFiles(type: Copy) {
include "${data}/stratconfacilities/"
include "${project.ext.plugins}/"
include "${campaigns}/"
include "${userdata}/"
include "${userdata}/data/universe/ranks/"
include 'license.txt'
include 'SubmitBug.html'

Expand Down
46 changes: 23 additions & 23 deletions MekHQ/data/universe/ranks.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3150,7 +3150,7 @@ Rank:
<payMultiplier>1.0</payMultiplier>
</rank> <!-- E1 -->
<rank>
<rankNames>Volunteer,-,-,-,-,-,-,-,-</rankNames>
<rankNames>Volunteer,-,-,--MW,-,-,-,-,-</rankNames>
<officer>false</officer>
<payMultiplier>1.0</payMultiplier>
</rank> <!-- E2 -->
Expand All @@ -3160,7 +3160,7 @@ Rank:
<payMultiplier>1.0</payMultiplier>
</rank> <!-- E3 -->
<rank>
<rankNames>First Ranker,-,-,-,-,-,-,-,-</rankNames>
<rankNames>First Ranker,-,-,--MW,-,-,-,-,-</rankNames>
<officer>false</officer>
<payMultiplier>1.0</payMultiplier>
</rank> <!-- E4 -->
Expand Down Expand Up @@ -3200,7 +3200,7 @@ Rank:
<payMultiplier>1.0</payMultiplier>
</rank> <!-- E11 -->
<rank>
<rankNames>Lance Corporal,-,-,-,-,-,-,-,-</rankNames>
<rankNames>Lance Corporal,-,-,--MW,-,-,-,-,-</rankNames>
<officer>false</officer>
<payMultiplier>1.0</payMultiplier>
</rank> <!-- E12 -->
Expand All @@ -3210,7 +3210,7 @@ Rank:
<payMultiplier>1.0</payMultiplier>
</rank> <!-- E13 -->
<rank>
<rankNames>Star Corporal,-,-,-,-,-,-,-,-</rankNames>
<rankNames>Star Corporal,-,-,--MW,-,-,-,-,-</rankNames>
<officer>false</officer>
<payMultiplier>1.0</payMultiplier>
</rank> <!-- E14 -->
Expand All @@ -3220,7 +3220,7 @@ Rank:
<payMultiplier>1.0</payMultiplier>
</rank> <!-- E15 -->
<rank>
<rankNames>Command Sergeant,-,-,-,-,-,-,-,-</rankNames>
<rankNames>Command Sergeant,-,-,--MW,-,-,-,-,-</rankNames>
<officer>false</officer>
<payMultiplier>1.0</payMultiplier>
</rank> <!-- E16 -->
Expand All @@ -3240,7 +3240,7 @@ Rank:
<payMultiplier>1.0</payMultiplier>
</rank> <!-- E19 -->
<rank>
<rankNames>Banner Sergeant,-,-,-,-,-,-,-,-</rankNames>
<rankNames>Banner Sergeant,-,-,--MW,-,-,-,-,-</rankNames>
<officer>false</officer>
<payMultiplier>1.0</payMultiplier>
</rank> <!-- E20 -->
Expand Down Expand Up @@ -3305,22 +3305,22 @@ Rank:
<payMultiplier>1.0</payMultiplier>
</rank> <!-- O2 -->
<rank>
<rankNames>Ensign,-,-,Comcapt,-,-,-,-,-</rankNames>
<rankNames>Ensign,-,-,--MW,-,-,-,-,-</rankNames>
<officer>true</officer>
<payMultiplier>1.0</payMultiplier>
</rank> <!-- O3 -->
<rank>
<rankNames>Commander,-,-,-,-,-,-,-,-</rankNames>
<rankNames>Commander,-,-,--MW,-,-,-,-,-</rankNames>
<officer>true</officer>
<payMultiplier>1.0</payMultiplier>
</rank> <!-- O4 -->
<rank>
<rankNames>Major,-,-,-,-,-,-,-,-</rankNames>
<rankNames>Major,-,-,Comcapt,-,-,-,-,-</rankNames>
<officer>true</officer>
<payMultiplier>1.0</payMultiplier>
</rank> <!-- O5 -->
<rank>
<rankNames>-,-,-,Rearad,-,-,-,-,-</rankNames>
<rankNames>-,-,-,-,-,-,-,-,-</rankNames>
<officer>true</officer>
<payMultiplier>1.0</payMultiplier>
</rank> <!-- O6 -->
Expand All @@ -3330,7 +3330,7 @@ Rank:
<payMultiplier>1.0</payMultiplier>
</rank> <!-- O7 -->
<rank>
<rankNames>Colonel,-,-,-,-,-,-,-,-</rankNames>
<rankNames>Colonel,-,-,Rearad,-,-,-,-,-</rankNames>
<officer>true</officer>
<payMultiplier>1.0</payMultiplier>
</rank> <!-- O8 -->
Expand All @@ -3340,7 +3340,7 @@ Rank:
<payMultiplier>1.0</payMultiplier>
</rank> <!-- O9 -->
<rank>
<rankNames>-,-,-,Admiral,-,-,-,-,-</rankNames>
<rankNames>-,-,-,-,-,-,-,-,-</rankNames>
<officer>true</officer>
<payMultiplier>1.0</payMultiplier>
</rank> <!-- O10 -->
Expand All @@ -3350,7 +3350,7 @@ Rank:
<payMultiplier>1.0</payMultiplier>
</rank> <!-- O11 -->
<rank>
<rankNames>General,-,-,-,-,-,-,-,-</rankNames>
<rankNames>General,-,-,Admiral,-,-,-,-,-</rankNames>
<officer>true</officer>
<payMultiplier>1.0</payMultiplier>
</rank> <!-- O12 -->
Expand Down Expand Up @@ -3410,7 +3410,7 @@ Rank:
<payMultiplier>1.0</payMultiplier>
</rank> <!-- E1 -->
<rank>
<rankNames>Recruit,-,-,-,-,-,-,-,-</rankNames>
<rankNames>Recruit,-,-,--MW,-,-,-,-,-</rankNames>
<officer>false</officer>
<payMultiplier>1.0</payMultiplier>
</rank> <!-- E2 -->
Expand All @@ -3420,7 +3420,7 @@ Rank:
<payMultiplier>1.0</payMultiplier>
</rank> <!-- E3 -->
<rank>
<rankNames>Corporal,-,-,-,-,-,-,-,-</rankNames>
<rankNames>Corporal,-,-,--MW,-,-,-,-,-</rankNames>
<officer>false</officer>
<payMultiplier>1.0</payMultiplier>
</rank> <!-- E4 -->
Expand All @@ -3440,7 +3440,7 @@ Rank:
<payMultiplier>1.0</payMultiplier>
</rank> <!-- E7 -->
<rank>
<rankNames>Section Leader,-,-,-,-,-,-,-,-</rankNames>
<rankNames>Section Leader,-,-,--MW,-,-,-,-,-</rankNames>
<officer>false</officer>
<payMultiplier>1.0</payMultiplier>
</rank> <!-- E8 -->
Expand All @@ -3460,7 +3460,7 @@ Rank:
<payMultiplier>1.0</payMultiplier>
</rank> <!-- E11 -->
<rank>
<rankNames>Force Sergeant,-,-,-,-,-,-,-,-</rankNames>
<rankNames>Force Sergeant,-,-,--MW,-,-,-,-,-</rankNames>
<officer>false</officer>
<payMultiplier>1.0</payMultiplier>
</rank> <!-- E12 -->
Expand All @@ -3470,7 +3470,7 @@ Rank:
<payMultiplier>1.0</payMultiplier>
</rank> <!-- E13 -->
<rank>
<rankNames>Lance Sergeant,-,-,-,-,-,-,-,-</rankNames>
<rankNames>Lance Sergeant,-,-,--MW,-,-,-,-,-</rankNames>
<officer>false</officer>
<payMultiplier>1.0</payMultiplier>
</rank> <!-- E14 -->
Expand Down Expand Up @@ -4450,7 +4450,7 @@ Rank:
<payMultiplier>1.0</payMultiplier>
</rank> <!-- E1 -->
<rank>
<rankNames>Recruit,-,-,-,-,-,-,-,-</rankNames>
<rankNames>Recruit,-,-,--MW,-,-,-,-,-</rankNames>
<officer>false</officer>
<payMultiplier>1.0</payMultiplier>
</rank> <!-- E2 -->
Expand All @@ -4460,7 +4460,7 @@ Rank:
<payMultiplier>1.0</payMultiplier>
</rank> <!-- E3 -->
<rank>
<rankNames>Corporal,-,-,-,-,-,-,-,-</rankNames>
<rankNames>Corporal,-,-,--MW,-,-,-,-,-</rankNames>
<officer>false</officer>
<payMultiplier>1.0</payMultiplier>
</rank> <!-- E4 -->
Expand All @@ -4480,7 +4480,7 @@ Rank:
<payMultiplier>1.0</payMultiplier>
</rank> <!-- E7 -->
<rank>
<rankNames>Section Leader,-,-,-,-,-,-,-,-</rankNames>
<rankNames>Section Leader,-,-,--MW,-,-,-,-,-</rankNames>
<officer>false</officer>
<payMultiplier>1.0</payMultiplier>
</rank> <!-- E8 -->
Expand All @@ -4500,7 +4500,7 @@ Rank:
<payMultiplier>1.0</payMultiplier>
</rank> <!-- E11 -->
<rank>
<rankNames>Force Sergeant,-,-,-,-,-,-,-,-</rankNames>
<rankNames>Force Sergeant,-,-,--MW,-,-,-,-,-</rankNames>
<officer>false</officer>
<payMultiplier>1.0</payMultiplier>
</rank> <!-- E12 -->
Expand All @@ -4510,7 +4510,7 @@ Rank:
<payMultiplier>1.0</payMultiplier>
</rank> <!-- E13 -->
<rank>
<rankNames>Lance Sergeant,-,-,-,-,-,-,-,-</rankNames>
<rankNames>Lance Sergeant,-,-,--MW,-,-,-,-,-</rankNames>
<officer>false</officer>
<payMultiplier>1.0</payMultiplier>
</rank> <!-- E14 -->
Expand Down
1 change: 1 addition & 0 deletions MekHQ/docs/history.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ VERSION HISTORY:
+ Issue #2771: Fixing Missing Current Daily Log on AdvanceDaysDialog Creation
+ PR #2769: New StratCon feature - sometimes (with configurable frequency), the generated maps will be replaced by a similarly sized user-made fixed map instead.
+ PR #2775: Finances Tab: Price Multipliers Panel Cleanup and Expansion
+ PR #2760: Rank fixes and improvements from HB: Major Periphery States

0.49.2 (2021-06-19 2330 UTC)
+ Issue #2620: Adding Missing Leadership Column in Personnel Tab
Expand Down
5 changes: 4 additions & 1 deletion MekHQ/src/mekhq/AtBGameThread.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public void run() {

MapSettings mapSettings = MapSettings.getInstance();
mapSettings.setBoardSize(scenario.getMapX(), scenario.getMapY());
mapSettings.setMapSize(1, 1);
mapSettings.setMapSize(1, 1);
mapSettings.getBoardsSelectedVector().clear();


Expand All @@ -150,6 +150,9 @@ public void run() {
mapSettings.setMedium(MapSettings.MEDIUM_ATMOSPHERE);
}

// duplicate code, but getting a new instance of map settings resets the size parameters
mapSettings.setBoardSize(scenario.getMapX(), scenario.getMapY());
mapSettings.setMapSize(1, 1);
mapSettings.getBoardsSelectedVector().add(MapSettings.BOARD_GENERATED);
}

Expand Down
4 changes: 2 additions & 2 deletions MekHQ/src/mekhq/MekHQOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ public void setSaveMothballState(boolean value) {

//region File Paths
/**
* @return the path of the folder to load when loading or saving rank systems
* @return the path of the folder to load when loading or saving bulk rank systems
*/
public String getRankSystemsPath() {
return userPreferences.node(MekHqConstants.FILE_PATH_NODE).get(MekHqConstants.RANK_SYSTEMS_DIRECTORY_PATH, "userdata/data/universe/");
Expand All @@ -489,7 +489,7 @@ public String getRankSystemsPath() {
* This sets the path where one saves or loads their rank systems from, as this is not required
* for any data but improves UX.
*
* @param value the path where the person saved their last individual rank system.
* @param value the path where the person saved their last bulk rank system export
*/
public void setRankSystemsPath(final String value) {
userPreferences.node(MekHqConstants.FILE_PATH_NODE).put(MekHqConstants.RANK_SYSTEMS_DIRECTORY_PATH, value);
Expand Down
10 changes: 5 additions & 5 deletions MekHQ/src/mekhq/MekHqConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,6 @@ public final class MekHqConstants {

//region File Paths
// This holds all required file paths not saved as part of MekHQ Options
public static final String AWARDS_DIRECTORY_PATH = "data/universe/awards/";
public static final String RANKS_FILE_PATH = "data/universe/ranks.xml";
public static final String USER_RANKS_FILE_PATH = "userdata/data/universe/ranks.xml";
public static final String FACTION_HINTS_FILE = "data/universe/factionhints.xml";
public static final String RATINFO_DIR = "data/universe/ratdata";
public static final String LAYERED_FORCE_ICON_TYPE_PATH = "Pieces/Type/";
public static final String LAYERED_FORCE_ICON_FORMATION_PATH = "Pieces/Formations/";
public static final String LAYERED_FORCE_ICON_ADJUSTMENT_PATH = "Pieces/Adjustments/";
Expand All @@ -142,6 +137,11 @@ public final class MekHqConstants {
public static final String LAYERED_FORCE_ICON_BACKGROUND_PATH = "Pieces/Backgrounds/";
public static final String LAYERED_FORCE_ICON_FRAME_PATH = "Pieces/Frames/";
public static final String LAYERED_FORCE_ICON_LOGO_PATH = "Pieces/Logos/";
public static final String AWARDS_DIRECTORY_PATH = "data/universe/awards/";
public static final String RATINFO_DIR = "data/universe/ratdata";
public static final String FACTION_HINTS_FILE = "data/universe/factionhints.xml";
public static final String RANKS_FILE_PATH = "data/universe/ranks.xml";
public static final String USER_RANKS_FILE_PATH = "userdata/data/universe/ranks.xml";

//region StratCon
public static final String STRATCON_REQUIRED_HOSTILE_FACILITY_MODS = "./data/scenariomodifiers/requiredHostileFacilityModifiers.xml";
Expand Down
2 changes: 1 addition & 1 deletion MekHQ/src/mekhq/MekHqXmlSerializable.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
import java.io.PrintWriter;

public interface MekHqXmlSerializable {
public abstract void writeToXml(PrintWriter pw1, int indent);
void writeToXml(PrintWriter pw1, int indent);
}
10 changes: 6 additions & 4 deletions MekHQ/src/mekhq/Utilities.java
Original file line number Diff line number Diff line change
Expand Up @@ -259,13 +259,15 @@ public static List<AmmoType> getMunitionsFor(Entity entity, AmmoType currentAmmo
}

public static boolean compareMounted(Mounted a, Mounted b) {
if (!a.getType().equals(b.getType()))
if (!a.getType().equals(b.getType())) {
return false;
if (!a.getClass().equals(b.getClass()))
} else if (a.getClass() != b.getClass()) {
return false;
if (!a.getName().equals(b.getName()))
} else if (!a.getName().equals(b.getName())) {
return false;
return a.getLocation() == b.getLocation();
} else {
return a.getLocation() == b.getLocation();
}
}

/**
Expand Down
7 changes: 6 additions & 1 deletion MekHQ/src/mekhq/campaign/CampaignOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -4232,7 +4232,12 @@ private static void migrateMarriageSurnameWeights(CampaignOptions retVal, String
int[] weights = new int[values.length];

for (int i = 0; i < weights.length; i++) {
weights[i] = Integer.parseInt(values[i]);
try {
weights[i] = Integer.parseInt(values[i]);
} catch (Exception e) {
MekHQ.getLogger().error(e);
weights[i] = 0;
}
}

// Now we need to test to figure out the weights have changed. If not, we will keep the
Expand Down
31 changes: 26 additions & 5 deletions MekHQ/src/mekhq/campaign/ExtraData.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public class ExtraData {
private static final Marshaller marshaller;
private static final Unmarshaller unmarshaller;
static {
Marshaller m = null;;
Marshaller m = null;
Unmarshaller u = null;
try {
JAXBContext context = JAXBContext.newInstance(ExtraData.class);
Expand All @@ -102,15 +102,36 @@ public class ExtraData {
});
ADAPTERS.put(Integer.class, new StringAdapter<Integer>() {
@Override
public Integer adapt(String str) { return Integer.valueOf(str); }
public Integer adapt(String str) {
try {
return Integer.valueOf(str);
} catch (Exception e) {
MekHQ.getLogger().error(e);
return 0;
}
}
});
ADAPTERS.put(Double.class, new StringAdapter<Double>() {
@Override
public Double adapt(String str) { return Double.valueOf(str); }
public Double adapt(String str) {
try {
return Double.valueOf(str);
} catch (Exception e) {
MekHQ.getLogger().error(e);
return 0.0;
}
}
});
ADAPTERS.put(Boolean.class, new StringAdapter<Boolean>() {
@Override
public Boolean adapt(String str) { return Boolean.valueOf(str); }
public Boolean adapt(String str) {
try {
return Boolean.valueOf(str);
} catch (Exception e) {
MekHQ.getLogger().error(e);
return false;
}
}
});
}

Expand Down Expand Up @@ -145,7 +166,7 @@ public <T> T setString(Key<T> key, String value) {
return null;
}
// Prevent unneeded loops and lookups for straight strings
if(key.type == String.class) {
if (key.type == String.class) {
Map<String, Object> map = getOrCreateClassMap(key.type);
return key.type.cast(map.put(key.name, value));
}
Expand Down
Loading

0 comments on commit 72d54ff

Please sign in to comment.