From 825886729c7d120cbfeb860b44ccdb9ee550e669 Mon Sep 17 00:00:00 2001 From: Flameshadowxeroshin Date: Fri, 28 Dec 2012 12:02:12 -0600 Subject: [PATCH] reimplement beta 1's scoring mode in Lua --- .../ScreenGameplay decorations/default.lua | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Themes/default/BGAnimations/ScreenGameplay decorations/default.lua b/Themes/default/BGAnimations/ScreenGameplay decorations/default.lua index a8664db8b2..9edbc6fbe9 100644 --- a/Themes/default/BGAnimations/ScreenGameplay decorations/default.lua +++ b/Themes/default/BGAnimations/ScreenGameplay decorations/default.lua @@ -235,4 +235,28 @@ t[#t+1] = StandardDecorationFromFileOptional("BPMDisplay","BPMDisplay"); t[#t+1] = StandardDecorationFromFileOptional("StageDisplay","StageDisplay"); t[#t+1] = StandardDecorationFromFileOptional("SongTitle","SongTitle"); +do + local pointLookup={ + ['TapNoteScore_W1']=5, + ['TapNoteScore_W2']=4, + ['TapNoteScore_W3']=3, + ['TapNoteScore_W4']=2, + ['TapNoteScore_W5']=1, + ['TapNoteScore_HitMine']=-1} + local ignorableTapNoteScores = { + ['TapNoteScore_HitMine']=true, + ['TapNoteScore_AvoidMine']=true, + ['TapNoteScore_CheckpointHit']=true, + ['TapNoteScore_CheckpointMiss']=true + } + setmetatable(pointLookup,{__index=0}) + t[#t+1] = {Class="Actor", + JudgmentMessageCommand=function(self,params) + local PSS = STATSMAN:GetCurStageStats():GetPlayerStageStats(params.Player) + local holdNoteInfo = params.HoldNoteScore == nil and nil or params.HoldNoteScore == 'HoldNoteScore_Held' and true or false + PSS:SetScore(PSS:GetScore()+pointLookup[params.TapNoteScore]+(holdNoteInfo and 5 or 0)) + PSS:SetCurMaxScore(PSS:GetCurMaxScore()+(holdNoteInfo~=nil and 5 or 0)+(ignorableTapNoteScores[params.TapNoteScore] and 0 or 5)) + end + } +end return t