simplify check for '0000'

This commit is contained in:
Kartik K. Agaram 2023-09-09 10:17:38 -07:00
parent 2bce6aad55
commit 993b5d6ca3
1 changed files with 1 additions and 1 deletions

View File

@ -62,7 +62,7 @@ function live.load_files_so_far()
for _,filename in ipairs(love.filesystem.getDirectoryItems('')) do
if io.open(love.filesystem.getSaveDirectory()..'/'..filename) then
local numeric_prefix, root = filename:match('^(%d+)-(.+)')
if numeric_prefix and tonumber(numeric_prefix) > 0 then -- skip 0000
if numeric_prefix and not numeric_prefix:match('^0+$') then
Live.filename[root] = filename
table.insert(Live.filenames_to_load, filename)
Live.final_prefix = math.max(Live.final_prefix, tonumber(numeric_prefix))