mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
- Use local parent folder for loading in human deck in duel deck quest matches
This commit is contained in:
@@ -49,8 +49,13 @@ public class QuestChallengeReader extends StorageReaderFolder<QuestEventChalleng
|
|||||||
|
|
||||||
String humanDeck = sectionQuest.get("HumanDeck", null);
|
String humanDeck = sectionQuest.get("HumanDeck", null);
|
||||||
if (humanDeck != null) {
|
if (humanDeck != null) {
|
||||||
File humanFile = new File(ForgeConstants.DEFAULT_CHALLENGES_DIR, humanDeck); // Won't work in other worlds!
|
// Defined human decks must live in the same directory as each other
|
||||||
qc.setHumanDeck(DeckSerializer.fromFile(humanFile));
|
try {
|
||||||
|
File humanFile = new File(file.getParent(), humanDeck);
|
||||||
|
qc.setHumanDeck(DeckSerializer.fromFile(humanFile));
|
||||||
|
} catch (Exception e) {
|
||||||
|
System.out.println("Defined human deck couldn't be loaded from " + file.getParent());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Common properties
|
// Common properties
|
||||||
|
|||||||
Reference in New Issue
Block a user