mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-06 21:50:00 +00:00
api: always write capture index cache
This commit is contained in:
+3
-1
@@ -219,13 +219,15 @@ end
|
||||
local capture_cache = {}
|
||||
function pfUI.api.GetCaptures(pat)
|
||||
local r = capture_cache
|
||||
|
||||
if not r[pat] then
|
||||
for a, b, c, d, e in gfind(gsub(pat, "%((.+)%)", "%1"), gsub(pat, "%d%$", "%%(.-)$")) do
|
||||
r[pat] = { a, b, c, d, e}
|
||||
end
|
||||
|
||||
r[pat] = r[pat] or {}
|
||||
end
|
||||
|
||||
if not r[pat] then return nil, nil, nil, nil end
|
||||
return r[pat][1], r[pat][2], r[pat][3], r[pat][4], r[pat][5]
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user