mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 11:32:00 -08:00
Ability picker shows now the name of the object instead of {this] in ability text..
This commit is contained in:
parent
e8a7a66b52
commit
33c6bf1385
9 changed files with 37 additions and 20 deletions
|
|
@ -44,9 +44,13 @@ public class AbilityPickerView implements Serializable {
|
|||
|
||||
private Map<UUID, String> choices = new LinkedHashMap<UUID, String>();
|
||||
|
||||
public AbilityPickerView(List<? extends Ability> abilities) {
|
||||
public AbilityPickerView(String objectName, List<? extends Ability> abilities) {
|
||||
for (Ability ability: abilities) {
|
||||
choices.put(ability.getId(), ability.getRule(true));
|
||||
if (objectName == null) {
|
||||
choices.put(ability.getId(), ability.getRule(true));
|
||||
} else {
|
||||
choices.put(ability.getId(), ability.getRule(objectName));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue