|
@@ -15,6 +15,7 @@ from cocos.actions import MoveTo as BaseMoveTo
|
15
|
15
|
from cocos.audio.pygame.mixer import Sound
|
16
|
16
|
from synergine2_cocos2d.interaction import InteractionManager
|
17
|
17
|
from synergine2_cocos2d.middleware import MapMiddleware
|
|
18
|
+from synergine2_cocos2d.util import PathManager
|
18
|
19
|
|
19
|
20
|
from opencombat.simulation.interior import InteriorManager
|
20
|
21
|
from opencombat.simulation.tmx import TileMap
|
|
@@ -155,8 +156,9 @@ class AudioLibrary(object):
|
155
|
156
|
'gunshot_default': '204010__duckduckpony__homemade-gunshot-2.ogg',
|
156
|
157
|
}
|
157
|
158
|
|
158
|
|
- def __init__(self, sound_dir_path: str) -> None:
|
159
|
|
- self._sound_dir_path = sound_dir_path
|
|
159
|
+ def __init__(self, config: Config) -> None:
|
|
160
|
+ self.config = config
|
|
161
|
+ self._path_manager = PathManager(config.resolve('global.include_path.sounds'))
|
160
|
162
|
self._sounds = {}
|
161
|
163
|
|
162
|
164
|
def get_sound(self, name: str) -> Sound:
|
|
@@ -184,7 +186,7 @@ class Game(TMXGui):
|
184
|
186
|
read_queue_interval=read_queue_interval,
|
185
|
187
|
map_dir_path=map_dir_path,
|
186
|
188
|
)
|
187
|
|
- self.sound_lib = AudioLibrary('opencombat/sounds/')
|
|
189
|
+ self.sound_lib = AudioLibrary(self.config)
|
188
|
190
|
|
189
|
191
|
self.terminal.register_event_handler(
|
190
|
192
|
FinishMoveEvent,
|