From e6d3881e8a5da7058755229fa4f33ca8837c2937 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Sun, 10 Apr 2011 22:44:23 -0400 Subject: [PATCH] [sm130score] Possibly bad commit, but need a record. This commit will be reverted if required. --- Themes/_fallback/Scripts/03 ThemePrefs.lua | 36 ++++++++++++++++++++++ Themes/_fallback/metrics.ini | 3 +- Themes/default/metrics.ini | 5 ++- 3 files changed, 40 insertions(+), 4 deletions(-) diff --git a/Themes/_fallback/Scripts/03 ThemePrefs.lua b/Themes/_fallback/Scripts/03 ThemePrefs.lua index 0a61da5741..7cbeb7c788 100644 --- a/Themes/_fallback/Scripts/03 ThemePrefs.lua +++ b/Themes/_fallback/Scripts/03 ThemePrefs.lua @@ -139,3 +139,39 @@ ThemePrefs = -- global aliases GetThemePref = ThemePrefs.Get SetThemePref = ThemePrefs.Set + + +-- bring in SpecialScoring from default. + +function InitUserPrefs() + if GetUserPref("UserPrefSpecialScoringMode") == nil then + SetUserPref("UserPrefSpecialScoringMode", 'DDR Extreme'); +end; + +function UserPrefSpecialScoringMode() + local baseChoices = { 'DDR 1stMIX', 'DDR 4thMIX', 'DDR Extreme', 'DDR SuperNOVA', 'DDR SuperNOVA 2', 'MIGS' }; --'[SSC] Radar Master' + local t = { + Name = "UserPrefSpecialScoringMode"; + LayoutType = "ShowAllInRow"; + SelectType = "SelectOne"; + OneChoiceForAllPlayers = true; + ExportOnChange = false; + Choices = baseChoices; + LoadSelections = function(self, list, pn) + if ReadPrefFromFile("UserPrefSpecialScoringMode") ~= nil then + local theValue = ReadPrefFromFile("UserPrefSpecialScoringMode"); + local success = false; + for k,v in ipairs(baseChoices) do if v == theValue then list[k] = true success = true break end end; + if success == false then list[1] = true end; + else + WritePrefToFile("UserPrefSpecialScoringMode", 'DDR Extreme'); + list[1] = true; + end; + end; + SaveSelections = function(self, list, pn) + for k,v in ipairs(list) do if v then WritePrefToFile("UserPrefSpecialScoringMode", baseChoices[k]) break end end; + end; + }; + setmetatable( t, t ); + return t; +end \ No newline at end of file diff --git a/Themes/_fallback/metrics.ini b/Themes/_fallback/metrics.ini index 7aefd14793..a891b6f3f1 100644 --- a/Themes/_fallback/metrics.ini +++ b/Themes/_fallback/metrics.ini @@ -2671,8 +2671,9 @@ Line20="conf,VisualDelaySeconds" Fallback="ScreenOptionsServiceChild" NextScreen="ScreenOptionsExtended" PrevScreen="ScreenOptionsExtended" -LineNames="3,4,8,11,13,14,15,16,28,29,30" +LineNames="Score,3,4,8,11,13,14,15,16,28,29,30" #Line2="conf,ScoringType" +LineScore="lua,UserPrefSpecialScoringMode()" Line3="conf,TimingWindowScale" Line4="conf,LifeDifficulty" Line8="lua,GamePrefDefaultFail()" diff --git a/Themes/default/metrics.ini b/Themes/default/metrics.ini index 50f1d433ec..36fb28f584 100644 --- a/Themes/default/metrics.ini +++ b/Themes/default/metrics.ini @@ -1230,7 +1230,7 @@ LineFlashyCombo="lua,UserPrefFlashyCombo()" [ScreenOptionsGraphicsSound] [ScreenOptionsAdvanced] -LineNames="3,4,8,11,13,14,15,16,28,29,30,RollCombo" +LineNames="Score,3,4,8,11,13,14,15,16,28,29,30,RollCombo" LineRollCombo="lua,UserPrefComboOnRolls()" [ScreenAppearanceOptions] @@ -1245,10 +1245,9 @@ LineRollCombo="lua,UserPrefComboOnRolls()" Fallback="ScreenOptionsServiceChild" NextScreen="ScreenOptionsExtended" PrevScreen="ScreenOptionsExtended" -LineNames="gNotePos,gAuto,gScore,gSScore,gSDisp,gOpts,gLongFail,gComboUnderField,FlashyCombo,GameplayFooter" +LineNames="gNotePos,gAuto,gScore,gSDisp,gOpts,gLongFail,gComboUnderField,FlashyCombo,GameplayFooter" LinegNotePos="lua,UserPrefNotePosition()" LinegScore="lua,UserPrefGameplayShowScore()" -LinegSScore="lua,UserPrefSpecialScoringMode()" LinegSDisp="lua,UserPrefGameplayShowStepsDisplay()" LinegOpts="lua,UserPrefShowLotsaOptions()" LinegAuto="lua,UserPrefAutoSetStyle()"