Skip to content

Commit

Permalink
buncha EvaluationNormal improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Ulti-FD committed Jul 7, 2021
1 parent 5e4cd60 commit 29b5bfd
Show file tree
Hide file tree
Showing 7 changed files with 71 additions and 104 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ local originaljudge = (PREFSMAN:GetPreference("SortBySSRNormPercent") and 4 or G
local aboutToForceWindowSettings = false

t[#t + 1] =
LoadFont("Common Normal") ..
LoadFont("Common Large") ..
{
InitCommand = function(self)
self:xy(SCREEN_CENTER_X, capWideScale(135, 150)):zoom(0.4):maxwidth(capWideScale(250 / 0.4, 180 / 0.4))
self:xy(SCREEN_CENTER_X, capWideScale(124, 150)):zoom(0.25):maxwidth(capWideScale(250 / 0.4, 180 / 0.4))
end,
BeginCommand = function(self)
self:queuecommand("Set")
Expand All @@ -32,10 +32,10 @@ t[#t + 1] =
}

t[#t + 1] =
LoadFont("Common Normal") ..
LoadFont("Common Large") ..
{
InitCommand = function(self)
self:xy(SCREEN_CENTER_X, capWideScale(145, 160)):zoom(0.4):maxwidth(180 / 0.4)
self:xy(SCREEN_CENTER_X, capWideScale(139, 165)):zoom(0.25):maxwidth(180 / 0.4)
end,
BeginCommand = function(self)
self:queuecommand("Set")
Expand Down Expand Up @@ -152,10 +152,10 @@ function scoreBoard(pn, position)
local judge = PREFSMAN:GetPreference("SortBySSRNormPercent") and 4 or GetTimingDifficulty()
local judge2 = judge
local score = SCOREMAN:GetMostRecentScore()
if not score then
if not score then
score = SCOREMAN:GetTempReplayScore()
end

local dvtTmp = score:GetOffsetVector()
local tvt = score:GetTapNoteTypeVector()
-- if available, filter out non taps from the deviation list
Expand Down Expand Up @@ -257,9 +257,8 @@ function scoreBoard(pn, position)
t[#t + 1] =
Def.Quad {
InitCommand = function(self)
self:xy(frameX - 5, capWideScale(frameY, frameY + 4)):zoomto(frameWidth + 10, 220):halign(0):valign(0):diffuse(
color("#333333CC")
)
self:xy(frameX - 5, frameY + 5):zoomto(frameWidth + 10, 217):halign(0):valign(0)
self:diffuse(getMainColor("tabs"))
end
}
t[#t + 1] =
Expand All @@ -279,7 +278,7 @@ function scoreBoard(pn, position)
LoadFont("Common Large") ..
{
InitCommand = function(self)
self:xy(frameX + 5, frameY + 32):zoom(0.5):halign(0):valign(0):maxwidth(200)
self:xy(frameX - 5, frameY + 32):zoom(0.5):halign(0):valign(0):maxwidth(200)
end,
BeginCommand = function(self)
self:queuecommand("Set")
Expand All @@ -296,7 +295,7 @@ function scoreBoard(pn, position)
LoadFont("Common Large") ..
{
InitCommand = function(self)
self:xy(frameWidth + frameX, frameY + 32):zoom(0.5):halign(1):valign(0):maxwidth(200)
self:xy(frameWidth + frameX - 3, frameY + 32):zoom(0.5):halign(1):valign(0):maxwidth(200)
end,
BeginCommand = function(self)
self:queuecommand("Set")
Expand All @@ -314,7 +313,7 @@ function scoreBoard(pn, position)
LoadFont("Common Large") ..
{
InitCommand = function(self)
self:xy(frameWidth + frameX, frameY + 7):zoom(0.5):halign(1):valign(0):maxwidth(200)
self:xy(frameWidth + frameX - 3, frameY + 7):zoom(0.5):halign(1):valign(0):maxwidth(200)
end,
BeginCommand = function(self)
self:queuecommand("Set")
Expand Down Expand Up @@ -367,7 +366,7 @@ function scoreBoard(pn, position)
local js = judge ~= 9 and judge or "ustice"
self:diffuse(getGradeColor(score:GetWifeGrade()))
self:settextf(
"%05.2f%% (%s)",
"%05.2f%% (%s)",
notShit.floor(score:GetWifeScore() * 100, 2), ws .. js
)
end,
Expand Down Expand Up @@ -420,7 +419,7 @@ function scoreBoard(pn, position)
local js = judge ~= 9 and judge or "ustice"
self:diffuse(getGradeColor(score:GetWifeGrade()))
self:settextf(
"%05.5f%% (%s)",
"%05.5f%% (%s)",
notShit.floor(score:GetWifeScore() * 100, 5), ws .. js
)
end,
Expand Down Expand Up @@ -452,13 +451,13 @@ function scoreBoard(pn, position)
end
end
}
}
}

t[#t + 1] =
LoadFont("Common Normal") ..
{
InitCommand = function(self)
self:xy(frameX + 5, frameY + 63):zoom(0.40):halign(0):maxwidth(frameWidth / 0.4)
self:xy(frameX + 2.4, frameY + 63):zoom(0.40):halign(0):maxwidth(frameWidth / 0.41)
end,
BeginCommand = function(self)
self:queuecommand("Set")
Expand Down Expand Up @@ -519,7 +518,7 @@ function scoreBoard(pn, position)
LoadFont("Common Large") ..
{
InitCommand = function(self)
self:xy(frameX + 10, frameY + 80 + ((k - 1) * 22)):zoom(0.25):halign(0)
self:xy(frameX + 10, frameY + 79.3 + ((k - 1) * 22)):zoom(0.25):halign(0)
end,
BeginCommand = function(self)
if aboutToForceWindowSettings then return end
Expand All @@ -541,7 +540,7 @@ function scoreBoard(pn, position)
LoadFont("Common Large") ..
{
InitCommand = function(self)
self:xy(frameX + frameWidth - 40, frameY + 80 + ((k - 1) * 22)):zoom(0.25):halign(1)
self:xy(frameX + frameWidth - 40, frameY + 79.3 + ((k - 1) * 22)):zoom(0.25):halign(1)
end,
BeginCommand = function(self)
if aboutToForceWindowSettings then return end
Expand Down Expand Up @@ -569,7 +568,7 @@ function scoreBoard(pn, position)
LoadFont("Common Normal") ..
{
InitCommand = function(self)
self:xy(frameX + frameWidth - 38, frameY + 80 + ((k - 1) * 22)):zoom(0.3):halign(0)
self:xy(frameX + frameWidth - 38, frameY + 79.7 + ((k - 1) * 22)):zoom(0.3):halign(0)
end,
BeginCommand = function(self)
if aboutToForceWindowSettings then return end
Expand All @@ -588,7 +587,7 @@ function scoreBoard(pn, position)
end,
CodeMessageCommand = function(self, params)
if params.Name == "PrevJudge" or params.Name == "NextJudge" then

local rescoredJudge = getRescoredJudge(dvt, judge, k)
self:settextf("(%03.2f%%)", rescoredJudge / totalTaps * 100)
end
Expand Down Expand Up @@ -658,7 +657,7 @@ function scoreBoard(pn, position)
self:playcommand("Set")
end,
SetCommand = function(self)

-- Fill in maRatio and paRatio
maRatio:settextf("%.1f:1", marvelousTaps / perfectTaps)
paRatio:settextf("%.1f:1", perfectTaps / greatTaps)
Expand Down Expand Up @@ -711,22 +710,23 @@ function scoreBoard(pn, position)
t[#t + 1] =
Def.Quad {
InitCommand = function(self)
self:xy(frameX - 5, frameY + 230):zoomto(frameWidth / 2 - 10, 60):halign(0):valign(0):diffuse(color("#333333CC"))
self:xy(frameX - 5, frameY + 227.5):zoomto(frameWidth / 2 - 10, 55):halign(0):valign(0)
self:diffuse(getMainColor("tabs"))
end
}
for i = 1, #fart do
t[#t + 1] =
LoadFont("Common Normal") ..
{
InitCommand = function(self)
self:xy(frameX, frameY + 230 + 10 * i):zoom(0.4):halign(0):settext(fart_translated[fart[i]])
self:xy(frameX, frameY + 224 + 10 * i):zoom(0.4):halign(0):settext(fart_translated[fart[i]])
end
}
t[#t + 1] =
LoadFont("Common Normal") ..
{
InitCommand = function(self)
self:xy(frameWidth / 2, frameY + 230 + 10 * i):zoom(0.4):halign(1)
self:xy(frameWidth / 2, frameY + 224 + 10 * i):zoom(0.4):halign(1)
end,
BeginCommand = function(self)
self:queuecommand("Set")
Expand All @@ -753,9 +753,9 @@ function scoreBoard(pn, position)
local cbm = 0
local tst = ms.JudgeScalers
local tso = tst[judge]
local ncol = GAMESTATE:GetCurrentSteps():GetNumColumns() - 1
local ncol = GAMESTATE:GetCurrentSteps():GetNumColumns() - 1
local middleCol = ncol/2

for i = 1, #devianceTable do
if tracks[i] then
if math.abs(devianceTable[i]) > tso * 90 then
Expand All @@ -773,9 +773,8 @@ function scoreBoard(pn, position)
t[#t + 1] =
Def.Quad {
InitCommand = function(self)
self:xy(frameWidth + 25, frameY + 230):zoomto(frameWidth / 2 + 10, 60):halign(1):valign(0):diffuse(
color("#333333CC")
)
self:xy(frameWidth + 25, frameY + 230):zoomto(frameWidth / 2 + 10, 60):halign(1):valign(0)
self:diffuse(getMainColor("tabs"))
end
}
local smallest, largest = wifeRange(devianceTable)
Expand Down Expand Up @@ -826,14 +825,13 @@ function scoreBoard(pn, position)
end
end
end


t[#t + 1] =
Def.Quad {
InitCommand = function(self)
self:xy(frameWidth + 25, frameY + 230):zoomto(frameWidth / 2 + 10, 60):halign(1):valign(0):diffuse(
color("#333333CC")
)
self:diffuse(getMainColor("tabs"))
self:xy(frameWidth + 25, frameY + 227.5):zoomto(frameWidth / 2 + 10, 55):halign(1):valign(0)
end
}
local smallest, largest = wifeRange(devianceTable)
Expand Down Expand Up @@ -864,7 +862,7 @@ function scoreBoard(pn, position)
LoadFont("Common Normal") ..
{
InitCommand = function(self)
self:xy(frameX + capWideScale(get43size(130), 160), frameY + 230 + ySpacing * i):zoom(tzoom):halign(0):settext(doot[i])
self:xy(frameX + capWideScale(get43size(130), 153), frameY + 224 + ySpacing * i):zoom(tzoom):halign(0):settext(doot[i])
end
}
t[#t + 1] =
Expand All @@ -873,17 +871,17 @@ function scoreBoard(pn, position)
Name=i,
InitCommand = function(self)
if i < 4 then
self:xy(frameWidth + 20, frameY + 230 + ySpacing * i):zoom(tzoom):halign(1):settextf("%5.2fms", mcscoot[i])
self:xy(frameWidth + 20, frameY + 224 + ySpacing * i):zoom(tzoom):halign(1):settextf("%5.2fms", mcscoot[i])
else
self:xy(frameWidth + 20, frameY + 230 + ySpacing * i):zoom(tzoom):halign(1):settext(mcscoot[i])
self:xy(frameWidth + 20, frameY + 224 + ySpacing * i):zoom(tzoom):halign(1):settext(mcscoot[i])
end
end,
ChangeScoreCommand = function(self, params)
local mcscoot = hahahahahaha(params.score)
if i < 4 then
self:xy(frameWidth + 20, frameY + 230 + ySpacing * i):zoom(tzoom):halign(1):settextf("%5.2fms", mcscoot[i])
self:xy(frameWidth + 20, frameY + 224 + ySpacing * i):zoom(tzoom):halign(1):settextf("%5.2fms", mcscoot[i])
else
self:xy(frameWidth + 20, frameY + 230 + ySpacing * i):zoom(tzoom):halign(1):settext(mcscoot[i])
self:xy(frameWidth + 20, frameY + 224 + ySpacing * i):zoom(tzoom):halign(1):settext(mcscoot[i])
end
end,
CodeMessageCommand = function(self, params)
Expand All @@ -905,7 +903,7 @@ function scoreBoard(pn, position)
end
end
end
self:xy(frameWidth + 20, frameY + 230 + 10 * j):zoom(0.4):halign(1):settext(mcscoot[j])
self:xy(frameWidth + 20, frameY + 224 + 10 * j):zoom(0.4):halign(1):settext(mcscoot[j])
end
end,
ForceWindowMessageCommand = function(self)
Expand All @@ -927,7 +925,7 @@ function scoreBoard(pn, position)
end
end
end
self:xy(frameWidth + 20, frameY + 230 + 10 * j):zoom(0.4):halign(1):settext(mcscoot[j])
self:xy(frameWidth + 20, frameY + 224 + 10 * j):zoom(0.4):halign(1):settext(mcscoot[j])
end
end
}
Expand All @@ -945,7 +943,7 @@ end
t[#t + 1] = LoadActor("../offsetplot")

local score = SCOREMAN:GetMostRecentScore()
if not score then
if not score then
score = SCOREMAN:GetTempReplayScore()
end
-- Discord thingies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ local hsTable = rtTable[getRate(score)] or {score}
local scoreIndex = getHighScoreIndex(hsTable, score)

local usingSSRSort = PREFSMAN:GetPreference("SortBySSRNormPercent")

if rtTable == nil then
return {}
end


local curPage = 1
local maxPages = math.ceil(#hsTable/lines)

local function movePage(n)
if n > 0 then
if n > 0 then
curPage = ((curPage+n-1) % maxPages + 1)
else
curPage = ((curPage+n+maxPages-1) % maxPages+1)
Expand All @@ -51,6 +51,9 @@ local function input(event)
scoreBoard:GetChild("scoreItem" .. tostring(i)):GetChild("option"):visible(
not scoreBoard:GetChild("scoreItem" .. tostring(i)):GetChild("option"):GetVisible()
)
scoreBoard:GetChild("scoreItem" .. tostring(i)):GetChild("ClearType"):visible(
not scoreBoard:GetChild("scoreItem" .. tostring(i)):GetChild("ClearType"):GetVisible()
)
end
end
end
Expand Down Expand Up @@ -127,7 +130,7 @@ local function scoreitem(pn, index, scoreIndex, drawindex)
self:GetParent():GetParent():playcommand("HahaThisCodeINeedHelp", {doot = nil})
end,
BeginCommand = function(self)
if hsTable[index] == nil then
if hsTable[index] == nil then
self:playcommand("Hide")
end
end,
Expand Down Expand Up @@ -155,7 +158,7 @@ local function scoreitem(pn, index, scoreIndex, drawindex)
end,
BeginCommand = function(self)
self:visible(GAMESTATE:IsHumanPlayer() and equals)

-- it was once asked if anything had been hacked so hard as some thing that had been hacked really hard.. but yes.. this is
-- hackered... even hardered.... force the offset plot to update if the index in the scoreboard list matches the currently
-- displayed score.. this is because the offset plot was previously using pss to get its info and the way the current system
Expand Down Expand Up @@ -258,6 +261,7 @@ local function scoreitem(pn, index, scoreIndex, drawindex)
--grade text
LoadFont("Common normal") ..
{
Name = "Grade",
InitCommand = function(self)
self:xy(framex + 130 + capWideScale(get43size(0), 50), framey + 2 + (drawindex * spacing)):zoom(0.35):halign(0.5):maxwidth(
(frameWidth - 15) / 0.35
Expand All @@ -274,6 +278,7 @@ local function scoreitem(pn, index, scoreIndex, drawindex)
--cleartype text
LoadFont("Common normal") ..
{
Name = "ClearType",
InitCommand = function(self)
self:xy(framex + 130 + capWideScale(get43size(0), 50), framey + 12 + (drawindex * spacing)):zoom(0.35):halign(0.5):maxwidth(
(frameWidth - 15) / 0.35
Expand Down Expand Up @@ -386,6 +391,7 @@ local function Update(self)
self:GetChild("scoreItem" .. tostring(i)):GetChild("mouseOver"):diffusealpha(0)
self:GetChild("scoreItem" .. tostring(i)):GetChild("grade"):visible(true)
self:GetChild("scoreItem" .. tostring(i)):GetChild("judge"):visible(true)
self:GetChild("scoreItem" .. tostring(i)):GetChild("ClearType"):visible(true)
self:GetChild("scoreItem" .. tostring(i)):GetChild("date"):visible(false)
self:GetChild("scoreItem" .. tostring(i)):GetChild("option"):visible(false)
end
Expand Down

This file was deleted.

Loading

0 comments on commit 29b5bfd

Please sign in to comment.