mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
Merge branch 'chosennumber' into 'master'
add chosen number to card detail pane Closes #1668 See merge request core-developers/forge!3505
This commit is contained in:
@@ -1437,6 +1437,7 @@ public class Card extends GameEntity implements Comparable<Card> {
|
|||||||
}
|
}
|
||||||
public final void setChosenNumber(final int i) {
|
public final void setChosenNumber(final int i) {
|
||||||
chosenNumber = i;
|
chosenNumber = i;
|
||||||
|
view.updateChosenNumber(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public final Card getExiledWith() {
|
public final Card getExiledWith() {
|
||||||
|
|||||||
@@ -306,6 +306,13 @@ public class CardView extends GameEntityView {
|
|||||||
set(TrackableProperty.ChosenType, c.getChosenType());
|
set(TrackableProperty.ChosenType, c.getChosenType());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getChosenNumber() {
|
||||||
|
return get(TrackableProperty.ChosenNumber);
|
||||||
|
}
|
||||||
|
void updateChosenNumber(Card c) {
|
||||||
|
set(TrackableProperty.ChosenNumber, c.getChosenNumber().toString());
|
||||||
|
}
|
||||||
|
|
||||||
public List<String> getChosenColors() {
|
public List<String> getChosenColors() {
|
||||||
return get(TrackableProperty.ChosenColors);
|
return get(TrackableProperty.ChosenColors);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ public enum TrackableProperty {
|
|||||||
ChosenType(TrackableTypes.StringType),
|
ChosenType(TrackableTypes.StringType),
|
||||||
ChosenColors(TrackableTypes.StringListType),
|
ChosenColors(TrackableTypes.StringListType),
|
||||||
ChosenCards(TrackableTypes.CardViewCollectionType),
|
ChosenCards(TrackableTypes.CardViewCollectionType),
|
||||||
|
ChosenNumber(TrackableTypes.StringType),
|
||||||
ChosenPlayer(TrackableTypes.PlayerViewType),
|
ChosenPlayer(TrackableTypes.PlayerViewType),
|
||||||
ChosenDirection(TrackableTypes.EnumType(Direction.class)),
|
ChosenDirection(TrackableTypes.EnumType(Direction.class)),
|
||||||
ChosenEvenOdd(TrackableTypes.EnumType(EvenOdd.class)),
|
ChosenEvenOdd(TrackableTypes.EnumType(EvenOdd.class)),
|
||||||
|
|||||||
@@ -416,6 +416,14 @@ public class CardDetailUtil {
|
|||||||
area.append(")");
|
area.append(")");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// chosen number
|
||||||
|
if (!card.getChosenNumber().isEmpty()) {
|
||||||
|
if (area.length() != 0) {
|
||||||
|
area.append("\n");
|
||||||
|
}
|
||||||
|
area.append("(chosen number: ").append(card.getChosenNumber()).append(")");
|
||||||
|
}
|
||||||
|
|
||||||
// chosen player
|
// chosen player
|
||||||
if (card.getChosenPlayer() != null) {
|
if (card.getChosenPlayer() != null) {
|
||||||
if (area.length() != 0) {
|
if (area.length() != 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user