Skip to content

Commit

Permalink
fix theme errors mostly relating to indexing nil objects
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed Dec 31, 2016
1 parent d1b3ee2 commit c7e09f1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
4 changes: 3 additions & 1 deletion Themes/Til Death/BGAnimations/ScreenNetRoom underlay.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ t[#t+1] = Def.Quad{
InitCommand=cmd(xy,SCREEN_WIDTH,0;halign,1;valign,0;zoomto,capWideScale(get43size(350),350),SCREEN_HEIGHT;diffuse,color("#33333399"));
};


-- what is this supposed to be? - mina
t[#t+1] = Def.Quad{
InitCommand=cmd(draworder,-300;xy,frameX,frameY-100;zoomto,SCREEN_WIDTH,160;halign,0;diffuse,getMainColor('highlight');diffusealpha,0.15;diffusebottomedge,color("0,0,0,0"))
InitCommand=cmd(draworder,-300;xy,10,300-100;zoomto,SCREEN_WIDTH,160;halign,0;diffuse,getMainColor('highlight');diffusealpha,0.15;diffusebottomedge,color("0,0,0,0"))
}

t[#t+1] = Def.Quad{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -392,20 +392,19 @@ t[#t+1] = LoadFont("Common Large") .. {
SetCommand=function(self)
if song then
local meter = GAMESTATE:GetCurrentSteps(PLAYER_1):GetMSD(getCurRateValue(), 0)
self:settextf("%05.2f",meter)
self:diffuse(ByMSD(meter))
--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("")
else
self:settextf("%05.2f",meter)
self:diffuse(ByMSD(meter))
end
else
self:settext("")
end
if steps:GetTimingData():HasWarps() then
if song and steps:GetTimingData():HasWarps() then
self:settext("")
end
--Putting this here for other stuff. -Misterkister
local meter = GAMESTATE:GetCurrentSteps(PLAYER_1):GetMSD(getCurRateValue())
--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("")
end
end,
RefreshChartInfoMessageCommand=cmd(queuecommand,"Set"),
CurrentRateChangedMessageCommand=cmd(queuecommand,"Set"),
Expand Down Expand Up @@ -472,7 +471,7 @@ t[#t+1] = LoadFont("Common Large") .. {
InitCommand=cmd(xy,negativebpmX,negativebpmY;halign,0;zoom,0.25);
BeginCommand=cmd(queuecommand,"Set");
SetCommand=function(self)
if steps:GetTimingData():HasWarps() then
if song and steps:GetTimingData():HasWarps() then
self:settext("Negative BPMs Detected")
self:diffuse(color("#e61e25"))
else
Expand Down

0 comments on commit c7e09f1

Please sign in to comment.