From c1d077888ef1b2f53397f9877c1d6238e9a8c735 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Thu, 17 Mar 2011 14:02:25 -0400 Subject: [PATCH] Fix a crash bug by preventing the situation. --- Docs/Changelog_sm-ssc.txt | 2 ++ Themes/_fallback/Scripts/02 Branches.lua | 7 +++++++ Themes/_fallback/metrics.ini | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Docs/Changelog_sm-ssc.txt b/Docs/Changelog_sm-ssc.txt index 3807643478..0be83a6379 100644 --- a/Docs/Changelog_sm-ssc.txt +++ b/Docs/Changelog_sm-ssc.txt @@ -17,6 +17,8 @@ sm-ssc v1.2.4 | 20110??? -------- * [ScreenEdit] Fix bug number 222, where Steps disappeared if they weren't saved. [AJ, Wolfman2000] +* [ScreenOptionsEdit] Fix bug number 186, where people could try to edit or + share songs when they didn't have any. [Wolfman2000] 20110316 -------- diff --git a/Themes/_fallback/Scripts/02 Branches.lua b/Themes/_fallback/Scripts/02 Branches.lua index d57ef9d551..471e9bd30e 100644 --- a/Themes/_fallback/Scripts/02 Branches.lua +++ b/Themes/_fallback/Scripts/02 Branches.lua @@ -71,6 +71,13 @@ Branch = { end; return "ScreenSelectProfile"; end, + OptionsEdit = function() + -- Similar to above, don't let anyone in here with 0 songs. + if SONGMAN:GetNumSongs() == 0 and SONGMAN:GetNumAdditionalSongs() == 0 then + return "ScreenHowToInstallSongs"; + end; + return "ScreenOptionsEdit"; + end, AfterProfileLoad = function() return "ScreenSelectProfile" end, diff --git a/Themes/_fallback/metrics.ini b/Themes/_fallback/metrics.ini index cd1040325c..22ea0dcafc 100644 --- a/Themes/_fallback/metrics.ini +++ b/Themes/_fallback/metrics.ini @@ -1657,7 +1657,7 @@ Choice1="applydefaultoptions;text,Game Start;screen,"..Branch.StartGame() Choice2="screen,ScreenNetworkOptions;text,Play Online" Choice3="screen,ScreenSelectGame;text,Select Game" Choice4="screen,ScreenOptionsService;text,Options" -Choice5="screen,ScreenOptionsEdit;text,Edit/Share" +Choice5="text,Edit/Share;screen,"..Branch.OptionsEdit() Choice6="screen,ScreenJukeboxMenu;text,Jukebox" Choice7="screen,ScreenExit;text,Exit" Choice8="screen,ScreenTest;text,Sandbox"