[pyddr-devel] Added level sorting to songselect.py

Pavel N. Krivitsky pavel at krivitsky.name
Sun Jan 21 04:47:35 EST 2007


Hello, Frank,

Thanks! I, for one, think that it's a useful feature. Though, in the
future, could you please use 'svn diff' to generate the patch? It makes
it much easier to apply, especially if it affects multiple files.

I've tried the patch out as it is. Unfortunately, it appears to die if
the folder being viewed contains nonstandard difficulty level names
(which show up in some unofficial steps), so I haven't been able to test
it. I've attached the file with the traceback.

> Known problems in "level" sorting: 
> 1. ...

Please correct me if I am misunderstanding the problem, but what about
ending up in the folder of the level of the difficulty selected at the
time the mode was changed?

> 2. ...
> 3. ...
> 
> The reason I did not do 2. and 3. yet is to limit the patch to one
> file. 

Don't worry about that --- make whatever changes are needed to get this
right, and then use 'svn diff' to make the patch.

                          Thanks,
                          Pavel

-------------- next part --------------
Traceback (most recent call last):
  File "./pydance.py", line 205, in ?
    if __name__ == '__main__': main()
  File "./pydance.py", line 195, in main
    menudriver.do(screen, (songs, crs, screen))
  File "/home/pavel/Development/pydance/menudriver.py", line 266, in do
    me.display()
  File "/home/pavel/Development/pydance/menus.py", line 184, in display
    ev = self.items[curitem].activate(ev)
  File "/home/pavel/Development/pydance/menus.py", line 57, in activate
    text, subtext = self.callbacks[ev](*self.args)
  File "/home/pavel/Development/pydance/menudriver.py", line 155, in wrap_ctr
    Obj(*args)
  File "/home/pavel/Development/pydance/gameselect.py", line 205, in __init__
    self.loop()
  File "/home/pavel/Development/pydance/gameselect.py", line 227, in loop
    MODES.get((VALUES[0][indices[0]],
  File "/usr/.home/pavel/Development/pydance/songselect.py", line 224, in __init__
    self.loop()
  File "/usr/.home/pavel/Development/pydance/songselect.py", line 309, in loop
    self._create_song_list(self._song.name)
  File "/usr/.home/pavel/Development/pydance/songselect.py", line 458, in _create_song_list
    s.info["tmpsortdata"] = str("%2d" % difficulty_index_map[difficulty])
KeyError: 'CHALLENGE EDIT'
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://icculus.org/pipermail/pyddr-devel/attachments/20070121/de84050c/attachment.pgp>


More information about the pyddr-devel mailing list