--- fileparsers.py.orig 2005-04-04 16:49:22.000000000 -0400
+++ fileparsers.py 2007-02-24 17:26:30.000000000 -0500
@@ -597,19 +597,28 @@
if notetype != 0: note = 16.0 / notetype
else: beat += 4.0 # This was an empty measure
+ # s is not always an int. It could be an M (StepMania mine)
+ # Let's make sure it's a digit before extending this step
+ def filter_s( s ):
+ if s.isdigit():
+ return int(s)
+ # Since we don't support mines, let's filter them out
+ elif s == 'M':
+ return 0
+
while len(measure) != 0:
sd = measure[0:count]
measure = measure[count:]
if gametype in games.COUPLE:
step1 = [note]
step2 = [note]
- step1.extend([SMFile.step[int(s)] for s in sd[0:count/2]])
- step2.extend([SMFile.step[int(s)] for s in sd[count/2:]])
+ step1.extend([SMFile.step[filter_s(s)] for s in sd[0:count/2] if filter_s(s)])
+ step2.extend([SMFile.step[filter_s(s)] for s in sd[count/2:] if filter_s(s)])
stepdata[0].append(step1)
stepdata[1].append(step2)
else:
step = [note]
- step.extend([SMFile.step[int(s)] for s in sd])
+ step.extend([SMFile.step[filter_s(s)] for s in sd if filter_s(s)])
stepdata.append(step)
beat += note / 4.0