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={}
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:
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)
end
+11 -3
View File
@@ -26,6 +26,14 @@ function SelectMusicOrCourse()
end
end
function GameOverOrContinue()
if THEME:GetMetric("ScreenContinue", "ContinueEnabled") then
return "ScreenContinue"
else
return "ScreenGameOver"
end
end
-- functions used for Routine mode
function IsRoutine()
return GAMESTATE:GetCurrentStyle() and GAMESTATE:GetCurrentStyle():GetStyleType() == "StyleType_TwoPlayersSharedSides"
@@ -126,12 +134,12 @@ Branch = {
if GAMESTATE:IsEventMode() then
return SelectMusicOrCourse()
elseif STATSMAN:GetCurStageStats():AllFailed() then
return "ScreenContinue"
return GameOverOrContinue()
elseif GAMESTATE:GetSmallestNumStagesLeftForAnyHumanPlayer() == 0 then
if not GAMESTATE:IsCourseMode() then
return "ScreenEvaluationSummary"
else
return "ScreenContinue"
return GameOverOrContinue()
end
else
return SelectMusicOrCourse()
@@ -242,7 +250,7 @@ Branch = {
return IsNetConnected() and "ScreenTitleMenu" or "ScreenTitleMenu"
end,
AfterSaveSummary = function()
return "ScreenContinue"
return GameOverOrContinue()
-- [[ Enable when Finished ]]
-- return GAMESTATE:AnyPlayerHasRankingFeats() and "ScreenNameEntryTraditional" or "ScreenGameOver"
end,
+1
View File
@@ -3736,6 +3736,7 @@ Class="ScreenContinue"
Fallback="ScreenWithMenuElements"
NextScreen=Branch.AfterContinue()
PrevScreen=Branch.AfterContinue()
ContinueEnabled=false
PrepareScreens=""
HelpText="100"
TimerSeconds=15
+1
View File
@@ -2043,6 +2043,7 @@ SmallBanner6OffCommand=
[ScreenContinue]
ShowHeader=false
ShowFooter=false
ContinueEnabled=true
#
TimerSeconds=20
TimerMetricsGroup="MenuTimerContinue"