llllllllll / slider

Utilities for working with osu! files and data
https://llllllllll.github.io/slider/index.html
GNU Lesser General Public License v3.0
39 stars 17 forks source link

add __repr__ for `Action` #86

Closed tybug closed 3 years ago

tybug commented 3 years ago

wrote this while looking into #85. I'm not too confident on the style of this string to be honest, especially the keypresses (what to show when there's no keypresses?). Happy to change to something better if asked.

Looks like this:

0:06:22.450000, Position(x=213.7778, y=192.4444), No Keypresses
0:06:22.465000, Position(x=213.7778, y=193.3333), K2 + M2
0:06:22.469000, Position(x=213.7778, y=193.3333), K2 + M2
0:06:22.486000, Position(x=214.6667, y=194.2222), K2 + M2
0:06:22.500000, Position(x=216.8889, y=195.5556), K2 + M2
0:06:22.519000, Position(x=219.1111, y=196.8889), K2 + M2
0:06:22.524000, Position(x=222.6667, y=199.1111), No Keypresses
0:06:22.534000, Position(x=228.0, y=202.2222), No Keypresses
0:06:22.550000, Position(x=236.0, y=206.2222), No Keypresses
0:06:22.568000, Position(x=251.5556, y=215.5556), No Keypresses
0:06:22.585000, Position(x=263.1111, y=222.2222), No Keypresses
llllllllll commented 3 years ago

This might make more sense as a repr if it is just for debugging, but otherwise this looks good to me

tybug commented 3 years ago

agreed - I've made the change