battle: Fix battle sounds search path
This commit is contained in:
parent
a7551ada6a
commit
20ee51972c
1 changed files with 6 additions and 16 deletions
|
@ -1,7 +1,5 @@
|
|||
from pandac.PandaModules import *
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.showbase import AppRunnerGlobal
|
||||
import os
|
||||
|
||||
class BattleSounds:
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('BattleSounds')
|
||||
|
@ -19,20 +17,12 @@ class BattleSounds:
|
|||
|
||||
def setupSearchPath(self):
|
||||
self.sfxSearchPath = DSearchPath()
|
||||
if AppRunnerGlobal.appRunner:
|
||||
self.sfxSearchPath.appendDirectory(Filename.expandFrom('$TT_3_ROOT/phase_3/audio/sfx'))
|
||||
self.sfxSearchPath.appendDirectory(Filename.expandFrom('$TT_3_5_ROOT/phase_3.5/audio/sfx'))
|
||||
self.sfxSearchPath.appendDirectory(Filename.expandFrom('$TT_4_ROOT/phase_4/audio/sfx'))
|
||||
self.sfxSearchPath.appendDirectory(Filename.expandFrom('$TT_5_ROOT/phase_5/audio/sfx'))
|
||||
else:
|
||||
self.sfxSearchPath.appendDirectory(Filename('phase_3/audio/sfx'))
|
||||
self.sfxSearchPath.appendDirectory(Filename('phase_3.5/audio/sfx'))
|
||||
self.sfxSearchPath.appendDirectory(Filename('phase_4/audio/sfx'))
|
||||
self.sfxSearchPath.appendDirectory(Filename('phase_5/audio/sfx'))
|
||||
self.sfxSearchPath.appendDirectory(Filename.fromOsSpecific(os.path.expandvars('$TTMODELS/built/phase_3/audio/sfx')))
|
||||
self.sfxSearchPath.appendDirectory(Filename.fromOsSpecific(os.path.expandvars('$TTMODELS/built/phase_3.5/audio/sfx')))
|
||||
self.sfxSearchPath.appendDirectory(Filename.fromOsSpecific(os.path.expandvars('$TTMODELS/built/phase_4/audio/sfx')))
|
||||
self.sfxSearchPath.appendDirectory(Filename.fromOsSpecific(os.path.expandvars('$TTMODELS/built/phase_5/audio/sfx')))
|
||||
if __debug__:
|
||||
# In the dev environment, it will always be here:
|
||||
self.sfxSearchPath.appendDirectory(Filename('resources/phase_3/audio/sfx'))
|
||||
self.sfxSearchPath.appendDirectory(Filename('resources/phase_3.5/audio/sfx'))
|
||||
self.sfxSearchPath.appendDirectory(Filename('resources/phase_4/audio/sfx'))
|
||||
self.sfxSearchPath.appendDirectory(Filename('resources/phase_5/audio/sfx'))
|
||||
|
||||
def clear(self):
|
||||
if self.isValid:
|
||||
|
|
Loading…
Reference in a new issue