Skip to content

Commit 2d867b5

Browse files
authored
Merge pull request ArchipelagoMW#2 from Taoshix/main
Various miscellaneous changes
2 parents bdf8233 + 4c0ff3f commit 2d867b5

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

worlds/osu/Client.py

+12-2
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,7 @@ def _cmd_show_songs(self):
8787
"""Display all songs in logic."""
8888
indexes = self.get_available_ids()
8989
self.output(f"You Have {self.count_item(726999999)} Performance Points, you need {self.ctx.preformance_points_needed} to unlock your goal.")
90-
if not indexes:
91-
self.output("You do not have any Songs in Logic")
90+
self.output(f"You currently have {len(indexes)} songs in Logic")
9291
for i in indexes:
9392
song = list(self.ctx.pairs.keys())[i]
9493
beatmapset = self.ctx.pairs[song]
@@ -97,6 +96,7 @@ def _cmd_show_songs(self):
9796
def _cmd_show_all_songs(self):
9897
"""Displays all songs included in current generation."""
9998
played_songs = self.get_played_songs()
99+
self.output(f"You have played {len(played_songs)}/{len(self.ctx.pairs)-1} songs")
100100
for song in self.ctx.pairs:
101101
beatmapset = self.ctx.pairs[song]
102102
self.output(f"{song}: {beatmapset['title']} (ID: {beatmapset['id']}) {'(passed)' if song in played_songs else ''}")
@@ -148,6 +148,13 @@ def _cmd_get_last_scores(self, mode=''):
148148

149149
def _cmd_download(self, number=''):
150150
"""Downloads the given song number in '/show_songs', or 'victory' for the goal song."""
151+
if number.lower() == 'next':
152+
if len(self.get_available_ids()) > 0:
153+
number = self.get_available_ids()[0]+1
154+
else:
155+
self.output("You have no songs to download")
156+
return
157+
151158
try:
152159
song_number = int(number)-1
153160
except ValueError:
@@ -198,6 +205,9 @@ def get_played_ids(self):
198205
def get_played_songs(self):
199206
# Gets the Song value of each Song the player has played
200207
played_ids = self.get_played_ids()
208+
if(-1 in played_ids):
209+
played_ids.remove(-1) # Remove victory song from played songs as it was somehow showing up
210+
201211
played_songs = []
202212
for played in played_ids:
203213
played_songs.append(list(self.ctx.pairs.keys())[played])

0 commit comments

Comments
 (0)