Stage mods.
This commit is contained in:
@@ -1,31 +1,34 @@
|
|||||||
function SetupStageMods()
|
function AreStageModsForced()
|
||||||
if GAMESTATE:IsAnExtraStage() then
|
if GAMESTATE:IsAnExtraStage() then return true end
|
||||||
if GAMESTATE:GetPreferredSongGroup() == "---Group All---" and
|
return false
|
||||||
not PREFSMAN:GetPreference("PickExtraStage") then
|
end
|
||||||
local song = GAMESTATE:GetCurrentSong()
|
|
||||||
GAMESTATE:SetPreferredSongGroup( song:GetGroupName() )
|
|
||||||
end
|
|
||||||
|
|
||||||
local bExtra2 = GAMESTATE:IsExtraStage2()
|
function ScreenSelectMusic:setupstagemods()
|
||||||
local style = GAMESTATE:GetCurrentStyle()
|
if not GAMESTATE:IsAnExtraStage() then return end
|
||||||
local song, steps, po, so = SONGMAN:GetExtraStageInfo( bExtra2, style )
|
if GAMESTATE:GetPreferredSongGroup() == "---Group All---" and
|
||||||
local difficulty = steps:GetDifficulty()
|
not PREFSMAN:GetPreference("PickExtraStage") then
|
||||||
|
local song = GAMESTATE:GetCurrentSong()
|
||||||
GAMESTATE:SetCurrentSong( song )
|
GAMESTATE:SetPreferredSongGroup( song:GetGroupName() )
|
||||||
GAMESTATE:SetPreferredSong( song )
|
|
||||||
|
|
||||||
local fun = function( dummy, pn )
|
|
||||||
GAMESTATE:SetCurrentSteps( pn, steps )
|
|
||||||
GAMESTATE:GetPlayerState(pn):SetPlayerOptions( ModsLevel_Stage, po )
|
|
||||||
GAMESTATE:SetPreferredDifficulty( pn, difficulty )
|
|
||||||
MESSAGEMAN:Broadcast( "PlayerOptionsChangedP" .. (pn+1) )
|
|
||||||
end
|
|
||||||
|
|
||||||
table.foreach( GAMESTATE:GetHumanPlayers(), fun )
|
|
||||||
GAMESTATE:SetSongOptions( ModsLevel_Stage, so )
|
|
||||||
MESSAGEMAN:Broadcast( "SongOptionsChanged" )
|
|
||||||
return
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local bExtra2 = GAMESTATE:IsExtraStage2()
|
||||||
|
local style = GAMESTATE:GetCurrentStyle()
|
||||||
|
local song, steps, po, so = SONGMAN:GetExtraStageInfo( bExtra2, style )
|
||||||
|
local difficulty = steps:GetDifficulty()
|
||||||
|
|
||||||
|
GAMESTATE:SetCurrentSong( song )
|
||||||
|
GAMESTATE:SetPreferredSong( song )
|
||||||
|
|
||||||
|
local fun = function( dummy, pn )
|
||||||
|
GAMESTATE:SetCurrentSteps( pn, steps )
|
||||||
|
GAMESTATE:GetPlayerState(pn):SetPlayerOptions( ModsLevel_Stage, po )
|
||||||
|
GAMESTATE:SetPreferredDifficulty( pn, difficulty )
|
||||||
|
MESSAGEMAN:Broadcast( "PlayerOptionsChangedP" .. (pn+1) )
|
||||||
|
end
|
||||||
|
|
||||||
|
table.foreach( GAMESTATE:GetHumanPlayers(), fun )
|
||||||
|
GAMESTATE:SetSongOptions( ModsLevel_Stage, so )
|
||||||
|
MESSAGEMAN:Broadcast( "SongOptionsChanged" )
|
||||||
end
|
end
|
||||||
--
|
--
|
||||||
-- (c) 2006 Steve Checkoway
|
-- (c) 2006 Steve Checkoway
|
||||||
|
|||||||
@@ -516,6 +516,7 @@ Codes=
|
|||||||
OptionsMenuAvailable=OptionsMenuAvailable()
|
OptionsMenuAvailable=OptionsMenuAvailable()
|
||||||
SelectMenuAvailable=false
|
SelectMenuAvailable=false
|
||||||
ModeMenuAvailable=ModeMenuAvailable()
|
ModeMenuAvailable=ModeMenuAvailable()
|
||||||
|
ScreenBeginCommand=setupstagemods
|
||||||
|
|
||||||
[ScreenSelectCourse]
|
[ScreenSelectCourse]
|
||||||
Class=ScreenSelectMusic
|
Class=ScreenSelectMusic
|
||||||
@@ -4387,6 +4388,7 @@ Answer3Of3OffCommand=
|
|||||||
UseNameBlacklist=0
|
UseNameBlacklist=0
|
||||||
DefaultSort=Group
|
DefaultSort=Group
|
||||||
DefaultSong=
|
DefaultSong=
|
||||||
|
AreStageModsForced=AreStageModsForced
|
||||||
|
|
||||||
[ScreenMiniMenuContext]
|
[ScreenMiniMenuContext]
|
||||||
Fallback=ScreenMiniMenu
|
Fallback=ScreenMiniMenu
|
||||||
|
|||||||
Reference in New Issue
Block a user