Fixed formatting in getFormattedLocatedString and selling

+ selling now includes the portal of a shop
+ tunnels are listed before coordinates
pull/2/head
Joey Hines 2020-08-03 20:06:41 -05:00
parent 0854e21015
commit 0687caf051
2 changed files with 6 additions and 6 deletions

View File

@ -41,12 +41,14 @@ public class GeoffreyLocation {
} }
public String getFormattedLocationString() { public String getFormattedLocationString() {
String locationString = locationName + " @ " + getPositionString() + " Owner: " + owner.getUsername(); String locationString = locationName + " @ ";
if (tunnelString != null) { if (tunnelString != null) {
locationString += " Tunnel: " + tunnelString; locationString += tunnelString + " ";
} }
locationString += getPositionString() + " Owner: " + owner.getUsername();
return locationString; return locationString;
} }

View File

@ -76,10 +76,8 @@ public abstract class GeoffreyAPICallback implements ICallback {
JsonObject jsonObject = element.getAsJsonObject(); JsonObject jsonObject = element.getAsJsonObject();
GeoffreyShop geoffreyShop = new GeoffreyShop(jsonObject); GeoffreyShop geoffreyShop = new GeoffreyShop(jsonObject);
stringBuilder.append(geoffreyShop.getLocationName()); stringBuilder.append(geoffreyShop.getFormattedLocationString());
stringBuilder.append(" "); stringBuilder.append("\n");
stringBuilder.append(geoffreyShop.getPositionString());
stringBuilder.append(" ");
stringBuilder.append(geoffreyShop.getFirstItem().getFormattedItemListing()); stringBuilder.append(geoffreyShop.getFirstItem().getFormattedItemListing());
stringBuilder.append("\n"); stringBuilder.append("\n");
} }