mirror of
https://github.com/smogon/sprites.git
synced 2026-03-21 17:35:13 -05:00
fix spritedata()
This commit is contained in:
parent
5fab848fa9
commit
d3c98c3397
|
|
@ -1,4 +1,5 @@
|
|||
|
||||
-- Similar to `parseFilename` in data/lib
|
||||
function spritedata(basename)
|
||||
local iter = basename:gmatch("[^-]+")
|
||||
local result = {id = iter(), data = {}}
|
||||
|
|
@ -6,8 +7,8 @@ function spritedata(basename)
|
|||
if flagtext:len() == 1 then
|
||||
result.data[flagtext] = true
|
||||
else
|
||||
local flag = flagtext.sub(1, 1)
|
||||
local text = flagtext.sub(2)
|
||||
local flag = flagtext:sub(1, 1)
|
||||
local text = flagtext:sub(2)
|
||||
result.data[flag] = text
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user