Skip to content

Commit

Permalink
Introduce a lazy but consistent clamp to judge value in offsetplot
Browse files Browse the repository at this point in the history
  • Loading branch information
poco0317 committed May 13, 2020
1 parent 72d9dce commit 9507d1d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Themes/Til Death/BGAnimations/offsetplot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ local function HighlightUpdaterThing(self)
self:GetChild("BGQuad"):queuecommand("Highlight")
end

-- we removed j1-3 so uhhh this stops things lazily
local function clampJudge()
if judge < 4 then judge = 4 end
end
clampJudge()

local function scaleToJudge(scale)
scale = notShit.round(scale, 2)
local scales = ms.JudgeScalers
Expand Down Expand Up @@ -91,6 +97,7 @@ local o =
if name == "ScreenEvaluationNormal" or name == "ScreenNetEvaluation" then -- default case, all data is in pss and no disk load is required
if not forcedWindow then
judge = scaleToJudge(SCREENMAN:GetTopScreen():GetReplayJudge())
clampJudge()
tso = tst[judge]
end
local allowHovering = not SCREENMAN:GetTopScreen():ScoreUsedInvalidModifier()
Expand Down Expand Up @@ -136,9 +143,11 @@ local o =
CodeMessageCommand = function(self, params)
if params.Name == "PrevJudge" and judge > 1 then
judge = judge - 1
clampJudge()
tso = tst[judge]
elseif params.Name == "NextJudge" and judge < 9 then
judge = judge + 1
clampJudge()
tso = tst[judge]
end
if params.Name == "ToggleHands" and #ctt > 0 then --super ghetto toggle -mina
Expand All @@ -159,6 +168,7 @@ local o =
end
if params.Name == "ResetJudge" then
judge = GetTimingDifficulty()
clampJudge()
tso = tst[GetTimingDifficulty()]
end
if params.Name ~= "ResetJudge" and params.Name ~= "PrevJudge" and params.Name ~= "NextJudge" and params.Name ~= "ToggleHands" then return end
Expand All @@ -167,6 +177,7 @@ local o =
end,
ForceWindowMessageCommand = function(self, params)
judge = params.judge
clampJudge()
tso = tst[judge]
maxOffset = math.max(180, 180 * tso)
forcedWindow = true
Expand Down

0 comments on commit 9507d1d

Please sign in to comment.