Small fixes: returned text component in card plugin for rules. Removed debug logging. Fixed NullPointerException for attached cards.

This commit is contained in:
magenoxx 2010-11-13 06:47:50 +00:00
parent 58c4ae1f38
commit e4c01b0693
4 changed files with 13 additions and 6 deletions

View file

@ -89,9 +89,9 @@ public class BattlefieldPanel extends javax.swing.JLayeredPane implements Compon
public void init(UUID gameId, BigCard bigCard) { public void init(UUID gameId, BigCard bigCard) {
this.gameId = gameId; this.gameId = gameId;
this.bigCard = bigCard; this.bigCard = bigCard;
if (Plugins.getInstance().isCardPluginLoaded()) { /*if (Plugins.getInstance().isCardPluginLoaded()) {
bigCard.removeTextComponent(); bigCard.removeTextComponent();
} }*/
addMouseListener(new MageMouseAdapter(this, gameId)); addMouseListener(new MageMouseAdapter(this, gameId));
addMouseMotionListener(new MageMouseMotionAdapter(this, bigCard)); addMouseMotionListener(new MageMouseMotionAdapter(this, bigCard));
} }

View file

@ -420,7 +420,12 @@ public class CardPanel extends MagePermanent {
@Override @Override
public List<MagePermanent> getLinks() { public List<MagePermanent> getLinks() {
return null; List<MagePermanent> list = new ArrayList<MagePermanent>();
if (attachedPanels == null) return list;
for (MagePermanent p : attachedPanels) {
list.add(p);
}
return list;
} }
@Override @Override

View file

@ -84,7 +84,7 @@ public class ImageCache {
public static BufferedImage getImageOriginal(CardView card) { public static BufferedImage getImageOriginal(CardView card) {
String key = getKey(card); String key = getKey(card);
log.debug("#key: " + key); //log.debug("#key: " + key);
return getImage(key); return getImage(key);
} }

View file

@ -7,5 +7,7 @@
# #
# #
hand:player:Fireball:2 hand:player:Fireball:2
battlefield:player:Mountain:5 battlefield:player:Plains:5
battlefield:computer:Brindle Boar:2 battlefield:player:Brindle Boar:1
battlefield:computer:Brindle Boar:1
hand:player:Holy Strength:2