private void newDiscovery(Research next) { discoverySystem.discoverNew(player, empire, next); choices.clear(); StringBuilder sb = new StringBuilder("We discovered " + next.target.name + "!"); for (String effect : discoverySystem.effectsStrings(empire.last.target)) sb.append("\n - " + effect); choices.addButton(sb.toString(), this::resumeGame); choices.addToStage(stage, -1, -1, true); }
@Override protected void initMenu() { choices.clear(); if (empire.nextPossible == null || empire.nextPossible.isEmpty()) { // may be displayed from discovery menu choices.addButton("No discoveries to combine!", this::resumeGame); } else { choices.addLabel("Which faction do you choose to make new discoveries?"); for (Entry<Faction, Research> next : empire.nextPossible.entrySet()) choices.addButton( action(next.getKey()), previousString(next.getValue()), () -> newDiscovery(next.getValue()), true); choices.addLabel(" "); choices.addButton("Choose later...", this::resumeGame); } choices.addToStage(stage, -1, -1, true); }