Eval fixup

This commit is contained in:
Colby Klein
2008-12-21 10:01:10 +00:00
parent 2379ee3da7
commit 22d0b9e53d
@@ -41,33 +41,39 @@ end
if ShowStandardDecoration("ItsARecord") then if ShowStandardDecoration("ItsARecord") then
for pn in ivalues(PlayerNumber) do for pn in ivalues(PlayerNumber) do
local t2 = Def.ActorFrame { -- only check if player exists, don't draw for both if one doesn't exist -aj
BeginCommand=function(self) if GAMESTATE:IsSideJoined(pn) then
local pss = SCREENMAN:GetTopScreen():GetStageStats():GetPlayerStageStats(pn); local t2 = Def.ActorFrame {
local index = pss:GetMachineHighScoreIndex(); BeginCommand=function(self)
local hsl = PROFILEMAN:GetMachineProfile():GetHighScoreList(pSong,pSteps): local pss = SCREENMAN:GetTopScreen():GetStageStats():GetPlayerStageStats(pn);
hsl:GetHighScores()[1]:GetName GetScore GetPercentDP local index = pss:GetMachineHighScoreIndex();
if index == 0 then local hsl = PROFILEMAN:GetMachineProfile():GetHighScoreList(pSong,pSteps);
self:GetChild("Record"):visible( true );
self:GetChild("NoRecord"):visible( false ); local hsName = hsl:GetHighScores()[1]:GetName();
else local hsPerc = hsl:GetHighScores()[1]:GetPercentDP();
self:GetChild("Record"):visible( false ); --hsl:GetHighScores()[1]:GetName GetScore GetPercentDP
self:GetChild("NoRecord"):visible( true ); if index == 0 then
if hsl then self:GetChild("Record"):visible( true );
self:GetChild("NoRecord"):settext("WWWW:\n82.34%"); self:GetChild("NoRecord"):visible( false );
else else
self:GetChild("NoRecord"):settext(""); self:GetChild("Record"):visible( false );
self:GetChild("NoRecord"):visible( true );
if hsl then
self:GetChild("NoRecord"):settext(hsName..":\n"..hsPerc);
else
self:GetChild("NoRecord"):settext("");
end
end end
end end;
end; LoadFont("_sf sports night ns upright 16px") .. {
LoadFont("_sf sports night ns upright 16px") .. { InitCommand=cmd(name,"Record";settext,"It's a New\nRecord!!!";diffuse,color("#fffc00");strokecolor,color("#807e00");vertspacing,-2;shadowlength,0;glowshift;);
InitCommand=cmd(name,"Record";settext,"It's a New\nRecord!!!";diffuse,color("#fffc00");strokecolor,color("#807e00");vertspacing,-2;shadowlength,0;glowshift;); };
}; LoadFont("common normal") .. {
LoadFont("common normal") .. { InitCommand=cmd(name,"NoRecord";strokecolor,color("#706f43");shadowlength,0;);
InitCommand=cmd(name,"NoRecord";strokecolor,color("#706f43");shadowlength,0;); };
}; }
} t[#t+1] = StandardDecorationFromTable( "ItsARecord" .. ToEnumShortString(pn), t2 );
t[#t+1] = StandardDecorationFromTable( "ItsARecord" .. ToEnumShortString(pn), t2 ); end
end end
end end