From d53f0238ac278b052521a03eb6cc154a62c4bada Mon Sep 17 00:00:00 2001 From: Alexander Date: Sat, 22 Aug 2015 23:14:12 -0400 Subject: [PATCH] Fix the content packs. --- build/data/NiraiStart.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/build/data/NiraiStart.py b/build/data/NiraiStart.py index f2311e39..15bd7159 100644 --- a/build/data/NiraiStart.py +++ b/build/data/NiraiStart.py @@ -1,5 +1,5 @@ from panda3d.core import * -import __builtin__, os, sys, glob +import __builtin__, os, sys import aes import niraidata @@ -45,6 +45,7 @@ abort = False # Packs pack = os.environ.get('TT_STRIDE_CONTENT_PACK') +import glob if pack and pack != 'default': print 'Loading content pack', pack for file in glob.glob('resources/%s/*.mf' % pack): @@ -53,15 +54,9 @@ if pack and pack != 'default': names = mf.getSubfileNames() for name in names: ext = os.path.splitext(name)[1] - if ext not in ('.jpg', '.jpeg', '.ogg', '.rgb'): + if ext not in ['.jpg', '.jpeg', '.ogg', '.rgb']: mf.removeSubfile(name) - - mf.flush() - - if not vfs.mount(mf, '/', 0): - print 'Unable to mount %s' % filename - abort = True - break + vfs.mount(mf, Filename('/'), 0) if not abort: # Run