Showing
1 changed file
with
6 additions
and
0 deletions
... | ... | @@ -49,6 +49,12 @@ function _M:loadTileset(file) |
49 | 49 | for k, e in pairs(ts) do self.tilesets[k] = e end |
50 | 50 | end |
51 | 51 | |
52 | +function _M:loadTilesetsMatch(dir, pattern) | |
53 | + for f in fs.iterate(dir, function(f) return f:find(pattern, 1, 1) and f:find("%.lua$") end) do | |
54 | + self:loadTileset(dir..f) | |
55 | + end | |
56 | +end | |
57 | + | |
52 | 58 | function _M:init(w, h, fontname, fontsize, texture, allow_backcolor) |
53 | 59 | self.allow_backcolor = allow_backcolor |
54 | 60 | self.texture = texture | ... | ... |
-
Please register or login to post a comment