diff --git a/toontown/battle/DistributedBattleBldg.py b/toontown/battle/DistributedBattleBldg.py index 3053a3a..f08d31e 100644 --- a/toontown/battle/DistributedBattleBldg.py +++ b/toontown/battle/DistributedBattleBldg.py @@ -36,9 +36,9 @@ class DistributedBattleBldg(DistributedBattleBase.DistributedBattleBase): def setBossBattle(self, value): self.bossBattle = value if self.bossBattle: - self.battleMusic = base.loadMusic('phase_7/audio/bgm/encntr_suit_winning_indoor.mid') + self.battleMusic = base.loader.loadMusic('phase_7/audio/bgm/encntr_suit_winning_indoor.mid') else: - self.battleMusic = base.loadMusic('phase_7/audio/bgm/encntr_general_bg_indoor.mid') + self.battleMusic = base.loader.loadMusic('phase_7/audio/bgm/encntr_general_bg_indoor.mid') base.playMusic(self.battleMusic, looping=1, volume=0.9) def getBossBattleTaunt(self): diff --git a/toontown/building/DistributedSuitInterior.py b/toontown/building/DistributedSuitInterior.py index 6d0865a..941d574 100644 --- a/toontown/building/DistributedSuitInterior.py +++ b/toontown/building/DistributedSuitInterior.py @@ -53,8 +53,8 @@ class DistributedSuitInterior(DistributedObject.DistributedObject): 120, 12, 38] - self.waitMusic = base.loadMusic('phase_7/audio/bgm/encntr_toon_winning_indoor.mid') - self.elevatorMusic = base.loadMusic('phase_7/audio/bgm/tt_elevator.mid') + self.waitMusic = base.loader.loadMusic('phase_7/audio/bgm/encntr_toon_winning_indoor.mid') + self.elevatorMusic = base.loader.loadMusic('phase_7/audio/bgm/tt_elevator.mid') self.fsm = ClassicFSM.ClassicFSM('DistributedSuitInterior', [State.State('WaitForAllToonsInside', self.enterWaitForAllToonsInside, self.exitWaitForAllToonsInside, ['Elevator']), State.State('Elevator', self.enterElevator, self.exitElevator, ['Battle']), State.State('Battle', self.enterBattle, self.exitBattle, ['Resting', 'Reward', 'ReservesJoining']), diff --git a/toontown/cogdominium/CogdoGameAudioManager.py b/toontown/cogdominium/CogdoGameAudioManager.py index 9e0242c..d8b5d82 100644 --- a/toontown/cogdominium/CogdoGameAudioManager.py +++ b/toontown/cogdominium/CogdoGameAudioManager.py @@ -43,7 +43,7 @@ class CogdoGameAudioManager: self.currentMusic = None self._music = {} for name, filePath in musicFiles.items(): - self._music[name] = base.loadMusic(filePath) + self._music[name] = base.loader.loadMusic(filePath) self._audioSounds = [] self._soundIvals = {} diff --git a/toontown/cogdominium/DistributedCogdoInterior.py b/toontown/cogdominium/DistributedCogdoInterior.py index 8a35c80..9551aca 100644 --- a/toontown/cogdominium/DistributedCogdoInterior.py +++ b/toontown/cogdominium/DistributedCogdoInterior.py @@ -76,8 +76,8 @@ class DistributedCogdoInterior(DistributedObject.DistributedObject): self.penthouseOutroTrack = None self.penthouseOutroChatDoneTrack = None self.penthouseIntroTrack = None - self.waitMusic = base.loadMusic('phase_7/audio/bgm/encntr_toon_winning_indoor.mid') - self.elevatorMusic = base.loadMusic('phase_7/audio/bgm/tt_elevator.mid') + self.waitMusic = base.loader.loadMusic('phase_7/audio/bgm/encntr_toon_winning_indoor.mid') + self.elevatorMusic = base.loader.loadMusic('phase_7/audio/bgm/tt_elevator.mid') self.fsm = ClassicFSM.ClassicFSM('DistributedCogdoInterior', [State.State('WaitForAllToonsInside', self.enterWaitForAllToonsInside, self.exitWaitForAllToonsInside, ['Elevator']), State.State('Elevator', self.enterElevator, self.exitElevator, ['Game']), State.State('Game', self.enterGame, self.exitGame, ['Resting', 'Failed', 'BattleIntro']), diff --git a/toontown/coghq/CogHQLoader.py b/toontown/coghq/CogHQLoader.py index bf5761c..656f1f2 100644 --- a/toontown/coghq/CogHQLoader.py +++ b/toontown/coghq/CogHQLoader.py @@ -28,8 +28,8 @@ class CogHQLoader(StateData.StateData): def load(self, zoneId): self.parentFSMState.addChild(self.fsm) - self.music = base.loadMusic(self.musicFile) - self.battleMusic = base.loadMusic('phase_9/audio/bgm/encntr_suit_winning.mid') + self.music = base.loader.loadMusic(self.musicFile) + self.battleMusic = base.loader.loadMusic('phase_9/audio/bgm/encntr_suit_winning.mid') self.townBattle = TownBattle.TownBattle(self.townBattleDoneEvent) self.townBattle.load() Suit.loadSuits(3) diff --git a/toontown/coghq/CountryClubInterior.py b/toontown/coghq/CountryClubInterior.py index 29a7ea5..c9d6c6b 100644 --- a/toontown/coghq/CountryClubInterior.py +++ b/toontown/coghq/CountryClubInterior.py @@ -72,7 +72,7 @@ class CountryClubInterior(BattlePlace.BattlePlace): self.parentFSM.getStateNamed('countryClubInterior').addChild(self.fsm) BattlePlace.BattlePlace.load(self) musicName = random.choice(['phase_12/audio/bgm/Bossbot_Factory_v1.mid', 'phase_12/audio/bgm/Bossbot_Factory_v2.mid', 'phase_12/audio/bgm/Bossbot_Factory_v3.mid']) - self.music = base.loadMusic(musicName) + self.music = base.loader.loadMusic(musicName) def unload(self): self.parentFSM.getStateNamed('countryClubInterior').removeChild(self.fsm) diff --git a/toontown/coghq/FactoryInterior.py b/toontown/coghq/FactoryInterior.py index 6b5a7f4..d88e634 100644 --- a/toontown/coghq/FactoryInterior.py +++ b/toontown/coghq/FactoryInterior.py @@ -67,7 +67,7 @@ class FactoryInterior(BattlePlace.BattlePlace): State.State('final', self.enterFinal, self.exitFinal, ['start'])], 'start', 'final') self.parentFSM.getStateNamed('factoryInterior').addChild(self.fsm) BattlePlace.BattlePlace.load(self) - self.music = base.loadMusic('phase_9/audio/bgm/CHQ_FACT_bg.mid') + self.music = base.loader.loadMusic('phase_9/audio/bgm/CHQ_FACT_bg.mid') def unload(self): self.parentFSM.getStateNamed('factoryInterior').removeChild(self.fsm) diff --git a/toontown/coghq/MintInterior.py b/toontown/coghq/MintInterior.py index 5ddd15b..6be3fc5 100644 --- a/toontown/coghq/MintInterior.py +++ b/toontown/coghq/MintInterior.py @@ -66,7 +66,7 @@ class MintInterior(BattlePlace.BattlePlace): def load(self): self.parentFSM.getStateNamed('mintInterior').addChild(self.fsm) BattlePlace.BattlePlace.load(self) - self.music = base.loadMusic('phase_9/audio/bgm/CHQ_FACT_bg.mid') + self.music = base.loader.loadMusic('phase_9/audio/bgm/CHQ_FACT_bg.mid') def unload(self): self.parentFSM.getStateNamed('mintInterior').removeChild(self.fsm) diff --git a/toontown/coghq/StageInterior.py b/toontown/coghq/StageInterior.py index d936b1a..b03289f 100644 --- a/toontown/coghq/StageInterior.py +++ b/toontown/coghq/StageInterior.py @@ -68,7 +68,7 @@ class StageInterior(BattlePlace.BattlePlace): def load(self): self.parentFSM.getStateNamed('stageInterior').addChild(self.fsm) BattlePlace.BattlePlace.load(self) - self.music = base.loadMusic('phase_9/audio/bgm/CHQ_FACT_bg.mid') + self.music = base.loader.loadMusic('phase_9/audio/bgm/CHQ_FACT_bg.mid') def unload(self): self.parentFSM.getStateNamed('stageInterior').removeChild(self.fsm) diff --git a/toontown/estate/EstateLoader.py b/toontown/estate/EstateLoader.py index 75005f1..2bb4e64 100644 --- a/toontown/estate/EstateLoader.py +++ b/toontown/estate/EstateLoader.py @@ -47,7 +47,7 @@ class EstateLoader(SafeZoneLoader.SafeZoneLoader): def load(self): SafeZoneLoader.SafeZoneLoader.load(self) - self.music = base.loadMusic('phase_4/audio/bgm/TC_nbrhood.mid') + self.music = base.loader.loadMusic('phase_4/audio/bgm/TC_nbrhood.mid') self.underwaterSound = base.loader.loadSfx('phase_4/audio/sfx/AV_ambient_water.mp3') self.swimSound = base.loader.loadSfx('phase_4/audio/sfx/AV_swim_single_stroke.mp3') self.submergeSound = base.loader.loadSfx('phase_5.5/audio/sfx/AV_jump_in_water.mp3') diff --git a/toontown/golf/DistributedGolfCourse.py b/toontown/golf/DistributedGolfCourse.py index 873edf3..e009a7c 100644 --- a/toontown/golf/DistributedGolfCourse.py +++ b/toontown/golf/DistributedGolfCourse.py @@ -108,7 +108,7 @@ class DistributedGolfCourse(DistributedObject.DistributedObject, FSM, DelayDelet return def load(self): - self.music = base.loadMusic('phase_6/audio/bgm/GZ_PlayGolf.mid') + self.music = base.loader.loadMusic('phase_6/audio/bgm/GZ_PlayGolf.mid') def setCourseReady(self, numHoles, holeIds, coursePar): self.notify.debug('GOLF COURSE: received setCourseReady') diff --git a/toontown/makeatoon/MakeAToon.py b/toontown/makeatoon/MakeAToon.py index 3d44e3c..9ad0a4b 100644 --- a/toontown/makeatoon/MakeAToon.py +++ b/toontown/makeatoon/MakeAToon.py @@ -251,7 +251,7 @@ class MakeAToon(StateData.StateData): self.cos.load() self.cls.load() self.ns.load() - self.music = base.loadMusic('phase_3/audio/bgm/create_a_toon.mid') + self.music = base.loader.loadMusic('phase_3/audio/bgm/create_a_toon.mid') self.musicVolume = base.config.GetFloat('makeatoon-music-volume', 1) self.sfxVolume = base.config.GetFloat('makeatoon-sfx-volume', 1) self.soundBack = base.loader.loadSfx('phase_3/audio/sfx/GUI_create_toon_back.mp3') diff --git a/toontown/minigame/DistributedCannonGame.py b/toontown/minigame/DistributedCannonGame.py index 4e5aea4..bbd82a4 100644 --- a/toontown/minigame/DistributedCannonGame.py +++ b/toontown/minigame/DistributedCannonGame.py @@ -111,7 +111,7 @@ class DistributedCannonGame(DistributedMinigame): self.jarImage.reparentTo(hidden) self.rewardPanel = DirectLabel(parent=hidden, relief=None, pos=(1.16, 0.0, 0.45), scale=0.65, text='', text_scale=0.2, text_fg=(0.95, 0.95, 0, 1), text_pos=(0, -.13), text_font=ToontownGlobals.getSignFont(), image=self.jarImage) self.rewardPanelTitle = DirectLabel(parent=self.rewardPanel, relief=None, pos=(0, 0, 0.06), scale=0.08, text=TTLocalizer.CannonGameReward, text_fg=(0.95, 0.95, 0, 1), text_shadow=(0, 0, 0, 1)) - self.music = base.loadMusic('phase_4/audio/bgm/MG_cannon_game.mid') + self.music = base.loader.loadMusic('phase_4/audio/bgm/MG_cannon_game.mid') self.sndCannonMove = base.loader.loadSfx('phase_4/audio/sfx/MG_cannon_adjust.mp3') self.sndCannonFire = base.loader.loadSfx('phase_4/audio/sfx/MG_cannon_fire_alt.mp3') self.sndHitGround = base.loader.loadSfx('phase_4/audio/sfx/MG_cannon_hit_dirt.mp3') diff --git a/toontown/minigame/DistributedCatchGame.py b/toontown/minigame/DistributedCatchGame.py index 97ae12b..ca9ec0e 100644 --- a/toontown/minigame/DistributedCatchGame.py +++ b/toontown/minigame/DistributedCatchGame.py @@ -95,7 +95,7 @@ class DistributedCatchGame(DistributedMinigame): model.setZ(-self.ObjRadius) model.flattenMedium() - self.music = base.loadMusic('phase_4/audio/bgm/MG_toontag.mid') + self.music = base.loader.loadMusic('phase_4/audio/bgm/MG_toontag.mid') self.sndGoodCatch = base.loader.loadSfx('phase_4/audio/sfx/SZ_DD_treasure.mp3') self.sndOof = base.loader.loadSfx('phase_4/audio/sfx/MG_cannon_hit_dirt.mp3') self.sndAnvilLand = base.loader.loadSfx('phase_4/audio/sfx/AA_drop_anvil_miss.mp3') diff --git a/toontown/minigame/DistributedCogThiefGame.py b/toontown/minigame/DistributedCogThiefGame.py index c983cfd..a7e7148 100644 --- a/toontown/minigame/DistributedCogThiefGame.py +++ b/toontown/minigame/DistributedCogThiefGame.py @@ -60,7 +60,7 @@ class DistributedCogThiefGame(DistributedMinigame): def load(self): self.notify.debug('load') DistributedMinigame.load(self) - self.music = base.loadMusic('phase_4/audio/bgm/MG_CogThief.mid') + self.music = base.loader.loadMusic('phase_4/audio/bgm/MG_CogThief.mid') self.initCogInfo() for barrelIndex in range(CTGG.NumBarrels): barrel = loader.loadModel('phase_4/models/minigames/cogthief_game_gagTank') diff --git a/toontown/minigame/DistributedDivingGame.py b/toontown/minigame/DistributedDivingGame.py index bb1a796..b3dd78e 100644 --- a/toontown/minigame/DistributedDivingGame.py +++ b/toontown/minigame/DistributedDivingGame.py @@ -113,7 +113,7 @@ class DistributedDivingGame(DistributedMinigame): hitSoundName = 'diving_game_hit.mp3' hitSoundPath = 'phase_4/audio/sfx/%s' % hitSoundName self.hitSound = loader.loadSfx(hitSoundPath) - self.music = base.loadMusic('phase_4/audio/bgm/MG_Target.mid') + self.music = base.loader.loadMusic('phase_4/audio/bgm/MG_Target.mid') self.addSound('dropGold', 'diving_treasure_drop_off.mp3', 'phase_4/audio/sfx/') self.addSound('getGold', 'diving_treasure_pick_up.mp3', 'phase_4/audio/sfx/') self.swimSound = loader.loadSfx('phase_4/audio/sfx/diving_swim_loop.wav') diff --git a/toontown/minigame/DistributedIceGame.py b/toontown/minigame/DistributedIceGame.py index f8b2714..2ffc71e 100644 --- a/toontown/minigame/DistributedIceGame.py +++ b/toontown/minigame/DistributedIceGame.py @@ -113,7 +113,7 @@ class DistributedIceGame(DistributedMinigame.DistributedMinigame, DistributedIce def load(self): self.notify.debug('load') DistributedMinigame.DistributedMinigame.load(self) - self.music = base.loadMusic('phase_4/audio/bgm/MG_IceGame.mid') + self.music = base.loader.loadMusic('phase_4/audio/bgm/MG_IceGame.mid') self.gameBoard = loader.loadModel('phase_4/models/minigames/ice_game_icerink') background = loader.loadModel('phase_4/models/minigames/ice_game_2d') background.reparentTo(self.gameBoard) diff --git a/toontown/minigame/DistributedMazeGame.py b/toontown/minigame/DistributedMazeGame.py index 67c9f38..9b9c1ed 100644 --- a/toontown/minigame/DistributedMazeGame.py +++ b/toontown/minigame/DistributedMazeGame.py @@ -530,7 +530,7 @@ class DistributedMazeGame(DistributedMinigame): model.removeNode() self.treasureModel.setScale(1.6) self.treasureModel.setP(-90) - self.music = base.loadMusic('phase_4/audio/bgm/MG_toontag.mid') + self.music = base.loader.loadMusic('phase_4/audio/bgm/MG_toontag.mid') self.toonHitTracks = {} self.scorePanels = [] diff --git a/toontown/minigame/DistributedPairingGame.py b/toontown/minigame/DistributedPairingGame.py index e862da4..c955fa5 100644 --- a/toontown/minigame/DistributedPairingGame.py +++ b/toontown/minigame/DistributedPairingGame.py @@ -119,7 +119,7 @@ class DistributedPairingGame(DistributedMinigame): self.__textGen.setAlign(TextNode.ACenter) self.sndPerfect = base.loader.loadSfx('phase_4/audio/sfx/MG_pairing_all_matched.mp3') self.calcBonusTraversal() - self.music = base.loadMusic('phase_4/audio/bgm/MG_Pairing.mid') + self.music = base.loader.loadMusic('phase_4/audio/bgm/MG_Pairing.mid') self.matchSfx = base.loader.loadSfx('phase_4/audio/sfx/MG_pairing_match.mp3') self.matchWithBonusSfx = base.loader.loadSfx('phase_4/audio/sfx/MG_pairing_match_bonus_both.mp3') self.signalSfx = [] diff --git a/toontown/minigame/DistributedPatternGame.py b/toontown/minigame/DistributedPatternGame.py index ab842f3..3f675bf 100644 --- a/toontown/minigame/DistributedPatternGame.py +++ b/toontown/minigame/DistributedPatternGame.py @@ -91,7 +91,7 @@ class DistributedPatternGame(DistributedMinigame): self.incorrectSound = base.loader.loadSfx('phase_4/audio/sfx/MG_neg_buzzer.wav') self.perfectSound = base.loader.loadSfx('phase_4/audio/sfx/MG_win.mp3') self.fallSound = base.loader.loadSfx('phase_4/audio/sfx/MG_Tag_A.mp3') - self.music = base.loadMusic(self.bgm) + self.music = base.loader.loadMusic(self.bgm) self.waitingText = DirectLabel(text=self.strPleaseWait, text_fg=(0.9, 0.9, 0.9, 1.0), frameColor=(1, 1, 1, 0), text_font=ToontownGlobals.getSignFont(), pos=(0, 0, -.78), scale=0.12) self.roundText = DirectLabel(text=self.strRound % 1, text_fg=self.normalTextColor, frameColor=(1, 1, 1, 0), text_font=ToontownGlobals.getSignFont(), pos=(0.014, 0, -.84), scale=0.12) self.roundText.hide() diff --git a/toontown/minigame/DistributedPhotoGame.py b/toontown/minigame/DistributedPhotoGame.py index 1cc859f..16be18c 100644 --- a/toontown/minigame/DistributedPhotoGame.py +++ b/toontown/minigame/DistributedPhotoGame.py @@ -132,7 +132,7 @@ class DistributedPhotoGame(DistributedMinigame, PhotoGameBase.PhotoGameBase): self.tripodModel = loader.loadModel('phase_4/models/minigames/toon_cannon') self.filmPanel = DirectLabel(parent=hidden, relief=None, pos=(1.16, 0.0, 0.45), scale=0.65, text=str(self.filmCount), text_scale=0.2, text_fg=(0.95, 0.95, 0, 1), text_pos=(0.08, -0.15), text_font=ToontownGlobals.getSignFont(), image=self.filmImage, image_scale=Point3(1.0, 0.0, 0.85)) self.filmPanelTitle = DirectLabel(parent=self.filmPanel, relief=None, pos=(0.08, 0, 0.04), scale=0.08, text=TTLocalizer.PhotoGameFilm, text_fg=(0.95, 0.95, 0, 1), text_shadow=(0, 0, 0, 1)) - self.music = base.loadMusic('phase_4/audio/bgm/MG_cannon_game.mid') + self.music = base.loader.loadMusic('phase_4/audio/bgm/MG_cannon_game.mid') self.sndPhotoMove = base.loader.loadSfx('phase_4/audio/sfx/MG_cannon_adjust.mp3') self.sndPhotoFire = base.loader.loadSfx('phase_4/audio/sfx/MG_cannon_fire_alt.mp3') self.sndWin = base.loader.loadSfx('phase_4/audio/sfx/MG_win.mp3') diff --git a/toontown/minigame/DistributedRaceGame.py b/toontown/minigame/DistributedRaceGame.py index 60aa02a..384ad49 100644 --- a/toontown/minigame/DistributedRaceGame.py +++ b/toontown/minigame/DistributedRaceGame.py @@ -299,7 +299,7 @@ class DistributedRaceGame(DistributedMinigame): self.dice2, self.dice3, self.dice4] - self.music = base.loadMusic('phase_4/audio/bgm/minigame_race.mid') + self.music = base.loader.loadMusic('phase_4/audio/bgm/minigame_race.mid') self.posBuzzer = base.loader.loadSfx('phase_4/audio/sfx/MG_pos_buzzer.wav') self.negBuzzer = base.loader.loadSfx('phase_4/audio/sfx/MG_neg_buzzer.wav') self.winSting = base.loader.loadSfx('phase_4/audio/sfx/MG_win.mp3') diff --git a/toontown/minigame/DistributedRingGame.py b/toontown/minigame/DistributedRingGame.py index 8602e03..49b5081 100644 --- a/toontown/minigame/DistributedRingGame.py +++ b/toontown/minigame/DistributedRingGame.py @@ -80,7 +80,7 @@ class DistributedRingGame(DistributedMinigame): self.notify.debug('load') DistributedMinigame.load(self) self.defineConstants() - self.music = base.loadMusic('phase_4/audio/bgm/MG_toontag.mid') + self.music = base.loader.loadMusic('phase_4/audio/bgm/MG_toontag.mid') self.sndAmbience = base.loader.loadSfx('phase_4/audio/sfx/AV_ambient_water.mp3') self.sndPerfect = base.loader.loadSfx('phase_4/audio/sfx/ring_perfect.mp3') loadBase = 'phase_4/models/minigames/' diff --git a/toontown/minigame/DistributedTagGame.py b/toontown/minigame/DistributedTagGame.py index 242f85b..4d58ece 100644 --- a/toontown/minigame/DistributedTagGame.py +++ b/toontown/minigame/DistributedTagGame.py @@ -50,7 +50,7 @@ class DistributedTagGame(DistributedMinigame): self.itText.hide() self.sky = loader.loadModel('phase_3.5/models/props/TT_sky') self.ground = loader.loadModel('phase_4/models/minigames/tag_arena') - self.music = base.loadMusic('phase_4/audio/bgm/MG_toontag.mid') + self.music = base.loader.loadMusic('phase_4/audio/bgm/MG_toontag.mid') self.tagSfx = base.loader.loadSfx('phase_4/audio/sfx/MG_Tag_C.mp3') self.itPointer = loader.loadModel('phase_4/models/minigames/bboard-pointer') self.tracks = [] diff --git a/toontown/minigame/DistributedTargetGame.py b/toontown/minigame/DistributedTargetGame.py index cfc06b5..982970b 100644 --- a/toontown/minigame/DistributedTargetGame.py +++ b/toontown/minigame/DistributedTargetGame.py @@ -266,7 +266,7 @@ class DistributedTargetGame(DistributedMinigame): score3Label, score4Label] self.scoreboard.hide() - self.music = base.loadMusic('phase_4/audio/bgm/MG_Diving.mid') + self.music = base.loader.loadMusic('phase_4/audio/bgm/MG_Diving.mid') self.sndAmbience = None self.skyListLow = [] self.skyListMid = [] diff --git a/toontown/minigame/DistributedTravelGame.py b/toontown/minigame/DistributedTravelGame.py index 0610157..3738d10 100644 --- a/toontown/minigame/DistributedTravelGame.py +++ b/toontown/minigame/DistributedTravelGame.py @@ -235,7 +235,7 @@ class DistributedTravelGame(DistributedMinigame): turnTable.removeNode() self.loadGui() self.introMovie = self.getIntroMovie() - self.music = base.loadMusic('phase_4/audio/bgm/MG_Travel.mid') + self.music = base.loader.loadMusic('phase_4/audio/bgm/MG_Travel.mid') self.flashWinningBeansTrack = None return diff --git a/toontown/minigame/DistributedTugOfWarGame.py b/toontown/minigame/DistributedTugOfWarGame.py index 2eb4162..56cf0aa 100644 --- a/toontown/minigame/DistributedTugOfWarGame.py +++ b/toontown/minigame/DistributedTugOfWarGame.py @@ -125,7 +125,7 @@ class DistributedTugOfWarGame(DistributedMinigame): self.correctSound = base.loader.loadSfx('phase_4/audio/sfx/MG_pos_buzzer.wav') self.sndHitWater = base.loader.loadSfx('phase_4/audio/sfx/MG_cannon_splash.mp3') self.whistleSound = base.loader.loadSfx('phase_4/audio/sfx/AA_sound_whistle.mp3') - self.music = base.loadMusic(self.bgm) + self.music = base.loader.loadMusic(self.bgm) self.roundText = DirectLabel(text=' ', text_fg=(0, 1, 0, 1), frameColor=(1, 1, 1, 0), text_font=ToontownGlobals.getSignFont(), pos=(0.014, 0, -.84), scale=0.2) self.powerMeter = MinigamePowerMeter.MinigamePowerMeter(17) self.powerMeter.reparentTo(aspect2d) diff --git a/toontown/minigame/DistributedVineGame.py b/toontown/minigame/DistributedVineGame.py index 8caf5c5..f2e7254 100644 --- a/toontown/minigame/DistributedVineGame.py +++ b/toontown/minigame/DistributedVineGame.py @@ -95,7 +95,7 @@ class DistributedVineGame(DistributedMinigame): self.notify.debug('load') DistributedMinigame.load(self) self.defineConstants() - self.music = base.loadMusic('phase_4/audio/bgm/MG_Vine.mid') + self.music = base.loader.loadMusic('phase_4/audio/bgm/MG_Vine.mid') self.gameAssets = loader.loadModel('phase_4/models/minigames/vine_game') self.gameBoard = self.gameAssets.find('**/background') self.gameBoard.reparentTo(render) diff --git a/toontown/minigame/PurchaseBase.py b/toontown/minigame/PurchaseBase.py index 1d14c40..c4547f8 100644 --- a/toontown/minigame/PurchaseBase.py +++ b/toontown/minigame/PurchaseBase.py @@ -22,7 +22,7 @@ class PurchaseBase(StateData.StateData): def load(self, purchaseModels = None): if purchaseModels == None: purchaseModels = loader.loadModel('phase_4/models/gui/purchase_gui') - self.music = base.loadMusic('phase_4/audio/bgm/FF_safezone.mid') + self.music = base.loader.loadMusic('phase_4/audio/bgm/FF_safezone.mid') self.jarImage = purchaseModels.find('**/Jar') self.jarImage.reparentTo(hidden) self.frame = DirectFrame(relief=None) diff --git a/toontown/minigame/ToonBlitzAssetMgr.py b/toontown/minigame/ToonBlitzAssetMgr.py index 00a7278..6a0dd7b 100644 --- a/toontown/minigame/ToonBlitzAssetMgr.py +++ b/toontown/minigame/ToonBlitzAssetMgr.py @@ -46,7 +46,7 @@ class ToonBlitzAssetMgr(DirectObject): dropPlane.addSolid(plane) dropPlane.setCollideMask(ToontownGlobals.FloorBitmask) self.world.attachNewNode(dropPlane) - self.gameMusic = base.loadMusic('phase_4/audio/bgm/MG_TwoDGame.mid') + self.gameMusic = base.loader.loadMusic('phase_4/audio/bgm/MG_TwoDGame.mid') self.treasureGrabSound = loader.loadSfx('phase_4/audio/sfx/SZ_DD_treasure.mp3') self.sndOof = base.loader.loadSfx('phase_4/audio/sfx/MG_cannon_hit_dirt.mp3') self.soundJump = base.loader.loadSfx('phase_4/audio/sfx/MG_sfx_vine_game_jump.mp3') diff --git a/toontown/parties/DistributedPartyJukeboxActivityBase.py b/toontown/parties/DistributedPartyJukeboxActivityBase.py index 9e3a8c0..aa82ef0 100644 --- a/toontown/parties/DistributedPartyJukeboxActivityBase.py +++ b/toontown/parties/DistributedPartyJukeboxActivityBase.py @@ -165,7 +165,7 @@ class DistributedPartyJukeboxActivityBase(DistributedPartyActivity): return def __play(self, phase, filename, length): - self.music = base.loadMusic((MUSIC_PATH + '%s') % (phase, filename)) + self.music = base.loader.loadMusic((MUSIC_PATH + '%s') % (phase, filename)) if self.music: if self.__checkPartyValidity() and hasattr(base.cr.playGame.getPlace().loader, 'music') and base.cr.playGame.getPlace().loader.music: base.cr.playGame.getPlace().loader.music.stop() diff --git a/toontown/racing/DistributedRace.py b/toontown/racing/DistributedRace.py index 5e0d55c..b1bb2a9 100644 --- a/toontown/racing/DistributedRace.py +++ b/toontown/racing/DistributedRace.py @@ -106,7 +106,7 @@ class DistributedRace(DistributedObject.DistributedObject): self.notify.debug('announceGenerate: %s' % self.doId) DistributedObject.DistributedObject.announceGenerate(self) musicFile = self.BGM_BaseDir + RaceGlobals.TrackDict[self.trackId][7] - self.raceMusic = base.loadMusic(musicFile) + self.raceMusic = base.loader.loadMusic(musicFile) base.playMusic(self.raceMusic, looping=1, volume=0.8) camera.reparentTo(render) if self.trackId in (RaceGlobals.RT_Urban_1, diff --git a/toontown/safezone/SafeZoneLoader.py b/toontown/safezone/SafeZoneLoader.py index a8a99fb..6d459dd 100644 --- a/toontown/safezone/SafeZoneLoader.py +++ b/toontown/safezone/SafeZoneLoader.py @@ -36,8 +36,8 @@ class SafeZoneLoader(StateData.StateData): return def load(self): - self.music = base.loadMusic(self.musicFile) - self.activityMusic = base.loadMusic(self.activityMusicFile) + self.music = base.loader.loadMusic(self.musicFile) + self.activityMusic = base.loader.loadMusic(self.activityMusicFile) self.createSafeZone(self.dnaFile) self.parentFSMState.addChild(self.fsm) diff --git a/toontown/suit/DistributedBossCog.py b/toontown/suit/DistributedBossCog.py index c3c2d49..94f96bf 100644 --- a/toontown/suit/DistributedBossCog.py +++ b/toontown/suit/DistributedBossCog.py @@ -907,11 +907,11 @@ class DistributedBossCog(DistributedAvatar.DistributedAvatar, BossCog.BossCog): self.zapLocalToon(ToontownGlobals.BossCogAreaAttack) def loadEnvironment(self): - self.elevatorMusic = base.loadMusic('phase_7/audio/bgm/tt_elevator.mid') - self.stingMusic = base.loadMusic('phase_7/audio/bgm/encntr_suit_winning_indoor.mid') - self.battleOneMusic = base.loadMusic('phase_3.5/audio/bgm/encntr_general_bg.mid') - self.battleThreeMusic = base.loadMusic('phase_7/audio/bgm/encntr_suit_winning_indoor.mid') - self.epilogueMusic = base.loadMusic('phase_9/audio/bgm/encntr_hall_of_fame.mid') + self.elevatorMusic = base.loader.loadMusic('phase_7/audio/bgm/tt_elevator.mid') + self.stingMusic = base.loader.loadMusic('phase_7/audio/bgm/encntr_suit_winning_indoor.mid') + self.battleOneMusic = base.loader.loadMusic('phase_3.5/audio/bgm/encntr_general_bg.mid') + self.battleThreeMusic = base.loader.loadMusic('phase_7/audio/bgm/encntr_suit_winning_indoor.mid') + self.epilogueMusic = base.loader.loadMusic('phase_9/audio/bgm/encntr_hall_of_fame.mid') def unloadEnvironment(self): pass diff --git a/toontown/suit/DistributedBossbotBoss.py b/toontown/suit/DistributedBossbotBoss.py index db9af37..736a27f 100644 --- a/toontown/suit/DistributedBossbotBoss.py +++ b/toontown/suit/DistributedBossbotBoss.py @@ -165,10 +165,10 @@ class DistributedBossbotBoss(DistributedBossCog.DistributedBossCog, FSM.FSM): planeNode.setCollideMask(ToontownGlobals.PieBitmask) self.geom.attachNewNode(planeNode) self.geom.reparentTo(render) - self.promotionMusic = base.loadMusic('phase_7/audio/bgm/encntr_suit_winning_indoor.mid') - self.betweenPhaseMusic = base.loadMusic('phase_9/audio/bgm/encntr_toon_winning.mid') - self.phaseTwoMusic = base.loadMusic('phase_12/audio/bgm/BossBot_CEO_v1.mid') - self.phaseFourMusic = base.loadMusic('phase_12/audio/bgm/BossBot_CEO_v2.mid') + self.promotionMusic = base.loader.loadMusic('phase_7/audio/bgm/encntr_suit_winning_indoor.mid') + self.betweenPhaseMusic = base.loader.loadMusic('phase_9/audio/bgm/encntr_toon_winning.mid') + self.phaseTwoMusic = base.loader.loadMusic('phase_12/audio/bgm/BossBot_CEO_v1.mid') + self.phaseFourMusic = base.loader.loadMusic('phase_12/audio/bgm/BossBot_CEO_v2.mid') self.pickupFoodSfx = loader.loadSfx('phase_6/audio/sfx/SZ_MM_gliss.mp3') self.explodeSfx = loader.loadSfx('phase_4/audio/sfx/firework_distance_02.mp3') diff --git a/toontown/suit/DistributedLawbotBoss.py b/toontown/suit/DistributedLawbotBoss.py index 0d8b10d..2161d83 100644 --- a/toontown/suit/DistributedLawbotBoss.py +++ b/toontown/suit/DistributedLawbotBoss.py @@ -390,9 +390,9 @@ class DistributedLawbotBoss(DistributedBossCog.DistributedBossCog, FSM.FSM): elevatorModel = loader.loadModel('phase_11/models/lawbotHQ/LB_Elevator') elevatorModel.reparentTo(self.elevatorEntrance) self.setupElevator(elevatorModel) - self.promotionMusic = base.loadMusic('phase_7/audio/bgm/encntr_suit_winning_indoor.mid') - self.betweenBattleMusic = base.loadMusic('phase_9/audio/bgm/encntr_toon_winning.mid') - self.battleTwoMusic = base.loadMusic('phase_11/audio/bgm/LB_juryBG.mid') + self.promotionMusic = base.loader.loadMusic('phase_7/audio/bgm/encntr_suit_winning_indoor.mid') + self.betweenBattleMusic = base.loader.loadMusic('phase_9/audio/bgm/encntr_toon_winning.mid') + self.battleTwoMusic = base.loader.loadMusic('phase_11/audio/bgm/LB_juryBG.mid') floor = self.geom.find('**/MidVaultFloor1') if floor.isEmpty(): floor = self.geom.find('**/CR3_Floor') diff --git a/toontown/suit/DistributedSellbotBoss.py b/toontown/suit/DistributedSellbotBoss.py index 09c05b1..b9825ec 100644 --- a/toontown/suit/DistributedSellbotBoss.py +++ b/toontown/suit/DistributedSellbotBoss.py @@ -549,9 +549,9 @@ class DistributedSellbotBoss(DistributedBossCog.DistributedBossCog, FSM.FSM): self.rope.ropeNode.setUvScale(0.8) self.rope.setTexture(self.cage.findTexture('hq_chain')) self.rope.setTransparency(1) - self.promotionMusic = base.loadMusic('phase_7/audio/bgm/encntr_suit_winning_indoor.mid') - self.betweenBattleMusic = base.loadMusic('phase_9/audio/bgm/encntr_toon_winning.mid') - self.battleTwoMusic = base.loadMusic('phase_7/audio/bgm/encntr_suit_winning_indoor.mid') + self.promotionMusic = base.loader.loadMusic('phase_7/audio/bgm/encntr_suit_winning_indoor.mid') + self.betweenBattleMusic = base.loader.loadMusic('phase_9/audio/bgm/encntr_toon_winning.mid') + self.battleTwoMusic = base.loader.loadMusic('phase_7/audio/bgm/encntr_suit_winning_indoor.mid') self.geom.reparentTo(render) def unloadEnvironment(self): diff --git a/toontown/town/TownLoader.py b/toontown/town/TownLoader.py index 5892d42..e6a1550 100644 --- a/toontown/town/TownLoader.py +++ b/toontown/town/TownLoader.py @@ -51,9 +51,9 @@ class TownLoader(StateData.StateData): self.loadBattleAnims() self.branchZone = ZoneUtil.getBranchZone(zoneId) self.canonicalBranchZone = ZoneUtil.getCanonicalBranchZone(zoneId) - self.music = base.loadMusic(self.musicFile) - self.activityMusic = base.loadMusic(self.activityMusicFile) - self.battleMusic = base.loadMusic('phase_3.5/audio/bgm/encntr_general_bg.mid') + self.music = base.loader.loadMusic(self.musicFile) + self.activityMusic = base.loader.loadMusic(self.activityMusicFile) + self.battleMusic = base.loader.loadMusic('phase_3.5/audio/bgm/encntr_general_bg.mid') self.townBattle = TownBattle.TownBattle(self.townBattleDoneEvent) self.townBattle.load()