mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
fix a bunch of Java warnings.
This commit is contained in:
@@ -361,11 +361,11 @@ public class Gui_DeckEditor_Menu extends JMenuBar implements NewConstants {
|
|||||||
|
|
||||||
for (int i = 0; i < deck.countSideboard(); i++) {
|
for (int i = 0; i < deck.countSideboard(); i++) {
|
||||||
String cardName = deck.getMain(i);
|
String cardName = deck.getMain(i);
|
||||||
String setCode = "";
|
//String setCode = "";
|
||||||
if (cardName.contains("|")) {
|
if (cardName.contains("|")) {
|
||||||
String s[] = cardName.split("\\|", 2);
|
String s[] = cardName.split("\\|", 2);
|
||||||
cardName = s[0];
|
cardName = s[0];
|
||||||
setCode = s[1];
|
//setCode = s[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
top.add(AllZone.CardFactory.getCard(cardName, AllZone.HumanPlayer));
|
top.add(AllZone.CardFactory.getCard(cardName, AllZone.HumanPlayer));
|
||||||
@@ -845,11 +845,11 @@ public class Gui_DeckEditor_Menu extends JMenuBar implements NewConstants {
|
|||||||
CardList top = new CardList();
|
CardList top = new CardList();
|
||||||
for (int i = 0; i < deck.countSideboard(); i++) {
|
for (int i = 0; i < deck.countSideboard(); i++) {
|
||||||
String cardName = deck.getMain(i);
|
String cardName = deck.getMain(i);
|
||||||
String setCode = "";
|
//String setCode = "";
|
||||||
if (cardName.contains("|")) {
|
if (cardName.contains("|")) {
|
||||||
String s[] = cardName.split("\\|", 2);
|
String s[] = cardName.split("\\|", 2);
|
||||||
cardName = s[0];
|
cardName = s[0];
|
||||||
setCode = s[1];
|
//setCode = s[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
top.add(AllZone.CardFactory.getCard(cardName, AllZone.HumanPlayer));
|
top.add(AllZone.CardFactory.getCard(cardName, AllZone.HumanPlayer));
|
||||||
@@ -857,11 +857,11 @@ public class Gui_DeckEditor_Menu extends JMenuBar implements NewConstants {
|
|||||||
CardList bottom = new CardList();
|
CardList bottom = new CardList();
|
||||||
for (int i = 0; i < deck.countMain(); i++) {
|
for (int i = 0; i < deck.countMain(); i++) {
|
||||||
String cardName = deck.getMain(i);
|
String cardName = deck.getMain(i);
|
||||||
String setCode = "";
|
//String setCode = "";
|
||||||
if (cardName.contains("|")) {
|
if (cardName.contains("|")) {
|
||||||
String s[] = cardName.split("\\|", 2);
|
String s[] = cardName.split("\\|", 2);
|
||||||
cardName = s[0];
|
cardName = s[0];
|
||||||
setCode = s[1];
|
//setCode = s[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
bottom.add(AllZone.CardFactory.getCard(cardName, AllZone.HumanPlayer));
|
bottom.add(AllZone.CardFactory.getCard(cardName, AllZone.HumanPlayer));
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import forge.gui.game.CardDetailPanel;
|
|||||||
import forge.gui.game.CardPicturePanel;
|
import forge.gui.game.CardPicturePanel;
|
||||||
import forge.properties.ForgeProps;
|
import forge.properties.ForgeProps;
|
||||||
import forge.properties.NewConstants;
|
import forge.properties.NewConstants;
|
||||||
import forge.quest.data.QuestBoosterPack;
|
//import forge.quest.data.QuestBoosterPack;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import javax.swing.border.Border;
|
import javax.swing.border.Border;
|
||||||
@@ -104,7 +104,7 @@ public class Gui_Quest_DeckEditor extends JFrame implements CardContainer, DeckD
|
|||||||
|
|
||||||
Card c;
|
Card c;
|
||||||
String cardName;
|
String cardName;
|
||||||
QuestBoosterPack pack = new QuestBoosterPack();
|
//QuestBoosterPack pack = new QuestBoosterPack();
|
||||||
|
|
||||||
java.util.List<String> addedList = AllZone.QuestData.getAddedCards();
|
java.util.List<String> addedList = AllZone.QuestData.getAddedCards();
|
||||||
|
|
||||||
|
|||||||
@@ -433,11 +433,11 @@ public class Gui_Quest_DeckEditor_Menu extends JMenuBar {
|
|||||||
List<String> list = questData.getCardpool();
|
List<String> list = questData.getCardpool();
|
||||||
|
|
||||||
for (String cardName : list) {
|
for (String cardName : list) {
|
||||||
String setCode = "";
|
//String setCode = "";
|
||||||
if (cardName.contains("|")) {
|
if (cardName.contains("|")) {
|
||||||
String s[] = cardName.split("\\|", 2);
|
String s[] = cardName.split("\\|", 2);
|
||||||
cardName = s[0];
|
cardName = s[0];
|
||||||
setCode = s[1];
|
//setCode = s[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
cardpool.add(AllZone.CardFactory.getCard(cardName, null));
|
cardpool.add(AllZone.CardFactory.getCard(cardName, null));
|
||||||
@@ -451,12 +451,12 @@ public class Gui_Quest_DeckEditor_Menu extends JMenuBar {
|
|||||||
CardList deckList = new CardList();
|
CardList deckList = new CardList();
|
||||||
for(int i = 0; i < deck.countMain(); i++) {
|
for(int i = 0; i < deck.countMain(); i++) {
|
||||||
String cardName = deck.getMain(i);
|
String cardName = deck.getMain(i);
|
||||||
String setCode = "";
|
//String setCode = "";
|
||||||
if (cardName.contains("|"))
|
if (cardName.contains("|"))
|
||||||
{
|
{
|
||||||
String s[] = cardName.split("\\|",2);
|
String s[] = cardName.split("\\|",2);
|
||||||
cardName = s[0];
|
cardName = s[0];
|
||||||
setCode = s[1];
|
//setCode = s[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
deckList.add(AllZone.CardFactory.getCard(cardName, null));
|
deckList.add(AllZone.CardFactory.getCard(cardName, null));
|
||||||
@@ -534,12 +534,12 @@ public class Gui_Quest_DeckEditor_Menu extends JMenuBar {
|
|||||||
|
|
||||||
for(int i = 0; i < d.countMain(); i++) {
|
for(int i = 0; i < d.countMain(); i++) {
|
||||||
String cardName = d.getMain(i);
|
String cardName = d.getMain(i);
|
||||||
String setCode = "";
|
//String setCode = "";
|
||||||
if (cardName.contains("|"))
|
if (cardName.contains("|"))
|
||||||
{
|
{
|
||||||
String s[] = cardName.split("\\|",2);
|
String s[] = cardName.split("\\|",2);
|
||||||
cardName = s[0];
|
cardName = s[0];
|
||||||
setCode = s[1];
|
//setCode = s[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
deck.add(AllZone.CardFactory.getCard(cardName, null));
|
deck.add(AllZone.CardFactory.getCard(cardName, null));
|
||||||
@@ -683,12 +683,12 @@ public class Gui_Quest_DeckEditor_Menu extends JMenuBar {
|
|||||||
|
|
||||||
for(int i = 0; i < d.countMain(); i++) { {
|
for(int i = 0; i < d.countMain(); i++) { {
|
||||||
String cardName = d.getMain(i);
|
String cardName = d.getMain(i);
|
||||||
String setCode = "";
|
//String setCode = "";
|
||||||
if (cardName.contains("|"))
|
if (cardName.contains("|"))
|
||||||
{
|
{
|
||||||
String s[] = cardName.split("\\|",2);
|
String s[] = cardName.split("\\|",2);
|
||||||
cardName = s[0];
|
cardName = s[0];
|
||||||
setCode = s[1];
|
//setCode = s[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
deck.add(AllZone.CardFactory.getCard(cardName, null));
|
deck.add(AllZone.CardFactory.getCard(cardName, null));
|
||||||
|
|||||||
@@ -216,10 +216,11 @@ public class Gui_Quest_Deck_Info implements NewConstants {
|
|||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
private static void addToDeckList(String name, String difficulty, String description) {
|
private static void addToDeckList(String name, String difficulty, String description) {
|
||||||
nameDeckMap.put(name, new DeckInfo(name, description, difficulty));
|
nameDeckMap.put(name, new DeckInfo(name, description, difficulty));
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
public static void showDeckList() {
|
public static void showDeckList() {
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ import java.util.*;
|
|||||||
//static readAIQuestDeckFiles(QuestData data, ArrayList aiDeckNames)
|
//static readAIQuestDeckFiles(QuestData data, ArrayList aiDeckNames)
|
||||||
//OR non-static readAIQuestDeckFiles()
|
//OR non-static readAIQuestDeckFiles()
|
||||||
//which reads the files "questDecks-easy", "questDecks-medium","questDecks-hard",
|
//which reads the files "questDecks-easy", "questDecks-medium","questDecks-hard",
|
||||||
@SuppressWarnings({"deprecation"})
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public class QuestData implements NewConstants {
|
public class QuestData implements NewConstants {
|
||||||
QuestData_Prefs qdPrefs = null;
|
QuestData_Prefs qdPrefs = null;
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import forge.card.trigger.Trigger;
|
|||||||
import forge.card.trigger.TriggerHandler;
|
import forge.card.trigger.TriggerHandler;
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
public class QuestUtil {
|
public class QuestUtil {
|
||||||
|
|
||||||
public static int getLife(QuestData qd)
|
public static int getLife(QuestData qd)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import forge.Constant;
|
|||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
public class Deck implements Comparable{
|
public class Deck implements Comparable<Deck>{
|
||||||
//gameType is from Constant.GameType, like Constant.GameType.Regular
|
//gameType is from Constant.GameType, like Constant.GameType.Regular
|
||||||
|
|
||||||
private Map<String, String> metadata = new HashMap<String, String>();
|
private Map<String, String> metadata = new HashMap<String, String>();
|
||||||
@@ -161,12 +161,8 @@ public class Deck implements Comparable{
|
|||||||
return metadata.get(DESCRIPTION);
|
return metadata.get(DESCRIPTION);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int compareTo(Object o) {
|
public int compareTo(Deck d) {
|
||||||
if (o instanceof Deck)
|
return getName().compareTo(d.getName());
|
||||||
{
|
|
||||||
return getName().compareTo(((Deck)o).getName());
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Set<Map.Entry<String,String>> getMetadata() {
|
public Set<Map.Entry<String,String>> getMetadata() {
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ public class QuestData {
|
|||||||
int lost;
|
int lost;
|
||||||
|
|
||||||
int life;
|
int life;
|
||||||
private int maxLife;
|
//private int maxLife;
|
||||||
|
|
||||||
int questsPlayed;
|
int questsPlayed;
|
||||||
|
|
||||||
|
|||||||
@@ -216,8 +216,11 @@ public class QuestDataIO {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//is not used anywhere as far as I can search for
|
||||||
|
/*
|
||||||
public List<String> getIgnoredFields() {
|
public List<String> getIgnoredFields() {
|
||||||
return ignoredFields;
|
return ignoredFields;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3,6 +3,8 @@ package forge.quest.gui;
|
|||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
|
|
||||||
public abstract class QuestAbstractPanel extends JPanel {
|
public abstract class QuestAbstractPanel extends JPanel {
|
||||||
|
private static final long serialVersionUID = -6378675010346615367L;
|
||||||
|
|
||||||
public QuestFrame mainFrame;
|
public QuestFrame mainFrame;
|
||||||
|
|
||||||
protected QuestAbstractPanel(QuestFrame mainFrame) {
|
protected QuestAbstractPanel(QuestFrame mainFrame) {
|
||||||
|
|||||||
@@ -68,6 +68,8 @@ public class QuestBazaarItem {
|
|||||||
}
|
}
|
||||||
|
|
||||||
JPanel itemPanel = new JPanel() {
|
JPanel itemPanel = new JPanel() {
|
||||||
|
private static final long serialVersionUID = -5182857296365949682L;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Dimension getPreferredSize() {
|
public Dimension getPreferredSize() {
|
||||||
Dimension realSize = super.getPreferredSize();
|
Dimension realSize = super.getPreferredSize();
|
||||||
|
|||||||
@@ -366,14 +366,14 @@ public class QuestBattle extends QuestSelectablePanel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class DeckInfo {
|
private static class DeckInfo {
|
||||||
String name;
|
//String name;
|
||||||
String difficulty;
|
String difficulty;
|
||||||
String description;
|
String description;
|
||||||
|
|
||||||
private DeckInfo(String name, String description, String difficulty) {
|
private DeckInfo(String name, String description, String difficulty) {
|
||||||
this.description = description;
|
this.description = description;
|
||||||
this.difficulty = difficulty;
|
this.difficulty = difficulty;
|
||||||
this.name = name;
|
//this.name = name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ import java.util.List;
|
|||||||
|
|
||||||
|
|
||||||
public class QuestMainPanel extends QuestAbstractPanel {
|
public class QuestMainPanel extends QuestAbstractPanel {
|
||||||
|
private static final long serialVersionUID = 6142934729724012402L;
|
||||||
|
|
||||||
private forge.quest.data.QuestData questData;
|
private forge.quest.data.QuestData questData;
|
||||||
|
|
||||||
JLabel creditsLabel = new JLabel();
|
JLabel creditsLabel = new JLabel();
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import java.util.Collections;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class QuestQuest extends QuestSelectablePanel {
|
public class QuestQuest extends QuestSelectablePanel {
|
||||||
|
private static final long serialVersionUID = -162817410327650160L;
|
||||||
|
|
||||||
Quest_Assignment assignment;
|
Quest_Assignment assignment;
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ import java.awt.Color;
|
|||||||
import java.awt.Dimension;
|
import java.awt.Dimension;
|
||||||
|
|
||||||
public class QuestSelectablePanel extends JPanel {
|
public class QuestSelectablePanel extends JPanel {
|
||||||
|
private static final long serialVersionUID = -1502285997894190742L;
|
||||||
|
|
||||||
protected Color backgroundColor;
|
protected Color backgroundColor;
|
||||||
private boolean selected;
|
private boolean selected;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user