diff --git a/stepmania/Themes/default/Scripts/Branches.lua b/stepmania/Themes/default/Scripts/Branches.lua index f8038cabcc..246cb67d18 100644 --- a/stepmania/Themes/default/Scripts/Branches.lua +++ b/stepmania/Themes/default/Scripts/Branches.lua @@ -98,6 +98,11 @@ function GetGameplayNextScreen() return "ScreenGameOver" end +function OptionsMenuAvailable() + if GAMESTATE:IsExtraStage() or GAMESTATE:IsExtraStage2() then return "0" end + return "1" +end + -- (c) 2005 Glenn Maynard, Chris Danford -- All rights reserved. -- diff --git a/stepmania/Themes/default/metrics.ini b/stepmania/Themes/default/metrics.ini index 6258031bc5..3b21a6ddcd 100644 --- a/stepmania/Themes/default/metrics.ini +++ b/stepmania/Themes/default/metrics.ini @@ -675,7 +675,7 @@ NextOptionsScreen=@SelectFirstOptionsScreen() DoRouletteOnMenuTimer=1 AlignMusicBeat=0 Codes= -OptionsMenuAvailable=@not GAMESTATE:IsExtraStage() and not GAMESTATE:IsExtraStage2() +OptionsMenuAvailable=@OptionsMenuAvailable() [ScreenSelectCourse] Class=ScreenSelectMusic diff --git a/stepmania/src/GameState.cpp b/stepmania/src/GameState.cpp index c9d9d0ae0f..7e44b6f45f 100644 --- a/stepmania/src/GameState.cpp +++ b/stepmania/src/GameState.cpp @@ -1966,8 +1966,8 @@ public: static int IsGoalComplete( T* p, lua_State *L ) { lua_pushboolean(L, p->IsGoalComplete((PlayerNumber)IArg(1)) ); return 1; } static int PlayerIsUsingModifier( T* p, lua_State *L ) { lua_pushboolean(L, p->PlayerIsUsingModifier((PlayerNumber)IArg(1),SArg(2)) ); return 1; } static int GetCourseSongIndex( T* p, lua_State *L ) { lua_pushnumber(L, p->GetCourseSongIndex() ); return 1; } - static int IsExtraStage( T* p, lua_State *L ) { lua_pushnumber(L, p->IsExtraStage() ); return 1; } - static int IsExtraStage2( T* p, lua_State *L ) { lua_pushnumber(L, p->IsExtraStage2() ); return 1; } + static int IsExtraStage( T* p, lua_State *L ) { lua_pushboolean(L, p->IsExtraStage() ); return 1; } + static int IsExtraStage2( T* p, lua_State *L ) { lua_pushboolean(L, p->IsExtraStage2() ); return 1; } static void Register(lua_State *L) {