Refactored funcs.lua

- Renamed st and sp to strTrueValues and frameTime respectively
- Modified files calling these to use the new names
- Tidying like formatTime now using a single string.format
This commit is contained in:
Oshisaure
2020-10-06 18:14:00 +01:00
parent d5ce2ee9ba
commit 6b7f18d58a
18 changed files with 79 additions and 70 deletions

View File

@@ -155,15 +155,15 @@ end
function MarathonA1Game:checkGMRequirements(old_level, new_level)
if old_level < 300 and new_level >= 300 then
if self.score > 12000 and self.frames <= sp(4,15) then
if self.score > 12000 and self.frames <= frameTime(4,15) then
self.gm_conditions["level300"] = true
end
elseif old_level < 500 and new_level >= 500 then
if self.score > 40000 and self.frames <= sp(7,30) then
if self.score > 40000 and self.frames <= frameTime(7,30) then
self.gm_conditions["level500"] = true
end
elseif old_level < 999 and new_level >= 999 then
if self.score > 126000 and self.frames <= sp(13,30) then
if self.score > 126000 and self.frames <= frameTime(13,30) then
self.gm_conditions["level900"] = true
end
end
@@ -184,7 +184,7 @@ function MarathonA1Game:drawScoringInfo()
love.graphics.print(
self.das.direction .. " " ..
self.das.frames .. " " ..
st(self.prev_inputs)
strTrueValues(self.prev_inputs)
)
love.graphics.printf("NEXT", 64, 40, 40, "left")
love.graphics.printf("GRADE", 240, 120, 40, "left")