Skip to content

Commit

Permalink
Set temp Judge on eval & offset plots for local replays
Browse files Browse the repository at this point in the history
  • Loading branch information
poco0317 committed Dec 19, 2019
1 parent 9a212ce commit b6dffb7
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,28 @@ function scoreBoard(pn, position)
local dvt = pss:GetOffsetVector()
local totalTaps = pss:GetTotalTaps()

local function scaleToJudge(scale)
scale = notShit.round(scale, 2)
local scales = {1.50, 1.33, 1.16, 1.00, 0.84, 0.66, 0.50, 0.33, 0.20}
local out = 4
for k,v in pairs(scales) do
if v == scale then
out = k
end
end
return out
end

local t =
Def.ActorFrame {
BeginCommand = function(self)
if position == 1 then
self:x(SCREEN_WIDTH - (frameX * 2) - frameWidth)
end
if not enabledCustomWindows then
judge = scaleToJudge(SCREENMAN:GetTopScreen():GetReplayJudge())
judge2 = judge
end
end,
UpdateNetEvalStatsMessageCommand = function(self)
local s = SCREENMAN:GetTopScreen():GetHighScore()
Expand Down
16 changes: 16 additions & 0 deletions Themes/Til Death/BGAnimations/offsetplot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,18 @@ local function HighlightUpdaterThing(self)
self:GetChild("BGQuad"):queuecommand("Highlight")
end

local function scaleToJudge(scale)
scale = notShit.round(scale, 2)
local scales = {1.50, 1.33, 1.16, 1.00, 0.84, 0.66, 0.50, 0.33, 0.20}
local out = 4
for k,v in pairs(scales) do
if v == scale then
out = k
end
end
return out
end

-- convert a plot x position to a noterow
local function convertXToRow(x)
local output = x + plotWidth/2
Expand All @@ -83,6 +95,10 @@ local o =
-- being explicit about the logic since atm these are the only 2 cases we handle
local name = SCREENMAN:GetTopScreen():GetName()
if name == "ScreenEvaluationNormal" or name == "ScreenNetEvaluation" then -- default case, all data is in pss and no disk load is required
if not enabledCustomWindows then
judge = scaleToJudge(SCREENMAN:GetTopScreen():GetReplayJudge())
tso = tst[judge]
end
local allowHovering = not SCREENMAN:GetTopScreen():ScoreUsedInvalidModifier()
if allowHovering then
self:SetUpdateFunction(HighlightUpdaterThing)
Expand Down

0 comments on commit b6dffb7

Please sign in to comment.