mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
Allow loading scripts for cards containing commas
This commit is contained in:
@@ -77,7 +77,7 @@ public final class CardScriptInfo {
|
|||||||
public static CardScriptInfo getScriptFor(String name) {
|
public static CardScriptInfo getScriptFor(String name) {
|
||||||
CardScriptInfo script = allScripts.get(name);
|
CardScriptInfo script = allScripts.get(name);
|
||||||
if (script == null) { //attempt to load script if not previously loaded
|
if (script == null) { //attempt to load script if not previously loaded
|
||||||
String filename = name.toLowerCase().replace(' ', '_').replace('-', '_').replace("'", "") + ".txt";
|
String filename = name.toLowerCase().replace(' ', '_').replace('-', '_').replace("'", "").replace(",", "") + ".txt";
|
||||||
File file = new File(ForgeConstants.CARD_DATA_DIR + filename.charAt(0) + File.separator + filename);
|
File file = new File(ForgeConstants.CARD_DATA_DIR + filename.charAt(0) + File.separator + filename);
|
||||||
if (file.exists()) {
|
if (file.exists()) {
|
||||||
script = new CardScriptInfo(FileUtil.readFileToString(file), file);
|
script = new CardScriptInfo(FileUtil.readFileToString(file), file);
|
||||||
|
|||||||
Reference in New Issue
Block a user