From cad313a7434fc6bd2dd3f322be716eb02eebf5f7 Mon Sep 17 00:00:00 2001 From: Barinade Date: Wed, 1 Dec 2021 19:58:02 -0600 Subject: [PATCH] fix wife2 showing up for scores that are converted temporarily to wife3 --- .../ScreenEvaluation decorations/mainDisplay.lua | 6 ++++-- .../ScreenSelectMusic decorations/generalPages/scores.lua | 3 +++ .../BGAnimations/ScreenEvaluation decorations/default.lua | 7 ++++--- Themes/Til Death/BGAnimations/superscoreboard.lua | 6 +++++- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/Themes/Rebirth/BGAnimations/ScreenEvaluation decorations/mainDisplay.lua b/Themes/Rebirth/BGAnimations/ScreenEvaluation decorations/mainDisplay.lua index 0a1a155839..d77e4e5795 100644 --- a/Themes/Rebirth/BGAnimations/ScreenEvaluation decorations/mainDisplay.lua +++ b/Themes/Rebirth/BGAnimations/ScreenEvaluation decorations/mainDisplay.lua @@ -814,14 +814,16 @@ local function wifePercentDisplay() SetCommand = function(self, params) if params.score ~= nil then local ver = params.score:GetWifeVers() - local ws = "W"..ver.." J" - ws = ws .. (judgeSetting ~= 9 and judgeSetting or "ustice") local percent = params.score:GetWifeScore() * 100 decimals = 2 if params.judgeSetting ~= nil then local rescoreTable = gatherRescoreTableFromScore(params.score) percent = getRescoredWife3Judge(3, params.judgeSetting, rescoreTable) + ver = 3 end + -- wife version string + local ws = "W"..ver.." J" + ws = ws .. (judgeSetting ~= 9 and judgeSetting or "ustice") -- scores over 99% should show more decimals if percent > 99 or isOver(self) then decimals = 4 diff --git a/Themes/Rebirth/BGAnimations/ScreenSelectMusic decorations/generalPages/scores.lua b/Themes/Rebirth/BGAnimations/ScreenSelectMusic decorations/generalPages/scores.lua index f46889e5ef..74c8f1c620 100644 --- a/Themes/Rebirth/BGAnimations/ScreenSelectMusic decorations/generalPages/scores.lua +++ b/Themes/Rebirth/BGAnimations/ScreenSelectMusic decorations/generalPages/scores.lua @@ -637,6 +637,9 @@ local function createList() local ws = score:GetWifeScore() local wifeStr = checkWifeStr(ws) local grade = GetGradeFromPercent(score:GetWifeScore()) + if score:GetWifeVers() ~= 3 then + wifeStr = wifeStr .. " W2" + end txt:settext(wifeStr) txt:diffuse(colorByGrade(grade)) bg:zoomto(txt:GetZoomedWidth(), txt:GetZoomedHeight() * textButtonHeightFudgeScalarMultiplier) diff --git a/Themes/Til Death/BGAnimations/ScreenEvaluation decorations/default.lua b/Themes/Til Death/BGAnimations/ScreenEvaluation decorations/default.lua index e967d1014b..6bbab03797 100644 --- a/Themes/Til Death/BGAnimations/ScreenEvaluation decorations/default.lua +++ b/Themes/Til Death/BGAnimations/ScreenEvaluation decorations/default.lua @@ -396,10 +396,11 @@ local function scoreBoard(pn, position) end, SetCommand = function(self) local wv = score:GetWifeVers() - local ws = "Wife" .. wv .. " J" local js = judge ~= 9 and judge or "ustice" local rescoretable = getRescoreElements(score) local rescorepercent = getRescoredWife3Judge(3, judge, rescoretable) + wv = 3 -- this should really only be applicable if we can convert the score + local ws = "Wife" .. wv .. " J" self:diffuse(getGradeColor(score:GetWifeGrade())) self:settextf( "%05.2f%% (%s)", @@ -412,7 +413,6 @@ local function scoreBoard(pn, position) CodeMessageCommand = function(self, params) local rescoretable = getRescoreElements(score) local rescorepercent = 0 - local wv = score:GetWifeVers() local ws = "Wife3" .. " J" if params.Name == "PrevJudge" and judge > 4 then judge = judge - 1 @@ -450,10 +450,11 @@ local function scoreBoard(pn, position) end, SetCommand = function(self) local wv = score:GetWifeVers() - local ws = "Wife" .. wv .. " J" local js = judge ~= 9 and judge or "ustice" local rescoretable = getRescoreElements(score) local rescorepercent = getRescoredWife3Judge(3, judge, rescoretable) + wv = 3 -- this should really only be applicable if we can convert the score + local ws = "Wife" .. wv .. " J" self:diffuse(getGradeColor(score:GetWifeGrade())) self:settextf( "%05.5f%% (%s)", diff --git a/Themes/Til Death/BGAnimations/superscoreboard.lua b/Themes/Til Death/BGAnimations/superscoreboard.lua index f4e6b5cb0d..bd8591eb70 100644 --- a/Themes/Til Death/BGAnimations/superscoreboard.lua +++ b/Themes/Til Death/BGAnimations/superscoreboard.lua @@ -641,7 +641,11 @@ local function makeScoreDisplay(i) end end, DisplayCommand = function(self) - self:settextf("%05.2f%%", notShit.floor(hs:GetWifeScore() * 100, 2)):diffuse(byGrade(hs:GetWifeGrade())) + local append = "" + if hs:GetWifeVers() ~= 3 then + append = " W2" + end + self:settextf("%05.2f%%" .. append, notShit.floor(hs:GetWifeScore() * 100, 2)):diffuse(byGrade(hs:GetWifeGrade())) end }, LoadFont("Common normal") .. {