mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
Initial work on finding next marks for boats as from mark rounding messages
Marks were very difficult to extend, need large refactor Marks now have a compound ID as well as their sourceID. They need this compound ID to be identifiable by the mark rounding messages. tags: #story[956] #pair[wmu16, mra106]
This commit is contained in:
@@ -333,6 +333,7 @@ public class XMLParser {
|
||||
private Mark createMark(Node compoundMark) {
|
||||
|
||||
List<SingleMark> marksList = new ArrayList<>();
|
||||
Integer compoundMarkID = getNodeAttributeInt(compoundMark, "CompoundMarkID");
|
||||
String cMarkName = getNodeAttributeString(compoundMark, "Name");
|
||||
|
||||
NodeList childMarks = compoundMark.getChildNodes();
|
||||
@@ -346,7 +347,7 @@ public class XMLParser {
|
||||
Double targetLat = getNodeAttributeDouble(markNode, "TargetLat");
|
||||
Double targetLng = getNodeAttributeDouble(markNode, "TargetLng");
|
||||
|
||||
SingleMark mark = new SingleMark(markName, targetLat, targetLng, sourceID);
|
||||
SingleMark mark = new SingleMark(markName, targetLat, targetLng, sourceID, compoundMarkID);
|
||||
marksList.add(mark);
|
||||
}
|
||||
}
|
||||
@@ -364,7 +365,7 @@ public class XMLParser {
|
||||
} else if (marksList.size() == 2) {
|
||||
return new GateMark(cMarkName, MarkType.OPEN_GATE, marksList.get(0),
|
||||
marksList.get(1), marksList.get(0).getLatitude(),
|
||||
marksList.get(0).getLongitude());
|
||||
marksList.get(0).getLongitude(), compoundMarkID);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user