mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-23 11:42:39 -06:00
Fix content pack support.
This commit is contained in:
parent
fef0e0678e
commit
a31c46f29a
2 changed files with 20 additions and 11 deletions
|
@ -1,5 +1,5 @@
|
|||
from panda3d.core import *
|
||||
import __builtin__, os, sys
|
||||
import __builtin__, os, sys, glob
|
||||
import aes
|
||||
|
||||
import niraidata
|
||||
|
@ -30,11 +30,19 @@ del dc
|
|||
del iv
|
||||
del key
|
||||
|
||||
# The VirtualFileSystem, which has already initialized, doesn't see the mount
|
||||
# directives in the config(s) yet. We have to force it to load those manually:
|
||||
#from panda3d.core import VirtualFileSystem, ConfigVariableList, Filename
|
||||
vfs = VirtualFileSystem.getGlobalPtr()
|
||||
mounts = ConfigVariableList('vfs-mount')
|
||||
for mount in mounts:
|
||||
mountfile, mountpoint = (mount.split(' ', 2) + [None, None, None])[:2]
|
||||
vfs.mount(Filename(mountfile), Filename(mountpoint), 0)
|
||||
|
||||
# Resources
|
||||
# TO DO: Sign and verify the phases to prevent edition
|
||||
abort = False
|
||||
|
||||
|
||||
# Packs
|
||||
pack = os.environ.get('TT_STRIDE_CONTENT_PACK')
|
||||
if pack and pack != 'default':
|
||||
|
@ -50,7 +58,7 @@ if pack and pack != 'default':
|
|||
|
||||
mf.flush()
|
||||
|
||||
if not vfs.mount(mf, '../resources', 0):
|
||||
if not vfs.mount(mf, '/', 0):
|
||||
print 'Unable to mount %s' % filename
|
||||
abort = True
|
||||
break
|
||||
|
|
|
@ -69,14 +69,15 @@ from direct.directnotify.DirectNotifyGlobal import directNotify
|
|||
notify = directNotify.newCategory('ToontownStart')
|
||||
notify.setInfo(True)
|
||||
|
||||
# The VirtualFileSystem, which has already initialized, doesn't see the mount
|
||||
# directives in the config(s) yet. We have to force it to load those manually:
|
||||
from panda3d.core import VirtualFileSystem, ConfigVariableList, Filename
|
||||
vfs = VirtualFileSystem.getGlobalPtr()
|
||||
mounts = ConfigVariableList('vfs-mount')
|
||||
for mount in mounts:
|
||||
mountfile, mountpoint = (mount.split(' ', 2) + [None, None, None])[:2]
|
||||
vfs.mount(Filename(mountfile), Filename(mountpoint), 0)
|
||||
if __debug__:
|
||||
# The VirtualFileSystem, which has already initialized, doesn't see the mount
|
||||
# directives in the config(s) yet. We have to force it to load those manually:
|
||||
from panda3d.core import VirtualFileSystem, ConfigVariableList, Filename
|
||||
vfs = VirtualFileSystem.getGlobalPtr()
|
||||
mounts = ConfigVariableList('vfs-mount')
|
||||
for mount in mounts:
|
||||
mountfile, mountpoint = (mount.split(' ', 2) + [None, None, None])[:2]
|
||||
vfs.mount(Filename(mountfile), Filename(mountpoint), 0)
|
||||
|
||||
from otp.settings.Settings import Settings
|
||||
from otp.otpbase import OTPGlobals
|
||||
|
|
Loading…
Reference in a new issue