Sonar cleanups 03032019

This commit is contained in:
Ingmar Goudt 2019-03-04 10:43:20 +01:00
parent f46f321635
commit 45f665eb1d
13 changed files with 37 additions and 41 deletions

View file

@ -270,12 +270,14 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar
mageCards = new LinkedHashMap<>();
//Find card view
for (UUID uuid : cards.keySet()) {
for (Map.Entry<UUID, CardView> view : cards.entrySet()) {
UUID uuid = view.getKey();
CardView cardView = view.getValue();
if (oldMageCards.containsKey(uuid)) {
mageCards.put(uuid, oldMageCards.get(uuid));
oldMageCards.remove(uuid);
} else {
mageCards.put(uuid, addCard(cards.get(uuid), bigCard, gameId));
mageCards.put(uuid, addCard(cardView, bigCard, gameId));
}
}
//Remove unused cards

View file

@ -238,11 +238,7 @@ public class BattlefieldPanel extends javax.swing.JLayeredPane {
cardDimension = new Dimension(Config.dimensions.getFrameWidth(), Config.dimensions.getFrameHeight());
}
final MagePermanent perm = Plugins.instance.getMagePermanent(permanent, bigCard, cardDimension, gameId, true);
if (!Plugins.instance.isCardPluginLoaded()) {
//perm.setBounds(findEmptySpace(new Dimension(Config.dimensions.frameWidth, Config.dimensions.frameHeight)));
} else {
//perm.setAlpha(0);
}
permanents.put(permanent.getId(), perm);
BattlefieldPanel.this.jPanel.add(perm, 10);

View file

@ -428,7 +428,7 @@ public class CardViewEDHPowerLevelComparator implements Comparator<CardView> {
|| cn.equals("krosan restorer") || cn.equals("laboratory maniac")
|| cn.equals("leovold, emissary of trest")
|| cn.equals("leonin relic-warder") || cn.equals("leyline of the void")
|| cn.equals("memnarch") || cn.equals("memnarch")
|| cn.equals("memnarch")
|| cn.equals("meren of clan nel toth") || cn.equals("mikaeus, the unhallowed")
|| cn.equals("mindcrank") || cn.equals("mindslaver")
|| cn.equals("minion reflector") || cn.equals("mycosynth lattice")
@ -446,7 +446,7 @@ public class CardViewEDHPowerLevelComparator implements Comparator<CardView> {
|| cn.equals("sunder")
|| cn.equals("storm cauldron") || cn.equals("teferi's puzzle box")
|| cn.equals("tangle wire")
|| cn.equals("teferi, mage of zhalfir") || cn.equals("teferi, mage of zhalfir")
|| cn.equals("teferi, mage of zhalfir")
|| cn.equals("tezzeret the seeker") || cn.equals("time stretch")
|| cn.equals("time warp") || cn.equals("training grounds")
|| cn.equals("triskelavus") || cn.equals("triskelion")