mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
Fixed v1 server incompatible with v0 clients (freezes on game startup)
This commit is contained in:
parent
6f175981ce
commit
66eb1de7f1
2 changed files with 2 additions and 27 deletions
|
@ -1127,7 +1127,7 @@ public class ModernCardRenderer extends CardRenderer {
|
|||
protected static Paint getBorderPaint(ObjectColor colors, Collection<CardType> types, int width) {
|
||||
if (colors.isMulticolored()) {
|
||||
if (colors.getColorCount() == 2) {
|
||||
List<ObjectColor> twoColors = colors.getTwoColorsInOrder();
|
||||
List<ObjectColor> twoColors = colors.getColors();
|
||||
|
||||
// Two-color frames look better if we use a whiter white
|
||||
// than the normal white frame color for them, as the normal
|
||||
|
@ -1203,7 +1203,7 @@ public class ModernCardRenderer extends CardRenderer {
|
|||
protected static Paint getTextboxPaint(ObjectColor colors, Collection<CardType> types, int width) {
|
||||
if (colors.isMulticolored()) {
|
||||
if (colors.getColorCount() == 2) {
|
||||
List<ObjectColor> twoColors = colors.getTwoColorsInOrder();
|
||||
List<ObjectColor> twoColors = colors.getColors();
|
||||
Color[] translatedColors;
|
||||
if (types.contains(CardType.LAND)) {
|
||||
translatedColors = new Color[]{
|
||||
|
|
|
@ -154,30 +154,6 @@ public class ObjectColor implements Serializable, Copyable<ObjectColor>, Compara
|
|||
}
|
||||
|
||||
public List<ObjectColor> getColors() {
|
||||
List<ObjectColor> colors = new ArrayList<>();
|
||||
if (this.isWhite()) {
|
||||
colors.add(ObjectColor.WHITE);
|
||||
}
|
||||
if (this.isBlue()) {
|
||||
colors.add(ObjectColor.BLUE);
|
||||
}
|
||||
if (this.isBlack()) {
|
||||
colors.add(ObjectColor.BLACK);
|
||||
}
|
||||
if (this.isRed()) {
|
||||
colors.add(ObjectColor.RED);
|
||||
}
|
||||
if (this.isGreen()) {
|
||||
colors.add(ObjectColor.GREEN);
|
||||
}
|
||||
|
||||
if (this.isGold()) {
|
||||
colors.add(ObjectColor.GOLD);
|
||||
}
|
||||
return colors;
|
||||
}
|
||||
|
||||
public List<ObjectColor> getTwoColorsInOrder() {
|
||||
List<ObjectColor> colors = new ArrayList<>();
|
||||
int firstColor = 5000;
|
||||
int secondColor = -1;
|
||||
|
@ -554,5 +530,4 @@ public class ObjectColor implements Serializable, Copyable<ObjectColor>, Compara
|
|||
colors.add(ObjectColor.GOLD);
|
||||
return colors;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue