diff --git a/src/main/java/com/wurmonline/server/questions/ShopQuestion.java b/src/main/java/com/wurmonline/server/questions/ShopQuestion.java index a7680f0..54e080e 100644 --- a/src/main/java/com/wurmonline/server/questions/ShopQuestion.java +++ b/src/main/java/com/wurmonline/server/questions/ShopQuestion.java @@ -48,7 +48,7 @@ public class ShopQuestion extends Question { } String buyKey = properties.stringPropertyNames().stream() - .filter(k -> k.startsWith("buy_")) + .filter(k -> k.startsWith("buy_") && properties.getProperty(k).equals("true")) .findFirst() .orElse(null); @@ -132,13 +132,14 @@ public class ShopQuestion extends Question { form.beginTree("shopItems", 2, header); for (ShopItem item : items) { String priceCell = "text=\"" + escape(item.getPriceDisplay()) + "\""; - String buyCell = "button{id=\"buy_" + item.getId() + "\";text=\"+1\"}"; + String buyCell = "id=\"buy_" + item.getId() + "\";text=\"+1\";checkbox=\"true\""; form.addTreeRow("i" + item.getId(), item.getName(), item.getDescription(), priceCell, buyCell); } form.endTree(); form.beginHorizontalFlow(); form.addButton("Close", "close"); + form.addButton("Checkout", "checkout"); form.endHorizontalFlow(); String bml = form.toString();