public static boolean makeChezSnooteeRequest(final String parameters) { if (!KoLCharacter.canadiaAvailable()) { KoLmafia.updateDisplay( "Since you have no access to Little Canadia, you may not visit the restaurant."); return false; } if (KoLConstants.restaurantItems.isEmpty()) { ChezSnooteeRequest.getMenu(); } if (parameters.equals("")) { RequestLogger.printLine("Today's Special: " + ChezSnooteeRequest.getDailySpecial()); return false; } String[] splitParameters = AbstractCommand.splitCountAndName(parameters); String countString = splitParameters[0]; String nameString = splitParameters[1]; if (nameString.equalsIgnoreCase("daily special")) { nameString = ChezSnooteeRequest.getDailySpecial().getName(); } else if (nameString.startsWith("\u00B6")) { String name = ItemDatabase.getItemName(StringUtilities.parseInt(nameString.substring(1))); if (name != null) { nameString = name; } } nameString = nameString.toLowerCase(); for (int i = 0; i < KoLConstants.restaurantItems.size(); ++i) { String name = (String) KoLConstants.restaurantItems.get(i); if (!StringUtilities.substringMatches(name.toLowerCase(), nameString, false)) { continue; } if (KoLmafiaCLI.isExecutingCheckOnlyCommand) { RequestLogger.printLine(name); return true; } int count = countString == null || countString.length() == 0 ? 1 : StringUtilities.parseInt(countString); if (count == 0) { int fullness = ItemDatabase.getFullness(name); if (fullness > 0) { count = (KoLCharacter.getFullnessLimit() - KoLCharacter.getFullness()) / fullness; } } for (int j = 0; j < count; ++j) { RequestThread.postRequest(new ChezSnooteeRequest(name)); } return true; } return false; }