* UI: improved choose target amount dialog (added info about selected targets and amount);

This commit is contained in:
Oleg Agafonov 2019-09-24 07:47:02 +04:00
parent bad26b182a
commit eafb4eb653

View file

@ -708,7 +708,11 @@ public class HumanPlayer extends PlayerImpl {
while (!abort) {
prepareForResponse(game);
if (!isExecutingMacro()) {
game.fireSelectTargetEvent(playerId, new MessageToClient(target.getMessage() + "\n Amount remaining:" + target.getAmountRemaining(), getRelatedObjectName(source, game)),
String selectedNames = target.getTargetedName(game);
game.fireSelectTargetEvent(playerId, new MessageToClient(target.getMessage()
+ "<br> Amount remaining: " + target.getAmountRemaining()
+ (selectedNames.isEmpty() ? "" : ", selected: " + selectedNames),
getRelatedObjectName(source, game)),
target.possibleTargets(source == null ? null : source.getSourceId(), playerId, game),
target.isRequired(source),
getOptions(target, null));