mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 03:38:01 +00:00
- Fixing the two scripts that were broken because they were expecting an End clause in card scripts
This commit is contained in:
@@ -236,18 +236,12 @@ for root, dirnames, filenames in os.walk(folder):
|
||||
card.lines = line + '\n'
|
||||
|
||||
# Start parsing the rest of the data file
|
||||
line = file.readline().strip()
|
||||
|
||||
while line != 'End':
|
||||
for line in file.readlines():
|
||||
line = line.strip()
|
||||
# Skip empty lines
|
||||
if line == '':
|
||||
line = file.readline().strip()
|
||||
continue
|
||||
|
||||
# We really shouldn't
|
||||
if line == 'End':
|
||||
break
|
||||
|
||||
if line.find(setStr) != -1:
|
||||
info = line.replace('SetInfo:','')
|
||||
parts = info.split('|')
|
||||
@@ -257,8 +251,6 @@ for root, dirnames, filenames in os.walk(folder):
|
||||
else:
|
||||
card.lines += line +'\n'
|
||||
|
||||
line = file.readline().strip()
|
||||
|
||||
if not card.hasSet:
|
||||
addSets(card)
|
||||
card.hasSet = True
|
||||
@@ -269,8 +261,6 @@ for root, dirnames, filenames in os.walk(folder):
|
||||
for s in card.sets.values():
|
||||
file.write('SetInfo:'+ s.set + '|' + s.rarity + '|' + s.image + '\n')
|
||||
|
||||
file.write('End')
|
||||
|
||||
err.write(card.name + '... Updated\n')
|
||||
|
||||
file.close()
|
||||
|
||||
Reference in New Issue
Block a user