Commit 3a06daa02db12de51464596be00f349785ecb9d3

Authored by DarkGod
1 parent bc50953c

plop

@@ -49,6 +49,12 @@ function _M:loadTileset(file) @@ -49,6 +49,12 @@ function _M:loadTileset(file)
49 for k, e in pairs(ts) do self.tilesets[k] = e end 49 for k, e in pairs(ts) do self.tilesets[k] = e end
50 end 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 function _M:init(w, h, fontname, fontsize, texture, allow_backcolor) 58 function _M:init(w, h, fontname, fontsize, texture, allow_backcolor)
53 self.allow_backcolor = allow_backcolor 59 self.allow_backcolor = allow_backcolor
54 self.texture = texture 60 self.texture = texture