Skip to content

Commit

Permalink
Requested Changes:
Browse files Browse the repository at this point in the history
Renaming methods in SiegeMetaDataController.
  • Loading branch information
LlmDl committed Apr 24, 2021
1 parent cfc6067 commit 65520b7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/gmail/goosius/siegewar/SiegeController.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public static void saveSiege(Siege siege) {
SiegeMetaDataController.setStartTime(town, siege.getStartTime());
SiegeMetaDataController.setEndTime(town, siege.getScheduledEndTime());
SiegeMetaDataController.setActualEndTime(town, siege.getActualEndTime());
SiegeMetaDataController.setAttackerSiegeContributors(town, siege.getResidentTimedPointContributors());
SiegeMetaDataController.setResidentTimedPointContributors(town, siege.getResidentTimedPointContributors());
town.save();
}

Expand Down Expand Up @@ -227,7 +227,7 @@ public static boolean loadSiege(Siege siege) {

siege.setActualEndTime(SiegeMetaDataController.getActualEndTime(town));

siege.setResidentTimedPointContributors(SiegeMetaDataController.getAttackerSiegeContributors(town));
siege.setResidentTimedPointContributors(SiegeMetaDataController.getResidentTimedPointContributors(town));
return true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,8 @@ public static void removeSiegeMeta (Town town) {
town.removeMetaData(ldf);
}

public static Map<String, Integer> getAttackerSiegeContributors(Town town) {
StringDataField sdf = (StringDataField) attackerSiegeContributors .clone();
public static Map<String, Integer> getResidentTimedPointContributors(Town town) {
StringDataField sdf = (StringDataField) attackerSiegeContributors.clone();

String dataAsString = null;
if (town.hasMeta(sdf.getKey()))
Expand All @@ -360,7 +360,7 @@ public static Map<String, Integer> getAttackerSiegeContributors(Town town) {
}
}

public static void setAttackerSiegeContributors(Town town, Map<String,Integer> contributorsMap) {
public static void setResidentTimedPointContributors(Town town, Map<String,Integer> contributorsMap) {
StringBuilder mapAsStringBuilder = new StringBuilder();
boolean firstEntry = true;
for(Map.Entry<String,Integer> contributorEntry: contributorsMap.entrySet()) {
Expand All @@ -372,7 +372,7 @@ public static void setAttackerSiegeContributors(Town town, Map<String,Integer> c
mapAsStringBuilder.append(contributorEntry.getKey()).append(":").append(contributorEntry.getValue());
}

StringDataField sdf = (StringDataField) attackerSiegeContributors .clone();
StringDataField sdf = (StringDataField) attackerSiegeContributors.clone();
if (town.hasMeta(sdf.getKey()))
MetaDataUtil.setString(town, sdf, mapAsStringBuilder.toString());
else
Expand Down

0 comments on commit 65520b7

Please sign in to comment.