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

@@ -86,11 +86,11 @@ function SurvivalA3Game:getNextPiece(ruleset)
end
function SurvivalA3Game:hitTorikan(old_level, new_level)
if old_level < 500 and new_level >= 500 and self.frames > sp(2,28) then
if old_level < 500 and new_level >= 500 and self.frames > frameTime(2,28) then
self.level = 500
return true
end
if old_level < 1000 and new_level >= 1000 and self.frames > sp(4,56) then
if old_level < 1000 and new_level >= 1000 and self.frames > frameTime(4,56) then
self.level = 1000
return true
end
@@ -168,7 +168,7 @@ function SurvivalA3Game:updateSectionTimes(old_level, new_level)
section_time = self.frames - self.section_start_time
table.insert(self.section_times, section_time)
self.section_start_time = self.frames
if section_time <= sp(1,00) then
if section_time <= frameTime(1,00) then
self.grade = self.grade + 1
end
end