changeset 273:dcd0642e12e0

Ever helpful data helpers
author Neil Muller <drnlmuller@gmail.com>
date Thu, 15 Sep 2011 17:35:27 +0200
parents a061dd62127c
children b970f717479b
files mamba/data.py
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mamba/data.py	Thu Sep 15 17:09:21 2011 +0200
+++ b/mamba/data.py	Thu Sep 15 17:35:27 2011 +0200
@@ -73,3 +73,8 @@
 def list_levels():
     files = [os.path.splitext(x) for x in os.listdir(filepath('levels'))]
     return [x[0] for x in files if x[1] == '.txt']
+
+
+def list_tilesets():
+    tiles = os.listdir(filepath('tiles'))
+    return [x for x in tiles if check_tileset_legal(x)]