thify_number replicates FormatPercentScore; use that instead.

This commit is contained in:
freem
2014-09-15 03:54:02 -05:00
parent a7307fd87e
commit 9ed45e1bc9
2 changed files with 2 additions and 9 deletions
@@ -43,7 +43,7 @@ for i=1,#statList do
OnCommand=cmd(zoomto,80,18;diffuse,Color.Black;diffusealpha,0.5;fadeleft,0.5);
};
LoadFont("Common Normal") .. {
Text=thify_number(statList[j]:GetStageIndex()+1);
Text=FormatNumberAndSuffix(statList[j]:GetStageIndex()+1);
InitCommand=cmd(x,128-4;y,40-4;horizalign,right;vertalign,bottom);
OnCommand=cmd(diffuse,StageToColor(statList[j]:GetStage());zoom,0.675;shadowlength,1);
};
+1 -8
View File
@@ -19,13 +19,6 @@ function SongMeterDisplayCommand(pn)
end
end
function thify_number(n)
if n >= 10 and n < 20 then return n .. "th" end
local th_suffixes= {"st", "nd", "rd"}
local end_digit= n % 10
return n .. (th_suffixes[end_digit] or "th")
end
local numbered_stages= {
Stage_1st= true,
Stage_2nd= true,
@@ -45,7 +38,7 @@ function thified_curstage_index(on_eval)
adjust= 0
end
if numbered_stages[cur_stage] then
return thify_number(GAMESTATE:GetCurrentStageIndex() + adjust)
return FormatNumberAndSuffix(GAMESTATE:GetCurrentStageIndex() + adjust)
else
return ToEnumShortString(cur_stage)
end