mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
Workshop: support DFC (#2150)
Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.59>
This commit is contained in:
@@ -94,7 +94,7 @@ public enum CCardScript implements ICDoc {
|
||||
}
|
||||
|
||||
currentCard = card;
|
||||
currentScriptInfo = card != null ? CardScriptInfo.getScriptFor(currentCard.getRules().getName()) : null;
|
||||
currentScriptInfo = card != null ? CardScriptInfo.getScriptFor(currentCard.getRules().getNormalizedName()) : null;
|
||||
refresh();
|
||||
}
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ public final class CardScriptInfo {
|
||||
public static CardScriptInfo getScriptFor(final String name) {
|
||||
CardScriptInfo script = allScripts.get(name);
|
||||
if (script == null) { //attempt to load script if not previously loaded
|
||||
final String filename = name.toLowerCase().replaceAll("[^-a-z0-9\\s]","").replaceAll("[-\\s]","_").replaceAll("__","_") + ".txt";
|
||||
final String filename = name.toLowerCase().replaceAll("[^-a-z0-9_\\s]","").replaceAll("[-\\s]","_").replaceAll("__","_") + ".txt";
|
||||
String[] folders = {
|
||||
ForgeConstants.CARD_DATA_DIR + File.separator + String.valueOf(filename.charAt(0)),
|
||||
ForgeConstants.CARD_DATA_DIR + File.separator + "upcoming",
|
||||
|
||||
Reference in New Issue
Block a user