From 300fd8e6f8ab67d02e32750e87fbd5c41291626f Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Thu, 15 Dec 2011 20:49:25 -0600 Subject: [PATCH] attempt to fix up some evaluation branch logic --- Themes/_fallback/Scripts/02 Branches.lua | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/Themes/_fallback/Scripts/02 Branches.lua b/Themes/_fallback/Scripts/02 Branches.lua index 2b502cd493..959e499aa2 100644 --- a/Themes/_fallback/Scripts/02 Branches.lua +++ b/Themes/_fallback/Scripts/02 Branches.lua @@ -177,12 +177,27 @@ Branch = { end end, AfterEvaluation = function() - if GAMESTATE:GetSmallestNumStagesLeftForAnyHumanPlayer() >= 1 then + if GAMESTATE:IsCourseMode() then return "ScreenProfileSave" - elseif STATSMAN:GetCurStageStats():AllFailed() then - return "ScreenProfileSaveSummary" else - return "ScreenEvaluationSummary" + local maxStages = PREFSMAN:GetPreference("SongsPerPlay") + local stagesLeft = GetSmallestNumStagesLeftForAnyHumanPlayer() + local allFailed = STATSMAN:GetCurStageStats():AllFailed() + local song = GAMESTATE:GetCurrentSong() + + if GAMESTATE:IsEventMode() or stagesLeft >= 1 then + return "ScreenProfileSave" + elseif allFailed then + return "ScreenProfileSaveSummary" + elseif song:IsLong() and maxStages <= 2 and stagesLeft < 1 and allFailed then + return "ScreenProfileSaveSummary" + elseif song:IsMarathon() and maxStages <= 3 and stagesLeft < 1 and allFailed then + return "ScreenProfileSaveSummary" + elseif maxStages >= 2 and stagesLeft < 1 and failed then + return "ScreenProfileSaveSummary" + else + return "ScreenProfileSave" + end end end, AfterSummary = "ScreenProfileSaveSummary",