From 436962e274b3b142c605c8cb41b5f3c44fecf3d7 Mon Sep 17 00:00:00 2001 From: poco0317 Date: Fri, 30 Nov 2018 21:03:31 -0600 Subject: [PATCH] Stop PlayerOptions from requesting the leaderboard because we can't grab the wheel --- .../ScreenSelectMusic decorations/score.lua | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/Themes/Til Death/BGAnimations/ScreenSelectMusic decorations/score.lua b/Themes/Til Death/BGAnimations/ScreenSelectMusic decorations/score.lua index 5879b65586..430c7c5965 100644 --- a/Themes/Til Death/BGAnimations/ScreenSelectMusic decorations/score.lua +++ b/Themes/Til Death/BGAnimations/ScreenSelectMusic decorations/score.lua @@ -65,17 +65,19 @@ local moped -- You know, if we can see the place where the scores should be. local function updateLeaderBoardForCurrentChart() local top = SCREENMAN:GetTopScreen() - if top:GetMusicWheel():IsSettled() and ((getTabIndex() == 2 and nestedTab == 2) or collapsed) then - local steps = GAMESTATE:GetCurrentSteps(PLAYER_1) - if steps then - DLMAN:RequestChartLeaderBoardFromOnline( - steps:GetChartKey(), - function(leaderboard) - moped:playcommand("SetFromLeaderboard", leaderboard) - end - ) - else - moped:playcommand("SetFromLeaderboard", {}) + if top:GetName() == "ScreenSelectMusic" or top:GetName() == "ScreenNetSelectMusic" then + if top:GetMusicWheel():IsSettled() and ((getTabIndex() == 2 and nestedTab == 2) or collapsed) then + local steps = GAMESTATE:GetCurrentSteps(PLAYER_1) + if steps then + DLMAN:RequestChartLeaderBoardFromOnline( + steps:GetChartKey(), + function(leaderboard) + moped:playcommand("SetFromLeaderboard", leaderboard) + end + ) + else + moped:playcommand("SetFromLeaderboard", {}) + end end end end