Skip to content

Commit

Permalink
fix getmsd calls (see previous commit)
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed Jan 13, 2017
1 parent 26a2778 commit d974464
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ local t = Def.ActorFrame{
greatest=0
if song and steps then
for i=1,#ms.SkillSets do
meter[i+1] = steps:GetMSD(getCurRateValue(), i-1)
meter[i+1] = steps:GetMSD(getCurRateValue(), i)
if meter[i+1] > meter[greatest+1] then
greatest = i
end
Expand Down Expand Up @@ -83,7 +83,6 @@ local function littlebits(i)
BeginCommand=cmd(queuecommand,"Set"),
SetCommand=function(self)
if song and steps then
--local meter = steps:GetMSD(getCurRateValue(), i-1) -- c++ indexing -- Done through an array when looking for the greater value
self:settextf("%05.2f",meter[i+1])
self:diffuse(ByMSD(meter[i+1]))
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ t[#t+1] = LoadFont("Common Large") .. {
BeginCommand=cmd(queuecommand,"Set"),
SetCommand=function(self)
if song then
local meter = GAMESTATE:GetCurrentSteps(PLAYER_1):GetMSD(getCurRateValue(), 0)
local meter = GAMESTATE:GetCurrentSteps(PLAYER_1):GetMSD(getCurRateValue(), 1)
--If meter is showing 0 because it's a solo or a double chart, then don't show the numbers. -Misterkister
if meter == 0 then
self:settext("")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,18 @@ local function FilterInput(event)
else
for i=1,#numbershers do
if event.DeviceInput.button == "DeviceButton_"..numbershers[i] then
if SSQuery[ActiveSS] == "0" or tonumber(SSQuery[ActiveSS]) > 99 then
if SSQuery[ActiveSS] == "0" then
SSQuery[ActiveSS] = ""
end
SSQuery[ActiveSS] = SSQuery[ActiveSS]..numbershers[i]
end
end
end
if SSQuery[ActiveSS] == "" then
if SSQuery[ActiveSS] == "" or #SSQuery[ActiveSS] > 2 then
SSQuery[ActiveSS] = "0"
end
MESSAGEMAN:Broadcast("UpdateFilter")
ms.ok(SSQuery[ActiveSS])
whee:SetSkillsetFilter(tonumber(SSQuery[ActiveSS]), ActiveSS)
MESSAGEMAN:Broadcast("UpdateFilter")
end
end

Expand Down Expand Up @@ -101,6 +100,12 @@ local f = Def.ActorFrame{
self:settext("Mode: ".."Inclusive")
end,
},
LoadFont("Common Large")..{
InitCommand=cmd(xy,frameX+frameWidth/2,175 + spacingY*2;zoom,textzoom;halign,0),
SetCommand=function(self)
self:settext("Highest SS: ".."False")
end,
},
}

local function CreateFilterInputBox(i)
Expand Down Expand Up @@ -134,7 +139,7 @@ local function CreateFilterInputBox(i)
SetCommand=function(self)
local fval = whee:GetSkillsetFilter(i)
self:settext(fval)
if fval <= 0 then
if fval <= 0 and ActiveSS ~= i then
self:diffuse(color("#666666"))
else
self:diffuse(color("#FFFFFF"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ local t = Def.ActorFrame{
steps = GAMESTATE:GetCurrentSteps(PLAYER_1)

--Find max MSD value, store MSD values in meter[]
-- I plan to have c++ store the highest msd value as a separate variable to aid in the filter process so this won't be needed afterwards - mina
greatest=0
if song and steps then
for i=1,#ms.SkillSets do
meter[i+1] = steps:GetMSD(getCurRateValue(), i-1)
meter[i+1] = steps:GetMSD(getCurRateValue(), i)
if meter[i+1] > meter[greatest+1] then
greatest = i
end
Expand Down Expand Up @@ -87,7 +88,6 @@ local function littlebits(i)
BeginCommand=cmd(queuecommand,"Set"),
SetCommand=function(self)
if song and steps then
--local meter = steps:GetMSD(getCurRateValue(), i-1) -- c++ indexing -- Done through an array when looking for the greater value
self:settextf("%05.2f",meter[i+1])
self:diffuse(ByMSD(meter[i+1]))
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ t[#t+1] = LoadFont("Common Large") .. {
BeginCommand=cmd(queuecommand,"Set"),
SetCommand=function(self)
if song then
local meter = steps:GetMSD(getCurRateValue(), 0)
local meter = steps:GetMSD(getCurRateValue(), 1)
self:settextf("%05.2f",meter)
self:diffuse(ByMSD(meter))
else
Expand Down

0 comments on commit d974464

Please sign in to comment.