Skip to content

Commit cad313a

Browse files
committed
fix wife2 showing up for scores that are converted temporarily to wife3
1 parent b370bd8 commit cad313a

4 files changed

Lines changed: 16 additions & 6 deletions

File tree

Themes/Rebirth/BGAnimations/ScreenEvaluation decorations/mainDisplay.lua

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -814,14 +814,16 @@ local function wifePercentDisplay()
814814
SetCommand = function(self, params)
815815
if params.score ~= nil then
816816
local ver = params.score:GetWifeVers()
817-
local ws = "W"..ver.." J"
818-
ws = ws .. (judgeSetting ~= 9 and judgeSetting or "ustice")
819817
local percent = params.score:GetWifeScore() * 100
820818
decimals = 2
821819
if params.judgeSetting ~= nil then
822820
local rescoreTable = gatherRescoreTableFromScore(params.score)
823821
percent = getRescoredWife3Judge(3, params.judgeSetting, rescoreTable)
822+
ver = 3
824823
end
824+
-- wife version string
825+
local ws = "W"..ver.." J"
826+
ws = ws .. (judgeSetting ~= 9 and judgeSetting or "ustice")
825827
-- scores over 99% should show more decimals
826828
if percent > 99 or isOver(self) then
827829
decimals = 4

Themes/Rebirth/BGAnimations/ScreenSelectMusic decorations/generalPages/scores.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,9 @@ local function createList()
637637
local ws = score:GetWifeScore()
638638
local wifeStr = checkWifeStr(ws)
639639
local grade = GetGradeFromPercent(score:GetWifeScore())
640+
if score:GetWifeVers() ~= 3 then
641+
wifeStr = wifeStr .. " W2"
642+
end
640643
txt:settext(wifeStr)
641644
txt:diffuse(colorByGrade(grade))
642645
bg:zoomto(txt:GetZoomedWidth(), txt:GetZoomedHeight() * textButtonHeightFudgeScalarMultiplier)

Themes/Til Death/BGAnimations/ScreenEvaluation decorations/default.lua

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -396,10 +396,11 @@ local function scoreBoard(pn, position)
396396
end,
397397
SetCommand = function(self)
398398
local wv = score:GetWifeVers()
399-
local ws = "Wife" .. wv .. " J"
400399
local js = judge ~= 9 and judge or "ustice"
401400
local rescoretable = getRescoreElements(score)
402401
local rescorepercent = getRescoredWife3Judge(3, judge, rescoretable)
402+
wv = 3 -- this should really only be applicable if we can convert the score
403+
local ws = "Wife" .. wv .. " J"
403404
self:diffuse(getGradeColor(score:GetWifeGrade()))
404405
self:settextf(
405406
"%05.2f%% (%s)",
@@ -412,7 +413,6 @@ local function scoreBoard(pn, position)
412413
CodeMessageCommand = function(self, params)
413414
local rescoretable = getRescoreElements(score)
414415
local rescorepercent = 0
415-
local wv = score:GetWifeVers()
416416
local ws = "Wife3" .. " J"
417417
if params.Name == "PrevJudge" and judge > 4 then
418418
judge = judge - 1
@@ -450,10 +450,11 @@ local function scoreBoard(pn, position)
450450
end,
451451
SetCommand = function(self)
452452
local wv = score:GetWifeVers()
453-
local ws = "Wife" .. wv .. " J"
454453
local js = judge ~= 9 and judge or "ustice"
455454
local rescoretable = getRescoreElements(score)
456455
local rescorepercent = getRescoredWife3Judge(3, judge, rescoretable)
456+
wv = 3 -- this should really only be applicable if we can convert the score
457+
local ws = "Wife" .. wv .. " J"
457458
self:diffuse(getGradeColor(score:GetWifeGrade()))
458459
self:settextf(
459460
"%05.5f%% (%s)",

Themes/Til Death/BGAnimations/superscoreboard.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,11 @@ local function makeScoreDisplay(i)
641641
end
642642
end,
643643
DisplayCommand = function(self)
644-
self:settextf("%05.2f%%", notShit.floor(hs:GetWifeScore() * 100, 2)):diffuse(byGrade(hs:GetWifeGrade()))
644+
local append = ""
645+
if hs:GetWifeVers() ~= 3 then
646+
append = " W2"
647+
end
648+
self:settextf("%05.2f%%" .. append, notShit.floor(hs:GetWifeScore() * 100, 2)):diffuse(byGrade(hs:GetWifeGrade()))
645649
end
646650
},
647651
LoadFont("Common normal") .. {

0 commit comments

Comments
 (0)