Added ScreenContinue:ContinueEnabled metric. Changed Actor:hidden and Lua scoring to emit errors because they are deprecated.

This commit is contained in:
Kyzentun
2014-09-15 05:09:27 -06:00
parent b8d5bce272
commit c45b5f053a
5 changed files with 15 additions and 5 deletions
+1 -1
View File
@@ -2,4 +2,4 @@
Scoring={} Scoring={}
setmetatable(Scoring,{__index=function() return function() Warn("Lua scoring unimplemented") end end}) setmetatable(Scoring,{__index=function() return function() lua.ReportScriptError("Lua scoring unimplemented") end end})
+1 -1
View File
@@ -408,7 +408,7 @@ DrawOrder = {
-- deprecated aliases: -- deprecated aliases:
function Actor:hidden(bHide) function Actor:hidden(bHide)
Warn("hidden is deprecated, use visible instead. (used on ".. self:GetName() ..")") lua.ReportScriptError("hidden is deprecated, use visible instead. (used on ".. self:GetName() ..")")
self:visible(not bHide) self:visible(not bHide)
end end
+11 -3
View File
@@ -26,6 +26,14 @@ function SelectMusicOrCourse()
end end
end end
function GameOverOrContinue()
if THEME:GetMetric("ScreenContinue", "ContinueEnabled") then
return "ScreenContinue"
else
return "ScreenGameOver"
end
end
-- functions used for Routine mode -- functions used for Routine mode
function IsRoutine() function IsRoutine()
return GAMESTATE:GetCurrentStyle() and GAMESTATE:GetCurrentStyle():GetStyleType() == "StyleType_TwoPlayersSharedSides" return GAMESTATE:GetCurrentStyle() and GAMESTATE:GetCurrentStyle():GetStyleType() == "StyleType_TwoPlayersSharedSides"
@@ -126,12 +134,12 @@ Branch = {
if GAMESTATE:IsEventMode() then if GAMESTATE:IsEventMode() then
return SelectMusicOrCourse() return SelectMusicOrCourse()
elseif STATSMAN:GetCurStageStats():AllFailed() then elseif STATSMAN:GetCurStageStats():AllFailed() then
return "ScreenContinue" return GameOverOrContinue()
elseif GAMESTATE:GetSmallestNumStagesLeftForAnyHumanPlayer() == 0 then elseif GAMESTATE:GetSmallestNumStagesLeftForAnyHumanPlayer() == 0 then
if not GAMESTATE:IsCourseMode() then if not GAMESTATE:IsCourseMode() then
return "ScreenEvaluationSummary" return "ScreenEvaluationSummary"
else else
return "ScreenContinue" return GameOverOrContinue()
end end
else else
return SelectMusicOrCourse() return SelectMusicOrCourse()
@@ -242,7 +250,7 @@ Branch = {
return IsNetConnected() and "ScreenTitleMenu" or "ScreenTitleMenu" return IsNetConnected() and "ScreenTitleMenu" or "ScreenTitleMenu"
end, end,
AfterSaveSummary = function() AfterSaveSummary = function()
return "ScreenContinue" return GameOverOrContinue()
-- [[ Enable when Finished ]] -- [[ Enable when Finished ]]
-- return GAMESTATE:AnyPlayerHasRankingFeats() and "ScreenNameEntryTraditional" or "ScreenGameOver" -- return GAMESTATE:AnyPlayerHasRankingFeats() and "ScreenNameEntryTraditional" or "ScreenGameOver"
end, end,
+1
View File
@@ -3736,6 +3736,7 @@ Class="ScreenContinue"
Fallback="ScreenWithMenuElements" Fallback="ScreenWithMenuElements"
NextScreen=Branch.AfterContinue() NextScreen=Branch.AfterContinue()
PrevScreen=Branch.AfterContinue() PrevScreen=Branch.AfterContinue()
ContinueEnabled=false
PrepareScreens="" PrepareScreens=""
HelpText="100" HelpText="100"
TimerSeconds=15 TimerSeconds=15
+1
View File
@@ -2043,6 +2043,7 @@ SmallBanner6OffCommand=
[ScreenContinue] [ScreenContinue]
ShowHeader=false ShowHeader=false
ShowFooter=false ShowFooter=false
ContinueEnabled=true
# #
TimerSeconds=20 TimerSeconds=20
TimerMetricsGroup="MenuTimerContinue" TimerMetricsGroup="MenuTimerContinue"