diff --git a/Themes/_fallback/Scripts/02 Actor.lua b/Themes/_fallback/Scripts/02 Actor.lua index 52fc579c7a..b0a8b7659c 100644 --- a/Themes/_fallback/Scripts/02 Actor.lua +++ b/Themes/_fallback/Scripts/02 Actor.lua @@ -197,6 +197,24 @@ function Actor:bezier(...) self:tween(a[2], "TweenMode_Bezier", b) end +-- formerly in 02 HelpDisplay.lua, although nothing uses it: +function HelpDisplay:setfromsongorcourse() + local Artists = {} + local AltArtists = {} + + local Song = GAMESTATE:GetCurrentSong() + local Trail = GAMESTATE:GetCurrentTrail( GAMESTATE:GetMasterPlayerNumber() ) + if Song then + table.insert( Artists, Song:GetDisplayArtist() ) + table.insert( AltArtists, Song:GetTranslitArtist() ) + elseif Trail then + Artists, AltArtists = Trail:GetArtists() + end + + self:settips( Artists, AltArtists ) +end + + -- (c) 2006 Glenn Maynard -- All rights reserved. -- @@ -218,5 +236,4 @@ end -- OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS -- OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR --- PERFORMANCE OF THIS SOFTWARE. - +-- PERFORMANCE OF THIS SOFTWARE. \ No newline at end of file diff --git a/Themes/_fallback/Scripts/02 Enum.lua b/Themes/_fallback/Scripts/02 Enum.lua index 3c311e50cb..70297a38ca 100644 --- a/Themes/_fallback/Scripts/02 Enum.lua +++ b/Themes/_fallback/Scripts/02 Enum.lua @@ -6,10 +6,9 @@ function Enum:Compare( e1, e2 ) assert( Value1, tostring(e1) .. " is not an enum of type " .. self:GetName() ) assert( Value2, tostring(e2) .. " is not an enum of type " .. self:GetName() ) - -- Nil enums correspond to "invalid". These compare greater - -- than any valid enum value, to line up with the equivalent - -- C++ code. - + -- Nil enums correspond to "invalid". These compare greater than any valid + -- enum value, to line up with the equivalent C++ code. + -- should this be changed to math.huge()? -shake if not e1 then Value1 = 99999999 diff --git a/Themes/_fallback/Scripts/02 HelpDisplay.lua b/Themes/_fallback/Scripts/02 HelpDisplay.lua deleted file mode 100644 index 452389ba83..0000000000 --- a/Themes/_fallback/Scripts/02 HelpDisplay.lua +++ /dev/null @@ -1,39 +0,0 @@ -function HelpDisplay:setfromsongorcourse() - local Artists = {} - local AltArtists = {} - - local Song = GAMESTATE:GetCurrentSong() - local Trail = GAMESTATE:GetCurrentTrail( GAMESTATE:GetMasterPlayerNumber() ) - if Song then - table.insert( Artists, Song:GetDisplayArtist() ) - table.insert( AltArtists, Song:GetTranslitArtist() ) - elseif Trail then - Artists, AltArtists = Trail:GetArtists() - end - - self:settips( Artists, AltArtists ) -end - --- (c) 2006 Glenn Maynard --- All rights reserved. --- --- Permission is hereby granted, free of charge, to any person obtaining a --- copy of this software and associated documentation files (the --- "Software"), to deal in the Software without restriction, including --- without limitation the rights to use, copy, modify, merge, publish, --- distribute, and/or sell copies of the Software, and to permit persons to --- whom the Software is furnished to do so, provided that the above --- copyright notice(s) and this permission notice appear in all copies of --- the Software and that both the above copyright notice(s) and this --- permission notice appear in supporting documentation. --- --- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS --- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF --- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF --- THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS --- INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT --- OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS --- OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR --- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR --- PERFORMANCE OF THIS SOFTWARE. - diff --git a/Themes/_fallback/Scripts/02 OptionsMenu.lua b/Themes/_fallback/Scripts/02 OptionsMenu.lua index 8e6384fc42..3f1b6adf44 100644 --- a/Themes/_fallback/Scripts/02 OptionsMenu.lua +++ b/Themes/_fallback/Scripts/02 OptionsMenu.lua @@ -62,6 +62,7 @@ OptionRowTable = end } +-- ScreenJukeboxMenu RandomOptions item function OptionsRandomJukebox() local function AllChoices() Trace('all choices') diff --git a/Themes/_fallback/Scripts/02 Other.lua b/Themes/_fallback/Scripts/02 Other.lua index da02a7f26e..1c3e71dbc3 100644 --- a/Themes/_fallback/Scripts/02 Other.lua +++ b/Themes/_fallback/Scripts/02 Other.lua @@ -1,6 +1,7 @@ local g_metrics_group = nil; local g_element = nil; +-- legacy: SSC = (ProductID() == "sm-ssc"); function LoadFallbackB() @@ -93,7 +94,7 @@ end function GetCoursesToShowRanking() local CoursesToShowRanking = PREFSMAN:GetPreference("CoursesToShowRanking") if CoursesToShowRanking ~= "" then return CoursesToShowRanking end - return "Courses/Default/MostPlayed_01-04.crs,Courses/Default/MostPlayed_05-08.crs,Courses/Default/MostPlayed_09-12.crs" + return "Courses/Default/MostPlayed_01-04.crs,Courses/Default/ChallengingRandom5.crs,Courses/Default/Jupiter.crs" end -- Get a metric from the currently-loading screen. This is only valid while loading @@ -118,13 +119,13 @@ function TextBannerAfterSet(self,param) Title:maxwidth(208) Title:y(0) Title:zoom(1) - + Subtitle:visible(false) else Title:zoom(1) Title:y(-6) Title:zoom(0.9) - + -- subtitle below title Subtitle:visible(true) Subtitle:zoom(0.6) @@ -154,4 +155,3 @@ end -- OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -- PERFORMANCE OF THIS SOFTWARE. - diff --git a/Themes/_fallback/Scripts/02 Serialize.lua b/Themes/_fallback/Scripts/02 Serialize.lua index 7e52170fd7..f432d4bea2 100644 --- a/Themes/_fallback/Scripts/02 Serialize.lua +++ b/Themes/_fallback/Scripts/02 Serialize.lua @@ -4,9 +4,9 @@ function Serialize(t) local queue = { } local already_queued = { } - -- Convert a value to an identifier. If we encounter a table that we've never seen before, - -- it's an anonymous table and we'll create a name for it; for example, in t = { [ {10} ] = 1 }, - -- "{10}" has no name. + -- Convert a value to an identifier. If we encounter a table that we've + -- never seen before, it's an anonymous table and we'll create a name for it; + -- for example, in t = { [ {10} ] = 1 }, "{10}" has no name. local next_id = 1 local function convert_to_identifier( v, name ) -- print("convert_to_identifier: " .. (name or "nil")) @@ -24,7 +24,7 @@ function Serialize(t) return already_queued[v] end - -- Create the table. If we have no name, give it one; be sure to make it local. + -- Create the table. If we have no name, give it one; be sure to make it local. if not name then name = "tab" .. next_id next_id = next_id + 1 diff --git a/Themes/_fallback/Scripts/02 Sound.lua b/Themes/_fallback/Scripts/02 Sound.lua index a67faa5bf3..358f734266 100644 --- a/Themes/_fallback/Scripts/02 Sound.lua +++ b/Themes/_fallback/Scripts/02 Sound.lua @@ -1,4 +1,5 @@ -- Can this be moved into some other file? Feels like clutter. -shake + -- Play the sound on the given player's side. Must set SupportPan = true -- on load. function ActorSound:playforplayer(pn) diff --git a/Themes/_fallback/Scripts/02 StageMods.lua b/Themes/_fallback/Scripts/02 StageMods.lua index 15b1132b22..2dcedadaac 100644 --- a/Themes/_fallback/Scripts/02 StageMods.lua +++ b/Themes/_fallback/Scripts/02 StageMods.lua @@ -1,21 +1,18 @@ function AreStagePlayerModsForced() - local bExtraStage = GAMESTATE:IsAnExtraStage() - local bOni = GAMESTATE:GetPlayMode() == "PlayMode_Oni" - return bExtraStage or bOni + return GAMESTATE:IsAnExtraStage() or (GAMESTATE:GetPlayMode() == "PlayMode_Oni") end function AreStageSongModsForced() - local bExtraStage = GAMESTATE:IsAnExtraStage() local pm = GAMESTATE:GetPlayMode() local bOni = pm == "PlayMode_Oni" local bBattle = pm == "PlayMode_Battle" local bRave = pm == "PlayMode_Rave" - return bExtraStage or bOni or bBattle or bRave + return GAMESTATE:IsAnExtraStage() or bOni or bBattle or bRave end function SetFail() local sFail = "" - + if GetGamePref("DefaultFail") then sFail = string.format("Fail%s", GetGamePref("DefaultFail")) else @@ -23,11 +20,11 @@ function SetFail() end sFail = tostring(sFail) - + for pn in ivalues(GAMESTATE:GetHumanPlayers()) do MESSAGEMAN:Broadcast( "PlayerOptionsChanged", {PlayerNumber = pn} ) end - + GAMESTATE:ApplyGameCommand( "mod," .. sFail) MESSAGEMAN:Broadcast( "SongOptionsChanged" ) end @@ -35,12 +32,12 @@ end function ScreenSelectMusic:setupmusicstagemods() Trace( "setupmusicstagemods" ) local pm = GAMESTATE:GetPlayMode() - + if pm == "PlayMode_Battle" or pm == "PlayMode_Rave" then local so = GAMESTATE:GetDefaultSongOptions() GAMESTATE:SetSongOptions( "ModsLevel_Stage", so ) MESSAGEMAN:Broadcast( "SongOptionsChanged" ) - elseif GAMESTATE:IsAnExtraStage() then + elseif GAMESTATE:IsAnExtraStage() then if GAMESTATE:GetPreferredSongGroup() == "---Group All---" then local song = GAMESTATE:GetCurrentSong() GAMESTATE:SetPreferredSongGroup( song:GetGroupName() ) @@ -57,7 +54,7 @@ function ScreenSelectMusic:setupmusicstagemods() po = THEME:GetMetric("SongManager","ExtraStagePlayerModifiers") so = THEME:GetMetric("SongManager","ExtraStageStageModifiers") end - + local difficulty = steps:GetDifficulty() local Reverse = PlayerNumber:Reverse() @@ -96,7 +93,6 @@ function ScreenSelectMusic:setupcoursestagemods() end end --- -- (c) 2006-2007 Steve Checkoway -- All rights reserved. --