Skip to content

Commit

Permalink
swap to c++ skillset sorting for top 3 display
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed Jan 14, 2017
1 parent 42296ef commit a5ab25f
Showing 1 changed file with 3 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -444,32 +444,12 @@ t[#t+1] = LoadFont("Common Large") .. {
-- }


-- lol this
local ss1
local ss2
local ss3
t[#t+1] = LoadFont("Common Large") .. {
InitCommand=cmd(xy,frameX+120,frameY-60;halign,0;zoom,0.4,maxwidth,125),
BeginCommand=cmd(queuecommand,"Set"),
SetCommand=function(self)
if song then
local dwerp = {}
for i=2,#ms.SkillSets do
dwerp[i-1] = string.format("%5.2f", steps:GetMSD(getCurRateValue(), i))..ms.SkillSets[i]
end
table.sort(dwerp)
ss1 = string.sub(dwerp[#dwerp],6)
if tonumber(string.sub(dwerp[#dwerp-1],0,5)) > tonumber(string.sub(dwerp[#dwerp],0,5))*0.9 then
ss2 = string.sub(dwerp[#dwerp-1],6)
else
ss2 = ""
end
if tonumber(string.sub(dwerp[#dwerp-2],0,5)) > tonumber(string.sub(dwerp[#dwerp],0,5))*0.9 then
ss3 = string.sub(dwerp[#dwerp-2],6)
else
ss3 = ""
end
self:settext(ss1)
self:settext(steps:GetRelevantSkillsetsByMSDRank(getCurRateValue(), 1))
else
self:settext("")
end
Expand All @@ -483,7 +463,7 @@ t[#t+1] = LoadFont("Common Large") .. {
BeginCommand=cmd(queuecommand,"Set"),
SetCommand=function(self)
if song then
self:settext(ss2)
self:settext(steps:GetRelevantSkillsetsByMSDRank(getCurRateValue(), 2))
else
self:settext("")
end
Expand All @@ -497,7 +477,7 @@ t[#t+1] = LoadFont("Common Large") .. {
BeginCommand=cmd(queuecommand,"Set"),
SetCommand=function(self)
if song then
self:settext(ss3)
self:settext(steps:GetRelevantSkillsetsByMSDRank(getCurRateValue(), 3))
else
self:settext("")
end
Expand Down

0 comments on commit a5ab25f

Please sign in to comment.