mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
moving res content to new forge resources module
This commit is contained in:
3
.gitattributes
vendored
3
.gitattributes
vendored
@@ -139,7 +139,6 @@ forge-ai/src/main/java/forge/ai/ability/UntapAi.java -text
|
|||||||
forge-ai/src/main/java/forge/ai/ability/UntapAllAi.java -text
|
forge-ai/src/main/java/forge/ai/ability/UntapAllAi.java -text
|
||||||
forge-ai/src/main/java/forge/ai/ability/ZoneExchangeAi.java -text
|
forge-ai/src/main/java/forge/ai/ability/ZoneExchangeAi.java -text
|
||||||
forge-bundle/pom.xml svneol=native#text/xml
|
forge-bundle/pom.xml svneol=native#text/xml
|
||||||
forge-bundle/src/main/conf/cardsfolder.xml svneol=native#text/xml
|
|
||||||
forge-bundle/src/main/conf/forge.ico -text svneol=unset#image/ico
|
forge-bundle/src/main/conf/forge.ico -text svneol=unset#image/ico
|
||||||
forge-bundle/src/main/conf/windows-linux.xml svneol=native#text/xml
|
forge-bundle/src/main/conf/windows-linux.xml svneol=native#text/xml
|
||||||
forge-bundle/src/main/resources/CHANGES.txt -text
|
forge-bundle/src/main/resources/CHANGES.txt -text
|
||||||
@@ -16064,4 +16063,6 @@ forge-net/src/main/java/forge/net/protocol/toserver/EchoPacketSrv.java -text
|
|||||||
forge-net/src/main/java/forge/net/protocol/toserver/IPacketSrv.java -text
|
forge-net/src/main/java/forge/net/protocol/toserver/IPacketSrv.java -text
|
||||||
forge-net/src/main/java/forge/net/protocol/toserver/IncorrectPacketSrv.java -text
|
forge-net/src/main/java/forge/net/protocol/toserver/IncorrectPacketSrv.java -text
|
||||||
forge-net/src/main/java/forge/net/protocol/toserver/package-info.java -text
|
forge-net/src/main/java/forge/net/protocol/toserver/package-info.java -text
|
||||||
|
forge-resources/pom.xml -text
|
||||||
|
forge-resources/src/main/conf/cardsfolder.xml svneol=native#text/xml
|
||||||
/pom.xml svneol=native#text/xml
|
/pom.xml svneol=native#text/xml
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -99,6 +99,7 @@ forge-m-desktop/libs
|
|||||||
forge-m-desktop/res
|
forge-m-desktop/res
|
||||||
forge-m-desktop/target
|
forge-m-desktop/target
|
||||||
forge-net/target
|
forge-net/target
|
||||||
|
forge-resources/target
|
||||||
/forge.profile.properties
|
/forge.profile.properties
|
||||||
/nbactions.xml
|
/nbactions.xml
|
||||||
/pom.xml.next
|
/pom.xml.next
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ import java.util.Map;
|
|||||||
public class AiProfileUtil {
|
public class AiProfileUtil {
|
||||||
private static Map<String, Map<AiProps, String>> loadedProfiles = new HashMap<String, Map<AiProps, String>>();
|
private static Map<String, Map<AiProps, String>> loadedProfiles = new HashMap<String, Map<AiProps, String>>();
|
||||||
|
|
||||||
private static final String AI_PROFILE_DIR = "res/ai";
|
private static final String AI_PROFILE_DIR = AiProfileUtil.class.getResource("/").getFile()+"ai";
|
||||||
private static final String AI_PROFILE_EXT = ".ai";
|
private static final String AI_PROFILE_EXT = ".ai";
|
||||||
|
|
||||||
public static final String AI_PROFILE_RANDOM_MATCH = "* Random (Match) *";
|
public static final String AI_PROFILE_RANDOM_MATCH = "* Random (Match) *";
|
||||||
|
|||||||
@@ -17,6 +17,11 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>forge</groupId>
|
<groupId>forge</groupId>
|
||||||
<artifactId>forge-gui</artifactId>
|
<artifactId>forge-gui</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>forge</groupId>
|
||||||
|
<artifactId>forge-resources</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
@@ -34,6 +39,21 @@
|
|||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<!--plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>resources</id>
|
||||||
|
<goals>
|
||||||
|
<goal>unpack-dependencies</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<outputDirectory>${project.build.directory}</outputDirectory>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin-->
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-assembly-plugin</artifactId>
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
@@ -58,7 +78,7 @@
|
|||||||
</archive>
|
</archive>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
<execution>
|
<!--execution>
|
||||||
<id>cardsfolder</id>
|
<id>cardsfolder</id>
|
||||||
<phase>generate-resources</phase>
|
<phase>generate-resources</phase>
|
||||||
<goals>
|
<goals>
|
||||||
@@ -72,7 +92,7 @@
|
|||||||
</descriptors>
|
</descriptors>
|
||||||
<finalName>cardsfolder</finalName>
|
<finalName>cardsfolder</finalName>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution-->
|
||||||
<execution>
|
<execution>
|
||||||
<id>windows-linux</id>
|
<id>windows-linux</id>
|
||||||
<phase>package</phase>
|
<phase>package</phase>
|
||||||
|
|||||||
@@ -4,6 +4,13 @@
|
|||||||
<format>tar.bz2</format>
|
<format>tar.bz2</format>
|
||||||
</formats>
|
</formats>
|
||||||
<includeBaseDirectory>false</includeBaseDirectory>
|
<includeBaseDirectory>false</includeBaseDirectory>
|
||||||
|
<dependencySets>
|
||||||
|
<dependencySet>
|
||||||
|
<scope>provided</scope>
|
||||||
|
<unpack>true</unpack>
|
||||||
|
<outputDirectory>/res</outputDirectory>
|
||||||
|
</dependencySet>
|
||||||
|
</dependencySets>
|
||||||
<fileSets>
|
<fileSets>
|
||||||
<fileSet>
|
<fileSet>
|
||||||
<directory>${project.basedir}/src/main/resources</directory>
|
<directory>${project.basedir}/src/main/resources</directory>
|
||||||
@@ -18,25 +25,19 @@
|
|||||||
<fileSet>
|
<fileSet>
|
||||||
<directory>${project.basedir}/src/main/resources</directory>
|
<directory>${project.basedir}/src/main/resources</directory>
|
||||||
<excludes>
|
<excludes>
|
||||||
<exclude>res/cardsfolder/**</exclude>
|
<!--exclude>res/cardsfolder/**</exclude-->
|
||||||
<exclude>forge.sh</exclude>
|
<exclude>forge.sh</exclude>
|
||||||
<exclude>forge.command</exclude>
|
<exclude>forge.command</exclude>
|
||||||
<exclude>forge.bat</exclude>
|
<exclude>forge.bat</exclude>
|
||||||
</excludes>
|
</excludes>
|
||||||
<outputDirectory>/</outputDirectory>
|
<outputDirectory>/</outputDirectory>
|
||||||
</fileSet>
|
</fileSet>
|
||||||
<fileSet>
|
|
||||||
<directory>${project.build.directory}</directory>
|
|
||||||
<includes>
|
|
||||||
<include>cardsfolder.zip</include>
|
|
||||||
</includes>
|
|
||||||
<outputDirectory>/res/cardsfolder</outputDirectory>
|
|
||||||
</fileSet>
|
|
||||||
<fileSet>
|
<fileSet>
|
||||||
<directory>${project.build.directory}</directory>
|
<directory>${project.build.directory}</directory>
|
||||||
<outputDirectory>/</outputDirectory>
|
<outputDirectory>/</outputDirectory>
|
||||||
<includes>
|
<includes>
|
||||||
<include>forge.exe</include>
|
<include>forge.exe</include>
|
||||||
|
<!--include>res/**</include-->
|
||||||
<include>${project.build.finalName}-jar-with-dependencies.jar</include>
|
<include>${project.build.finalName}-jar-with-dependencies.jar</include>
|
||||||
</includes>
|
</includes>
|
||||||
</fileSet>
|
</fileSet>
|
||||||
|
|||||||
@@ -13,6 +13,11 @@
|
|||||||
<name>Forge Core</name>
|
<name>Forge Core</name>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>forge</groupId>
|
||||||
|
<artifactId>forge-resources</artifactId>
|
||||||
|
<scope>runtime</scope>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.guava</groupId>
|
<groupId>com.google.guava</groupId>
|
||||||
<artifactId>guava</artifactId>
|
<artifactId>guava</artifactId>
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ public class StaticData {
|
|||||||
this.boosters = new StorageBase<SealedProduct.Template>("Boosters", editions.getBoosterGenerator());
|
this.boosters = new StorageBase<SealedProduct.Template>("Boosters", editions.getBoosterGenerator());
|
||||||
this.specialBoosters = new StorageBase<SealedProduct.Template>("Special boosters", new SealedProduct.Template.Reader(new File(blockDataFolder, "boosters-special.txt")));
|
this.specialBoosters = new StorageBase<SealedProduct.Template>("Special boosters", new SealedProduct.Template.Reader(new File(blockDataFolder, "boosters-special.txt")));
|
||||||
this.tournaments = new StorageBase<SealedProduct.Template>("Starter sets", new SealedProduct.Template.Reader(new File(blockDataFolder, "starters.txt")));
|
this.tournaments = new StorageBase<SealedProduct.Template>("Starter sets", new SealedProduct.Template.Reader(new File(blockDataFolder, "starters.txt")));
|
||||||
this.fatPacks = new StorageBase<FatPack.Template>("Fat packs", new FatPack.Template.Reader("res/blockdata/fatpacks.txt"));
|
this.fatPacks = new StorageBase<FatPack.Template>("Fat packs", new FatPack.Template.Reader(StaticData.class.getResource("/").getFile()+"/blockdata/fatpacks.txt"));
|
||||||
this.printSheets = new StorageBase<PrintSheet>("Special print runs", new PrintSheet.Reader(new File(blockDataFolder, "printsheets.txt")));
|
this.printSheets = new StorageBase<PrintSheet>("Special print runs", new PrintSheet.Reader(new File(blockDataFolder, "printsheets.txt")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -66,6 +66,11 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>forge</groupId>
|
<groupId>forge</groupId>
|
||||||
<artifactId>forge-net</artifactId>
|
<artifactId>forge-net</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>forge</groupId>
|
||||||
|
<artifactId>forge-resources</artifactId>
|
||||||
|
<scope>runtime</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.miglayout</groupId>
|
<groupId>com.miglayout</groupId>
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ public final class Singletons {
|
|||||||
|
|
||||||
// Loads all cards (using progress bar).
|
// Loads all cards (using progress bar).
|
||||||
final CardStorageReader reader = new CardStorageReader(NewConstants.CARD_DATA_DIR, progressBarBridge, CardScriptInfo.readerObserver);
|
final CardStorageReader reader = new CardStorageReader(NewConstants.CARD_DATA_DIR, progressBarBridge, CardScriptInfo.readerObserver);
|
||||||
magicDb = new StaticData(reader, "res/editions", "res/blockdata");
|
magicDb = new StaticData(reader, NewConstants.EDITIONS_DIR, NewConstants.BLOCKDATA_DIR);
|
||||||
model = FModel.getInstance(withUi);
|
model = FModel.getInstance(withUi);
|
||||||
|
|
||||||
if (withUi) {
|
if (withUi) {
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import forge.Singletons;
|
|||||||
import forge.deck.CardPool;
|
import forge.deck.CardPool;
|
||||||
import forge.deck.generation.DeckGeneratorBase;
|
import forge.deck.generation.DeckGeneratorBase;
|
||||||
import forge.error.BugReporter;
|
import forge.error.BugReporter;
|
||||||
|
import forge.properties.NewConstants;
|
||||||
import forge.util.FileUtil;
|
import forge.util.FileUtil;
|
||||||
import forge.util.MyRandom;
|
import forge.util.MyRandom;
|
||||||
|
|
||||||
@@ -61,7 +62,7 @@ public class GenerateThemeDeck extends DeckGeneratorBase {
|
|||||||
public static final ArrayList<String> getThemeNames() {
|
public static final ArrayList<String> getThemeNames() {
|
||||||
final ArrayList<String> ltNames = new ArrayList<String>();
|
final ArrayList<String> ltNames = new ArrayList<String>();
|
||||||
|
|
||||||
final File file = new File("res/quest/themes/");
|
final File file = new File(NewConstants._QUEST_DIR+"themes/");
|
||||||
|
|
||||||
if (!file.exists()) {
|
if (!file.exists()) {
|
||||||
throw new RuntimeException("GenerateThemeDeck : getThemeNames error -- file not found -- filename is "
|
throw new RuntimeException("GenerateThemeDeck : getThemeNames error -- file not found -- filename is "
|
||||||
@@ -98,7 +99,7 @@ public class GenerateThemeDeck extends DeckGeneratorBase {
|
|||||||
String s = "";
|
String s = "";
|
||||||
|
|
||||||
// read theme file
|
// read theme file
|
||||||
final String tFileName = "res/quest/themes/" + themeName + ".thm";
|
final String tFileName = NewConstants._QUEST_DIR+"themes/" + themeName + ".thm";
|
||||||
List<String> lines = FileUtil.readFile(tFileName);
|
List<String> lines = FileUtil.readFile(tFileName);
|
||||||
|
|
||||||
final List<Grp> groups = readGroups(lines);
|
final List<Grp> groups = readGroups(lines);
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import forge.gui.toolbox.FLabel;
|
|||||||
import forge.gui.toolbox.FSkin;
|
import forge.gui.toolbox.FSkin;
|
||||||
import forge.gui.toolbox.FSkin.SkinnedPanel;
|
import forge.gui.toolbox.FSkin.SkinnedPanel;
|
||||||
import forge.gui.toolbox.FSkin.SkinnedTextField;
|
import forge.gui.toolbox.FSkin.SkinnedTextField;
|
||||||
|
import forge.properties.NewConstants;
|
||||||
import forge.quest.data.QuestPreferences;
|
import forge.quest.data.QuestPreferences;
|
||||||
import forge.quest.data.QuestPreferences.QPref;
|
import forge.quest.data.QuestPreferences.QPref;
|
||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
@@ -61,7 +62,7 @@ public class QuestPreferencesHandler extends SkinnedPanel {
|
|||||||
pnlRewards.setLayout(new MigLayout("insets 0, gap 0, wrap 2"));
|
pnlRewards.setLayout(new MigLayout("insets 0, gap 0, wrap 2"));
|
||||||
|
|
||||||
pnlRewards.add(new FLabel.Builder().text("Rewards")
|
pnlRewards.add(new FLabel.Builder().text("Rewards")
|
||||||
.icon(new FSkin.UnskinnedIcon("res/images/icons/CoinIcon.png")).build(),
|
.icon(new FSkin.UnskinnedIcon(NewConstants.IMAGES_DIR+"icons/CoinIcon.png")).build(),
|
||||||
"w 100%!, h 30px!, span 2 1");
|
"w 100%!, h 30px!, span 2 1");
|
||||||
pnlRewards.add(lblErrRewards, "w 100%!, h 30px!, span 2 1");
|
pnlRewards.add(lblErrRewards, "w 100%!, h 30px!, span 2 1");
|
||||||
|
|
||||||
@@ -102,7 +103,7 @@ public class QuestPreferencesHandler extends SkinnedPanel {
|
|||||||
pnlDifficulty.setOpaque(false);
|
pnlDifficulty.setOpaque(false);
|
||||||
pnlDifficulty.setLayout(new MigLayout("insets 0, gap 0, wrap 5"));
|
pnlDifficulty.setLayout(new MigLayout("insets 0, gap 0, wrap 5"));
|
||||||
|
|
||||||
pnlDifficulty.add(new FLabel.Builder().text("Difficulty Adjustments").icon(new FSkin.UnskinnedIcon("res/images/icons/NotesIcon.png")).build(), "w 100%!, h 30px!, span 5 1");
|
pnlDifficulty.add(new FLabel.Builder().text("Difficulty Adjustments").icon(new FSkin.UnskinnedIcon(NewConstants.IMAGES_DIR+"icons/NotesIcon.png")).build(), "w 100%!, h 30px!, span 5 1");
|
||||||
pnlDifficulty.add(lblErrDifficulty, "w 100%!, h 30px!, span 5 1");
|
pnlDifficulty.add(lblErrDifficulty, "w 100%!, h 30px!, span 5 1");
|
||||||
|
|
||||||
constraints1 = "w 60px!, h 26px!";
|
constraints1 = "w 60px!, h 26px!";
|
||||||
@@ -185,7 +186,7 @@ public class QuestPreferencesHandler extends SkinnedPanel {
|
|||||||
pnlBooster.setLayout(new MigLayout("insets 0, gap 0, wrap 2"));
|
pnlBooster.setLayout(new MigLayout("insets 0, gap 0, wrap 2"));
|
||||||
|
|
||||||
pnlBooster.add(new FLabel.Builder().text("Booster Pack Ratios")
|
pnlBooster.add(new FLabel.Builder().text("Booster Pack Ratios")
|
||||||
.icon(new FSkin.UnskinnedIcon("res/images/icons/BookIcon.png")).build(),
|
.icon(new FSkin.UnskinnedIcon(NewConstants.IMAGES_DIR+"icons/BookIcon.png")).build(),
|
||||||
"w 100%!, h 30px!, span 2 1");
|
"w 100%!, h 30px!, span 2 1");
|
||||||
pnlBooster.add(lblErrBooster, "w 100%!, h 30px!, span 2 1");
|
pnlBooster.add(lblErrBooster, "w 100%!, h 30px!, span 2 1");
|
||||||
|
|
||||||
@@ -205,7 +206,7 @@ public class QuestPreferencesHandler extends SkinnedPanel {
|
|||||||
pnlShop.setLayout(new MigLayout("insets 0, gap 0, wrap 2"));
|
pnlShop.setLayout(new MigLayout("insets 0, gap 0, wrap 2"));
|
||||||
|
|
||||||
pnlShop.add(new FLabel.Builder().text("Shop Preferences")
|
pnlShop.add(new FLabel.Builder().text("Shop Preferences")
|
||||||
.icon(new FSkin.UnskinnedIcon("res/images/icons/CoinIcon.png")).build(), "w 100%!, h 30px!, span 2 1");
|
.icon(new FSkin.UnskinnedIcon(NewConstants.IMAGES_DIR+"icons/CoinIcon.png")).build(), "w 100%!, h 30px!, span 2 1");
|
||||||
pnlShop.add(lblErrShop, "w 100%!, h 30px!, span 2 1");
|
pnlShop.add(lblErrShop, "w 100%!, h 30px!, span 2 1");
|
||||||
|
|
||||||
constraints1 = "w 60px, h 26px!";
|
constraints1 = "w 60px, h 26px!";
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package forge.gui.menus;
|
package forge.gui.menus;
|
||||||
|
|
||||||
import forge.gui.toolbox.FOptionPane;
|
import forge.gui.toolbox.FOptionPane;
|
||||||
|
import forge.properties.NewConstants;
|
||||||
import forge.util.BuildInfo;
|
import forge.util.BuildInfo;
|
||||||
import forge.util.FileUtil;
|
import forge.util.FileUtil;
|
||||||
|
|
||||||
@@ -72,7 +73,7 @@ public final class HelpMenu {
|
|||||||
|
|
||||||
private static JMenuItem getMenuItem_HowToPlayFile() {
|
private static JMenuItem getMenuItem_HowToPlayFile() {
|
||||||
JMenuItem menuItem = new JMenuItem("How to Play");
|
JMenuItem menuItem = new JMenuItem("How to Play");
|
||||||
menuItem.addActionListener(getOpenFileAction(getFile("res\\howto.txt")));
|
menuItem.addActionListener(getOpenFileAction(getFile(NewConstants._RES_ROOT+"howto.txt")));
|
||||||
return menuItem;
|
return menuItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1268,7 +1268,7 @@ public enum FSkin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static final String
|
private static final String
|
||||||
FILE_SKINS_DIR = "res/skins/",
|
FILE_SKINS_DIR = NewConstants._RES_ROOT+"skins/",
|
||||||
FILE_ICON_SPRITE = "sprite_icons.png",
|
FILE_ICON_SPRITE = "sprite_icons.png",
|
||||||
FILE_FOIL_SPRITE = "sprite_foils.png",
|
FILE_FOIL_SPRITE = "sprite_foils.png",
|
||||||
FILE_OLD_FOIL_SPRITE = "sprite_old_foils.png",
|
FILE_OLD_FOIL_SPRITE = "sprite_old_foils.png",
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ public final class BoosterDraft implements IBoosterDraft {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case Custom:
|
case Custom:
|
||||||
final List<CustomLimited> myDrafts = draft.loadCustomDrafts("res/draft/", ".draft");
|
final List<CustomLimited> myDrafts = draft.loadCustomDrafts(NewConstants._RES_ROOT+"draft/", ".draft");
|
||||||
|
|
||||||
if (myDrafts.isEmpty()) {
|
if (myDrafts.isEmpty()) {
|
||||||
FOptionPane.showMessageDialog("No custom draft files found.");
|
FOptionPane.showMessageDialog("No custom draft files found.");
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ import forge.item.PaperCard;
|
|||||||
import forge.item.SealedProduct;
|
import forge.item.SealedProduct;
|
||||||
import forge.model.CardBlock;
|
import forge.model.CardBlock;
|
||||||
import forge.model.UnOpenedMeta;
|
import forge.model.UnOpenedMeta;
|
||||||
|
import forge.properties.NewConstants;
|
||||||
import forge.util.FileUtil;
|
import forge.util.FileUtil;
|
||||||
import forge.util.TextUtil;
|
import forge.util.TextUtil;
|
||||||
import org.apache.commons.lang3.ArrayUtils;
|
import org.apache.commons.lang3.ArrayUtils;
|
||||||
@@ -125,7 +126,7 @@ public class SealedCardPoolGenerator {
|
|||||||
final ArrayList<CustomLimited> customs = new ArrayList<CustomLimited>();
|
final ArrayList<CustomLimited> customs = new ArrayList<CustomLimited>();
|
||||||
|
|
||||||
// get list of custom draft files
|
// get list of custom draft files
|
||||||
final File dFolder = new File("res/sealed/");
|
final File dFolder = new File(NewConstants._RES_ROOT+"sealed/");
|
||||||
if (!dFolder.exists()) {
|
if (!dFolder.exists()) {
|
||||||
throw new RuntimeException("GenerateSealed : folder not found -- folder is "
|
throw new RuntimeException("GenerateSealed : folder not found -- folder is "
|
||||||
+ dFolder.getAbsolutePath());
|
+ dFolder.getAbsolutePath());
|
||||||
@@ -139,7 +140,7 @@ public class SealedCardPoolGenerator {
|
|||||||
|
|
||||||
for (final String element : dList) {
|
for (final String element : dList) {
|
||||||
if (element.endsWith(".sealed")) {
|
if (element.endsWith(".sealed")) {
|
||||||
final List<String> dfData = FileUtil.readFile("res/sealed/" + element);
|
final List<String> dfData = FileUtil.readFile(NewConstants._RES_ROOT+"sealed/" + element);
|
||||||
final CustomLimited cs = CustomLimited.parse(dfData, Singletons.getModel().getDecks().getCubes());
|
final CustomLimited cs = CustomLimited.parse(dfData, Singletons.getModel().getDecks().getCubes());
|
||||||
if (cs.getSealedProductTemplate().getNumberOfCardsExpected() > 5) { // Do not allow too small cubes to be played as 'stand-alone'!
|
if (cs.getSealedProductTemplate().getNumberOfCardsExpected() > 5) { // Do not allow too small cubes to be played as 'stand-alone'!
|
||||||
customs.add(cs);
|
customs.add(cs);
|
||||||
|
|||||||
@@ -128,16 +128,16 @@ public class FModel {
|
|||||||
throw new RuntimeException(exn);
|
throw new RuntimeException(exn);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.formats = new GameFormat.Collection(new GameFormat.Reader(new File("res/blockdata", "formats.txt")));
|
this.formats = new GameFormat.Collection(new GameFormat.Reader(new File(NewConstants._RES_ROOT+"blockdata", "formats.txt")));
|
||||||
|
|
||||||
this.blocks = new StorageBase<CardBlock>("Block definitions", new CardBlock.Reader("res/blockdata/blocks.txt", Singletons.getMagicDb().getEditions()));
|
this.blocks = new StorageBase<CardBlock>("Block definitions", new CardBlock.Reader(NewConstants._RES_ROOT+"blockdata/blocks.txt", Singletons.getMagicDb().getEditions()));
|
||||||
this.questPreferences = new QuestPreferences();
|
this.questPreferences = new QuestPreferences();
|
||||||
this.gauntletData = new GauntletData();
|
this.gauntletData = new GauntletData();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this.fantasyBlocks = new StorageBase<CardBlock>("Custom blocks", new CardBlock.Reader("res/blockdata/fantasyblocks.txt", Singletons.getMagicDb().getEditions()));
|
this.fantasyBlocks = new StorageBase<CardBlock>("Custom blocks", new CardBlock.Reader(NewConstants._RES_ROOT+"blockdata/fantasyblocks.txt", Singletons.getMagicDb().getEditions()));
|
||||||
this.worlds = new StorageBase<QuestWorld>("Quest worlds", new QuestWorld.Reader("res/quest/world/worlds.txt"));
|
this.worlds = new StorageBase<QuestWorld>("Quest worlds", new QuestWorld.Reader(NewConstants._RES_ROOT+"quest/world/worlds.txt"));
|
||||||
// TODO - there's got to be a better place for this...oblivion?
|
// TODO - there's got to be a better place for this...oblivion?
|
||||||
ForgePreferences.DEV_MODE = this.preferences.getPrefBoolean(FPref.DEV_MODE_ENABLED);
|
ForgePreferences.DEV_MODE = this.preferences.getPrefBoolean(FPref.DEV_MODE_ENABLED);
|
||||||
|
|
||||||
@@ -256,7 +256,7 @@ public class FModel {
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* if (!MagicColor.Constant.loaded[0]) { ArrayList<String> lcListFile =
|
* if (!MagicColor.Constant.loaded[0]) { ArrayList<String> lcListFile =
|
||||||
* FileUtil.readFile("res/gamedata/LandColorList");
|
* FileUtil.readFile(NewConstants._RES_ROOT+"gamedata/LandColorList");
|
||||||
*
|
*
|
||||||
* if (lcListFile.size() > 1) { for (int i=0; i<lcListFile.size(); i++)
|
* if (lcListFile.size() > 1) { for (int i=0; i<lcListFile.size(); i++)
|
||||||
* { String s = lcListFile.get(i); if (s.length() > 1)
|
* { String s = lcListFile.get(i); if (s.length() > 1)
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ import forge.item.IPaperCard;
|
|||||||
import forge.item.PaperCard;
|
import forge.item.PaperCard;
|
||||||
import forge.item.SealedProduct;
|
import forge.item.SealedProduct;
|
||||||
import forge.limited.CustomLimited;
|
import forge.limited.CustomLimited;
|
||||||
|
import forge.properties.NewConstants;
|
||||||
import forge.util.FileUtil;
|
import forge.util.FileUtil;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@@ -184,7 +185,7 @@ public class MetaSet {
|
|||||||
case Combo: return UnOpenedMeta.selectAll(data);
|
case Combo: return UnOpenedMeta.selectAll(data);
|
||||||
|
|
||||||
case Cube:
|
case Cube:
|
||||||
final File dFolder = new File("res/sealed/");
|
final File dFolder = new File(NewConstants._RES_ROOT+"sealed/");
|
||||||
|
|
||||||
if (!dFolder.exists()) {
|
if (!dFolder.exists()) {
|
||||||
throw new RuntimeException("GenerateSealed : folder not found -- folder is " + dFolder.getAbsolutePath());
|
throw new RuntimeException("GenerateSealed : folder not found -- folder is " + dFolder.getAbsolutePath());
|
||||||
@@ -194,7 +195,7 @@ public class MetaSet {
|
|||||||
throw new RuntimeException("GenerateSealed : not a folder -- " + dFolder.getAbsolutePath());
|
throw new RuntimeException("GenerateSealed : not a folder -- " + dFolder.getAbsolutePath());
|
||||||
}
|
}
|
||||||
|
|
||||||
List<String> dfData = FileUtil.readFile("res/sealed/" + data + ".sealed");
|
List<String> dfData = FileUtil.readFile(NewConstants._RES_ROOT+"sealed/" + data + ".sealed");
|
||||||
final CustomLimited myCube = CustomLimited.parse(dfData, Singletons.getModel().getDecks().getCubes());
|
final CustomLimited myCube = CustomLimited.parse(dfData, Singletons.getModel().getDecks().getCubes());
|
||||||
|
|
||||||
SealedProduct.Template fnPick = myCube.getSealedProductTemplate();
|
SealedProduct.Template fnPick = myCube.getSealedProductTemplate();
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ public final class NewConstants {
|
|||||||
public static final String PROFILE_TEMPLATE_FILE = PROFILE_FILE + ".example";
|
public static final String PROFILE_TEMPLATE_FILE = PROFILE_FILE + ".example";
|
||||||
|
|
||||||
// data that is only in the program dir
|
// data that is only in the program dir
|
||||||
private static final String _RES_ROOT = NewConstants.class.getResource("/").getFile();
|
public static final String _RES_ROOT = NewConstants.class.getResource("/").getFile();
|
||||||
private static final String _LIST_DIR = _RES_ROOT + "lists/";
|
private static final String _LIST_DIR = _RES_ROOT + "lists/";
|
||||||
public static final String KEYWORD_LIST_FILE = _LIST_DIR + "NonStackingKWList.txt";
|
public static final String KEYWORD_LIST_FILE = _LIST_DIR + "NonStackingKWList.txt";
|
||||||
public static final String TYPE_LIST_FILE = _LIST_DIR + "TypeLists.txt";
|
public static final String TYPE_LIST_FILE = _LIST_DIR + "TypeLists.txt";
|
||||||
@@ -38,7 +38,7 @@ public final class NewConstants {
|
|||||||
public static final String IMAGE_LIST_QUEST_PRECONS_FILE = _LIST_DIR + "precon-images.txt";
|
public static final String IMAGE_LIST_QUEST_PRECONS_FILE = _LIST_DIR + "precon-images.txt";
|
||||||
public static final String IMAGE_LIST_QUEST_TOURNAMENTPACKS_FILE = _LIST_DIR + "tournamentpack-images.txt";
|
public static final String IMAGE_LIST_QUEST_TOURNAMENTPACKS_FILE = _LIST_DIR + "tournamentpack-images.txt";
|
||||||
|
|
||||||
private static final String _QUEST_DIR = _RES_ROOT + "quest/";
|
public static final String _QUEST_DIR = _RES_ROOT + "quest/";
|
||||||
public static final String TEXT_HOWTO_FILE = _RES_ROOT + "howto.txt";
|
public static final String TEXT_HOWTO_FILE = _RES_ROOT + "howto.txt";
|
||||||
public static final String DRAFT_RANKINGS_FILE = _RES_ROOT + "draft/rankings.txt";
|
public static final String DRAFT_RANKINGS_FILE = _RES_ROOT + "draft/rankings.txt";
|
||||||
public static final String PRICES_BOOSTER_FILE = _QUEST_DIR + "booster-prices.txt";
|
public static final String PRICES_BOOSTER_FILE = _QUEST_DIR + "booster-prices.txt";
|
||||||
@@ -47,6 +47,9 @@ public final class NewConstants {
|
|||||||
public static final String DECK_CUBE_DIR = _RES_ROOT + "cube";
|
public static final String DECK_CUBE_DIR = _RES_ROOT + "cube";
|
||||||
public static final String QUEST_WORLD_DIR = _QUEST_DIR + "worlds/";
|
public static final String QUEST_WORLD_DIR = _QUEST_DIR + "worlds/";
|
||||||
public static final String QUEST_PRECON_DIR = _QUEST_DIR + "precons/";
|
public static final String QUEST_PRECON_DIR = _QUEST_DIR + "precons/";
|
||||||
|
public static final String EDITIONS_DIR = _RES_ROOT + "editions/";
|
||||||
|
public static final String BLOCKDATA_DIR = _RES_ROOT + "blockdata/";
|
||||||
|
public static final String IMAGES_DIR = _RES_ROOT + "images/";
|
||||||
|
|
||||||
public static final String CARD_DATA_PETS_DIR = _QUEST_DIR + "bazaar/";
|
public static final String CARD_DATA_PETS_DIR = _QUEST_DIR + "bazaar/";
|
||||||
public static final String DEFAULT_DUELS_DIR = _QUEST_DIR + "duels";
|
public static final String DEFAULT_DUELS_DIR = _QUEST_DIR + "duels";
|
||||||
|
|||||||
@@ -396,7 +396,7 @@ public class QuestController {
|
|||||||
*/
|
*/
|
||||||
public void resetDuelsManager() {
|
public void resetDuelsManager() {
|
||||||
QuestWorld world = getWorld();
|
QuestWorld world = getWorld();
|
||||||
String path = world == null || world.getDuelsDir() == null ? NewConstants.DEFAULT_DUELS_DIR : "res/quest/world/" + world.getDuelsDir();
|
String path = world == null || world.getDuelsDir() == null ? NewConstants.DEFAULT_DUELS_DIR : NewConstants._RES_ROOT+"quest/world/" + world.getDuelsDir();
|
||||||
this.duelManager = new QuestEventDuelManager(new File(path));
|
this.duelManager = new QuestEventDuelManager(new File(path));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -406,7 +406,7 @@ public class QuestController {
|
|||||||
*/
|
*/
|
||||||
public void resetChallengesManager() {
|
public void resetChallengesManager() {
|
||||||
QuestWorld world = getWorld();
|
QuestWorld world = getWorld();
|
||||||
String path = world == null || world.getChallengesDir() == null ? NewConstants.DEFAULT_CHALLENGES_DIR : "res/quest/world/" + world.getChallengesDir();
|
String path = world == null || world.getChallengesDir() == null ? NewConstants.DEFAULT_CHALLENGES_DIR : NewConstants._RES_ROOT+"quest/world/" + world.getChallengesDir();
|
||||||
this.allChallenges = new StorageBase<QuestEventChallenge>("Quest Challenges", new QuestChallengeReader(new File(path)));
|
this.allChallenges = new StorageBase<QuestEventChallenge>("Quest Challenges", new QuestChallengeReader(new File(path)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
package forge.sound;
|
package forge.sound;
|
||||||
|
|
||||||
|
import forge.properties.NewConstants;
|
||||||
|
|
||||||
public interface IAudioClip {
|
public interface IAudioClip {
|
||||||
public static final String PathToSound = "res/sound";
|
public static final String PathToSound = NewConstants._RES_ROOT+"sound";
|
||||||
|
|
||||||
public void play();
|
public void play();
|
||||||
public boolean isDone();
|
public boolean isDone();
|
||||||
|
|||||||
@@ -137,21 +137,21 @@ public enum FView {
|
|||||||
|
|
||||||
final List<File> resDirs = new ArrayList<File>();
|
final List<File> resDirs = new ArrayList<File>();
|
||||||
for (String resDir : Lists.newArrayList("decks", "gauntlet", "layouts", "pics", "preferences", "quest/data")) {
|
for (String resDir : Lists.newArrayList("decks", "gauntlet", "layouts", "pics", "preferences", "quest/data")) {
|
||||||
resDirs.add(new File("res", resDir));
|
resDirs.add(new File(NewConstants._RES_ROOT, resDir));
|
||||||
}
|
}
|
||||||
|
|
||||||
final Set<File> doNotDeleteDirs = new HashSet<File>();
|
final Set<File> doNotDeleteDirs = new HashSet<File>();
|
||||||
for (String dir : Lists.newArrayList("decks", "decks/constructed", "decks/draft", "decks/plane", "decks/scheme", "decks/sealed", "gauntlet", "layouts", "pics", "preferences", "quest/data")) {
|
for (String dir : Lists.newArrayList("decks", "decks/constructed", "decks/draft", "decks/plane", "decks/scheme", "decks/sealed", "gauntlet", "layouts", "pics", "preferences", "quest/data")) {
|
||||||
doNotDeleteDirs.add(new File("res", dir));
|
doNotDeleteDirs.add(new File(NewConstants._RES_ROOT, dir));
|
||||||
}
|
}
|
||||||
|
|
||||||
// if we have any data to migrate, pop up the migration dialog
|
// if we have any data to migrate, pop up the migration dialog
|
||||||
if (_addRemainingFiles(null, resDirs, profileDirs, doNotDeleteDirs)) {
|
if (_addRemainingFiles(null, resDirs, profileDirs, doNotDeleteDirs)) {
|
||||||
new ImportDialog("res", new Runnable() {
|
new ImportDialog(NewConstants._RES_ROOT, new Runnable() {
|
||||||
@Override public void run() {
|
@Override public void run() {
|
||||||
// remove known cruft files, yes this is ugly, but it's also temporary
|
// remove known cruft files, yes this is ugly, but it's also temporary
|
||||||
for (String cruftFile : Lists.newArrayList("decks/SkieraCube-cards_not_supported_yet.txt", "decks/cube/ArabianExtended.dck", "decks/cube/GtcGuildBoros.dck", "decks/cube/GtcGuildDimir.dck", "decks/cube/GtcGuildGruul.dck", "decks/cube/GtcGuildOrzhov.dck", "decks/cube/GtcGuildSimic.dck", "decks/cube/GtcPromoBoros.dck", "decks/cube/GtcPromoDimir.dck", "decks/cube/GtcPromoGruul.dck", "decks/cube/GtcPromoOrzhov.dck", "decks/cube/GtcPromoSimic.dck", "decks/cube/JuzamjediCube.dck", "decks/cube/RtRGuildAzorius.dck", "decks/cube/RtRGuildGolgari.dck", "decks/cube/RtRGuildIzzet.dck", "decks/cube/RtRGuildRakdos.dck", "decks/cube/RtRGuildSelesnya.dck", "decks/cube/RtRPromoAzorius.dck", "decks/cube/RtRPromoGolgari.dck", "decks/cube/RtRPromoIzzet.dck", "decks/cube/RtRPromoRakdos.dck", "decks/cube/RtRPromoSelesnya.dck", "decks/cube/SkieraCube.dck", "gauntlet/LOCKED_DotP Preconstructed.dat", "gauntlet/LOCKED_Swimming With Sharks.dat", "layouts/editor_default.xml", "layouts/home_default.xml", "layouts/match_default.xml", "pics/snow_covered_forest1.jpg", "pics/snow_covered_forest2.jpg", "pics/snow_covered_forest3.jpg", "pics/snow_covered_island1.jpg", "pics/snow_covered_island2.jpg", "pics/snow_covered_island3.jpg", "pics/snow_covered_mountain1.jpg", "pics/snow_covered_mountain2.jpg", "pics/snow_covered_mountain3.jpg", "pics/snow_covered_plains1.jpg", "pics/snow_covered_plains2.jpg", "pics/snow_covered_plains3.jpg", "pics/snow_covered_swamp1.jpg", "pics/snow_covered_swamp2.jpg", "pics/snow_covered_swamp3.jpg", "pics/VAN/Birds of Paradise Avatar.full.jpg", "pics/VAN/Erhnam Djinn Avatar.full.jpg", "pics/VAN/Goblin Warchief Avatar.full.jpg", "pics/VAN/Grinning Demon Avatar.full.jpg", "pics/VAN/Platinum Angel Avatar.full.jpg", "pics/VAN/Prodigal Sorcerer Avatar.full.jpg", "pics/VAN/Rith, the Awakener Avatar.full.jpg", "pics/VAN/Royal Assassin Avatar.full.jpg", "pics/VAN/Serra Angel Avatar.full.jpg", "pics/VAN/Tradewind Rider Avatar.full.jpg", "pics_product/10E.jpg", "pics_product/2ED.jpg", "pics_product/3ED.jpg", "pics_product/4ED.jpg", "pics_product/5DN.jpg", "pics_product/5ED.jpg", "pics_product/6ED.jpg", "pics_product/7ED.jpg", "pics_product/8ED.jpg", "pics_product/9ED.jpg", "pics_product/ALA.jpg", "pics_product/ALL.jpg", "pics_product/APC.jpg", "pics_product/ARB.jpg", "pics_product/ARN.jpg", "pics_product/ATQ.jpg", "pics_product/BOK.jpg", "pics_product/CFX.jpg", "pics_product/CHK.jpg", "pics_product/CHR.jpg", "pics_product/CSP.jpg", "pics_product/DIS.jpg", "pics_product/DKA.jpg", "pics_product/DRK.jpg", "pics_product/DST.jpg", "pics_product/EVE.jpg", "pics_product/EXO.jpg", "pics_product/FEM.jpg", "pics_product/FUT.jpg", "pics_product/GPT.jpg", "pics_product/HML.jpg", "pics_product/ICE.jpg", "pics_product/INV.jpg", "pics_product/ISD.jpg", "pics_product/JUD.jpg", "pics_product/LEA.jpg", "pics_product/LEB.jpg", "pics_product/LEG.jpg", "pics_product/LGN.jpg", "pics_product/LRW.jpg", "pics_product/M10.jpg", "pics_product/M11.jpg", "pics_product/M12.jpg", "pics_product/MBS.jpg", "pics_product/MIR.jpg", "pics_product/MMQ.jpg", "pics_product/MOR.jpg", "pics_product/MRD.jpg", "pics_product/NMS.jpg", "pics_product/NPH.jpg", "pics_product/ODY.jpg", "pics_product/ONS.jpg", "pics_product/PCY.jpg", "pics_product/PLC.jpg", "pics_product/PLS.jpg", "pics_product/PO2.jpg", "pics_product/POR.jpg", "pics_product/PTK.jpg", "pics_product/RAV.jpg", "pics_product/ROE.jpg", "pics_product/S99.jpg", "pics_product/SCG.jpg", "pics_product/SHM.jpg", "pics_product/SOK.jpg", "pics_product/SOM.jpg", "pics_product/STH.jpg", "pics_product/TMP.jpg", "pics_product/TOR.jpg", "pics_product/TSP.jpg", "pics_product/UDS.jpg", "pics_product/ULG.jpg", "pics_product/USG.jpg", "pics_product/VIS.jpg", "pics_product/WTH.jpg", "pics_product/WWK.jpg", "pics_product/ZEN.jpg", "pics_product/booster/7E.png", "pics_product/booster/AP.png", "pics_product/booster/DPA.png", "pics_product/booster/EX.png", "pics_product/booster/IN.png", "pics_product/booster/MI.png", "pics_product/booster/OD.png", "pics_product/booster/PS.png", "pics_product/booster/ST.png", "pics_product/booster/TE.png", "pics_product/booster/UD.png", "pics_product/booster/UL.png", "pics_product/booster/UZ.png", "pics_product/booster/VI.png", "pics_product/booster/WL.png", "preferences/.project", "preferences/editor.default.preferences", "preferences/main.properties", "quest/quest.preferences", "quest/quest.properties")) {
|
for (String cruftFile : Lists.newArrayList("decks/SkieraCube-cards_not_supported_yet.txt", "decks/cube/ArabianExtended.dck", "decks/cube/GtcGuildBoros.dck", "decks/cube/GtcGuildDimir.dck", "decks/cube/GtcGuildGruul.dck", "decks/cube/GtcGuildOrzhov.dck", "decks/cube/GtcGuildSimic.dck", "decks/cube/GtcPromoBoros.dck", "decks/cube/GtcPromoDimir.dck", "decks/cube/GtcPromoGruul.dck", "decks/cube/GtcPromoOrzhov.dck", "decks/cube/GtcPromoSimic.dck", "decks/cube/JuzamjediCube.dck", "decks/cube/RtRGuildAzorius.dck", "decks/cube/RtRGuildGolgari.dck", "decks/cube/RtRGuildIzzet.dck", "decks/cube/RtRGuildRakdos.dck", "decks/cube/RtRGuildSelesnya.dck", "decks/cube/RtRPromoAzorius.dck", "decks/cube/RtRPromoGolgari.dck", "decks/cube/RtRPromoIzzet.dck", "decks/cube/RtRPromoRakdos.dck", "decks/cube/RtRPromoSelesnya.dck", "decks/cube/SkieraCube.dck", "gauntlet/LOCKED_DotP Preconstructed.dat", "gauntlet/LOCKED_Swimming With Sharks.dat", "layouts/editor_default.xml", "layouts/home_default.xml", "layouts/match_default.xml", "pics/snow_covered_forest1.jpg", "pics/snow_covered_forest2.jpg", "pics/snow_covered_forest3.jpg", "pics/snow_covered_island1.jpg", "pics/snow_covered_island2.jpg", "pics/snow_covered_island3.jpg", "pics/snow_covered_mountain1.jpg", "pics/snow_covered_mountain2.jpg", "pics/snow_covered_mountain3.jpg", "pics/snow_covered_plains1.jpg", "pics/snow_covered_plains2.jpg", "pics/snow_covered_plains3.jpg", "pics/snow_covered_swamp1.jpg", "pics/snow_covered_swamp2.jpg", "pics/snow_covered_swamp3.jpg", "pics/VAN/Birds of Paradise Avatar.full.jpg", "pics/VAN/Erhnam Djinn Avatar.full.jpg", "pics/VAN/Goblin Warchief Avatar.full.jpg", "pics/VAN/Grinning Demon Avatar.full.jpg", "pics/VAN/Platinum Angel Avatar.full.jpg", "pics/VAN/Prodigal Sorcerer Avatar.full.jpg", "pics/VAN/Rith, the Awakener Avatar.full.jpg", "pics/VAN/Royal Assassin Avatar.full.jpg", "pics/VAN/Serra Angel Avatar.full.jpg", "pics/VAN/Tradewind Rider Avatar.full.jpg", "pics_product/10E.jpg", "pics_product/2ED.jpg", "pics_product/3ED.jpg", "pics_product/4ED.jpg", "pics_product/5DN.jpg", "pics_product/5ED.jpg", "pics_product/6ED.jpg", "pics_product/7ED.jpg", "pics_product/8ED.jpg", "pics_product/9ED.jpg", "pics_product/ALA.jpg", "pics_product/ALL.jpg", "pics_product/APC.jpg", "pics_product/ARB.jpg", "pics_product/ARN.jpg", "pics_product/ATQ.jpg", "pics_product/BOK.jpg", "pics_product/CFX.jpg", "pics_product/CHK.jpg", "pics_product/CHR.jpg", "pics_product/CSP.jpg", "pics_product/DIS.jpg", "pics_product/DKA.jpg", "pics_product/DRK.jpg", "pics_product/DST.jpg", "pics_product/EVE.jpg", "pics_product/EXO.jpg", "pics_product/FEM.jpg", "pics_product/FUT.jpg", "pics_product/GPT.jpg", "pics_product/HML.jpg", "pics_product/ICE.jpg", "pics_product/INV.jpg", "pics_product/ISD.jpg", "pics_product/JUD.jpg", "pics_product/LEA.jpg", "pics_product/LEB.jpg", "pics_product/LEG.jpg", "pics_product/LGN.jpg", "pics_product/LRW.jpg", "pics_product/M10.jpg", "pics_product/M11.jpg", "pics_product/M12.jpg", "pics_product/MBS.jpg", "pics_product/MIR.jpg", "pics_product/MMQ.jpg", "pics_product/MOR.jpg", "pics_product/MRD.jpg", "pics_product/NMS.jpg", "pics_product/NPH.jpg", "pics_product/ODY.jpg", "pics_product/ONS.jpg", "pics_product/PCY.jpg", "pics_product/PLC.jpg", "pics_product/PLS.jpg", "pics_product/PO2.jpg", "pics_product/POR.jpg", "pics_product/PTK.jpg", "pics_product/RAV.jpg", "pics_product/ROE.jpg", "pics_product/S99.jpg", "pics_product/SCG.jpg", "pics_product/SHM.jpg", "pics_product/SOK.jpg", "pics_product/SOM.jpg", "pics_product/STH.jpg", "pics_product/TMP.jpg", "pics_product/TOR.jpg", "pics_product/TSP.jpg", "pics_product/UDS.jpg", "pics_product/ULG.jpg", "pics_product/USG.jpg", "pics_product/VIS.jpg", "pics_product/WTH.jpg", "pics_product/WWK.jpg", "pics_product/ZEN.jpg", "pics_product/booster/7E.png", "pics_product/booster/AP.png", "pics_product/booster/DPA.png", "pics_product/booster/EX.png", "pics_product/booster/IN.png", "pics_product/booster/MI.png", "pics_product/booster/OD.png", "pics_product/booster/PS.png", "pics_product/booster/ST.png", "pics_product/booster/TE.png", "pics_product/booster/UD.png", "pics_product/booster/UL.png", "pics_product/booster/UZ.png", "pics_product/booster/VI.png", "pics_product/booster/WL.png", "preferences/.project", "preferences/editor.default.preferences", "preferences/main.properties", "quest/quest.preferences", "quest/quest.properties")) {
|
||||||
new File("res", cruftFile).delete();
|
new File(NewConstants._RES_ROOT, cruftFile).delete();
|
||||||
}
|
}
|
||||||
|
|
||||||
// assemble a list of remaining files.
|
// assemble a list of remaining files.
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ public class CardDatabaseHelper {
|
|||||||
|
|
||||||
private static void initialize() {
|
private static void initialize() {
|
||||||
final CardStorageReader reader = new CardStorageReader( NewConstants.CARD_DATA_DIR, null, null );
|
final CardStorageReader reader = new CardStorageReader( NewConstants.CARD_DATA_DIR, null, null );
|
||||||
staticData = new StaticData( reader, "res/editions", "res/blockdata" );
|
staticData = new StaticData( reader, NewConstants._RES_ROOT+"editions", NewConstants._RES_ROOT+"blockdata" );
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean hasBeenInitialized() {
|
private static boolean hasBeenInitialized() {
|
||||||
|
|||||||
@@ -127,7 +127,8 @@ public class DeckHintsTest {
|
|||||||
* @return the CardPrinted
|
* @return the CardPrinted
|
||||||
*/
|
*/
|
||||||
protected PaperCard readCard(String filename) {
|
protected PaperCard readCard(String filename) {
|
||||||
File dir = new File(NewConstants.CARD_DATA_DIR);
|
String firstLetter = filename.substring(0, 1);
|
||||||
|
File dir = new File(NewConstants.CARD_DATA_DIR, firstLetter);
|
||||||
File txtFile = new File(dir, filename);
|
File txtFile = new File(dir, filename);
|
||||||
|
|
||||||
CardRules.Reader crr = new CardRules.Reader();
|
CardRules.Reader crr = new CardRules.Reader();
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ public class Forge implements ApplicationListener {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
final CardStorageReader reader = new CardStorageReader(Constants.CARD_DATA_DIR, progressBarBridge, null);
|
final CardStorageReader reader = new CardStorageReader(Constants.CARD_DATA_DIR, progressBarBridge, null);
|
||||||
magicDb = new StaticData(reader, "res/editions", "res/blockdata");
|
magicDb = new StaticData(reader, Forge.class.getResource("/").getFile()+"editions", Forge.class.getResource("/").getFile()+"blockdata");
|
||||||
|
|
||||||
bar.setDescription("Opening main window...");
|
bar.setDescription("Opening main window...");
|
||||||
|
|
||||||
|
|||||||
61
forge-resources/pom.xml
Normal file
61
forge-resources/pom.xml
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<artifactId>forge</artifactId>
|
||||||
|
<groupId>forge</groupId>
|
||||||
|
<version>1.5.14-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>forge-resources</artifactId>
|
||||||
|
<name>Forge Resources</name>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>${project.basedir}/src/main/resources</directory>
|
||||||
|
<excludes>
|
||||||
|
<exclude>cardsfolder/**</exclude>
|
||||||
|
</excludes>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>build-helper-maven-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>parse-version</id>
|
||||||
|
<goals>
|
||||||
|
<goal>parse-version</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>cardsfolder</id>
|
||||||
|
<phase>generate-resources</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>single</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<appendAssemblyId>false</appendAssemblyId>
|
||||||
|
<attach>false</attach>
|
||||||
|
<descriptors>
|
||||||
|
<descriptor>src/main/conf/cardsfolder.xml</descriptor>
|
||||||
|
</descriptors>
|
||||||
|
<finalName>cardsfolder</finalName>
|
||||||
|
<outputDirectory>${project.build.outputDirectory}/cardsfolder</outputDirectory>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
<includeBaseDirectory>false</includeBaseDirectory>
|
<includeBaseDirectory>false</includeBaseDirectory>
|
||||||
<fileSets>
|
<fileSets>
|
||||||
<fileSet>
|
<fileSet>
|
||||||
<directory>${project.basedir}/src/main/resources/res/cardsfolder</directory>
|
<directory>${project.basedir}/src/main/resources/cardsfolder</directory>
|
||||||
<outputDirectory>/</outputDirectory>
|
<outputDirectory>/</outputDirectory>
|
||||||
</fileSet>
|
</fileSet>
|
||||||
</fileSets>
|
</fileSets>
|
||||||
6
pom.xml
6
pom.xml
@@ -185,6 +185,7 @@
|
|||||||
<module>forge-m-base</module>
|
<module>forge-m-base</module>
|
||||||
<module>forge-m-desktop</module>
|
<module>forge-m-desktop</module>
|
||||||
<module>forge-net</module>
|
<module>forge-net</module>
|
||||||
|
<module>forge-resources</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<distributionManagement>
|
<distributionManagement>
|
||||||
@@ -271,6 +272,11 @@
|
|||||||
<artifactId>forge-m-desktop</artifactId>
|
<artifactId>forge-m-desktop</artifactId>
|
||||||
<version>1.5.14-SNAPSHOT</version>
|
<version>1.5.14-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>forge</groupId>
|
||||||
|
<artifactId>forge-resources</artifactId>
|
||||||
|
<version>1.5.14-SNAPSHOT</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.miglayout</groupId>
|
<groupId>com.miglayout</groupId>
|
||||||
<artifactId>miglayout</artifactId>
|
<artifactId>miglayout</artifactId>
|
||||||
|
|||||||
Reference in New Issue
Block a user