[sm130score] lua scoring is no longer "special".

It's primarily "it".
This commit is contained in:
Jason Felds
2011-04-11 22:58:23 -04:00
parent d274a83a41
commit 0689d897ea
7 changed files with 18 additions and 47 deletions
@@ -2,7 +2,7 @@ local t = Def.ActorFrame {};
t[#t+1] = Def.Actor{
JudgmentMessageCommand = function(self, params)
SpecialScoring[GetUserPref("UserPrefSpecialScoringMode")](params,
Scoring[GetUserPref("UserPrefScoringMode")](params,
STATSMAN:GetCurStageStats():GetPlayerStageStats(params.Player))
end;
};
+2 -2
View File
@@ -479,7 +479,7 @@ Shuffle=Shuffle the songs around.
#
GamePrefDefaultFail=Immediate fail causes a player to die when their life bar reaches 0. ImmediateContinue allows you to continue playing afterwards.
#
UserPrefSpecialScoringMode=Select the scoring mode to be used when not in a course.
UserPrefScoringMode=Select the scoring mode to be used when not in a course.
[OptionNames]
0=0
@@ -1053,7 +1053,7 @@ Shuffle=Shuffle
#
GamePrefDefaultFail=Default Fail Type
#
UserPrefSpecialScoringMode=Scoring Mode
UserPrefScoringMode=Scoring Mode
[PaneDisplay]
Steps=Steps
Holds=Holds
+8 -8
View File
@@ -144,33 +144,33 @@ SetThemePref = ThemePrefs.Set
-- bring in SpecialScoring from default.
function InitUserPrefs()
if GetUserPref("UserPrefSpecialScoringMode") == nil then
SetUserPref("UserPrefSpecialScoringMode", 'DDR Extreme');
if GetUserPref("UserPrefScoringMode") == nil then
SetUserPref("UserPrefScoringMode", 'DDR Extreme');
end;
end;
function UserPrefSpecialScoringMode()
function UserPrefScoringMode()
local baseChoices = { 'DDR 1stMIX', 'DDR 4thMIX', 'DDR Extreme', 'DDR SuperNOVA', 'DDR SuperNOVA 2', 'MIGS' }; --'[SSC] Radar Master'
local t = {
Name = "UserPrefSpecialScoringMode";
Name = "UserPrefScoringMode";
LayoutType = "ShowAllInRow";
SelectType = "SelectOne";
OneChoiceForAllPlayers = true;
ExportOnChange = false;
Choices = baseChoices;
LoadSelections = function(self, list, pn)
if ReadPrefFromFile("UserPrefSpecialScoringMode") ~= nil then
local theValue = ReadPrefFromFile("UserPrefSpecialScoringMode");
if ReadPrefFromFile("UserPrefScoringMode") ~= nil then
local theValue = ReadPrefFromFile("UserPrefScoringMode");
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');
WritePrefToFile("UserPrefScoringMode", '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;
for k,v in ipairs(list) do if v then WritePrefToFile("UserPrefScoringMode", baseChoices[k]) break end end;
end;
};
setmetatable( t, t );
@@ -10,8 +10,7 @@ local ZeroIfNotFound = { __index = function() return 0 end; };
function GetTotalItems(radars)
return radars:GetValue('RadarCategory_TapsAndHolds')
+ radars:GetValue('RadarCategory_Holds')
+ radars:GetValue('RadarCategory_Rolls')
+ radars:GetValue('RadarCategory_Lifts');
+ radars:GetValue('RadarCategory_Rolls');
end;
-- Determine whether marvelous timing is to be considered.
@@ -176,8 +175,8 @@ r['MIGS'] = function(params,pss)
end;
-- Formulas end here.
SpecialScoring = {};
setmetatable(SpecialScoring, {
Scoring = {};
setmetatable(Scoring, {
__metatable = { "Letting you change the metatable sort of defeats the purpose." };
__index = function(tbl, key)
for v in ivalues(DisabledScoringModes) do
+1 -1
View File
@@ -2673,7 +2673,7 @@ NextScreen="ScreenOptionsExtended"
PrevScreen="ScreenOptionsExtended"
LineNames="Score,3,4,8,11,13,14,15,16,28,29,30"
#Line2="conf,ScoringType"
LineScore="lua,UserPrefSpecialScoringMode()"
LineScore="lua,UserPrefScoringMode()"
Line3="conf,TimingWindowScale"
Line4="conf,LifeDifficulty"
Line8="lua,GamePrefDefaultFail()"
@@ -171,7 +171,7 @@ t[#t+1] = Def.ActorFrame {
t[#t+1] = Def.Actor{
JudgmentMessageCommand = function(self, params)
SpecialScoring[GetUserPref("UserPrefSpecialScoringMode")](params,
Scoring[GetUserPref("UserPrefScoringMode")](params,
STATSMAN:GetCurStageStats():GetPlayerStageStats(params.Player))
end;
};
+2 -30
View File
@@ -21,8 +21,8 @@ function InitUserPrefs()
if GetUserPref("UserPrefGameplayShowScore") == nil then
SetUserPref("UserPrefGameplayShowScore", false);
end;
if GetUserPref("UserPrefSpecialScoringMode") == nil then
SetUserPref("UserPrefSpecialScoringMode", 'DDR Extreme');
if GetUserPref("UserPrefScoringMode") == nil then
SetUserPref("UserPrefScoringMode", 'DDR Extreme');
end;
if GetUserPrefB("UserPrefShowLotsaOptions") == nil then
SetUserPref("UserPrefShowLotsaOptions", true);
@@ -230,34 +230,6 @@ function UserPrefShowLotsaOptions()
return t;
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
function GetDefaultOptionLines()
local LineSets = {
"1,8,14,2,3,4,5,6,R,7,9,10,11,12,13,15,16,17,18", -- All