general: base.loadMusic -> base.loader.loadMusic
base.loadMusic is deprecated
This commit is contained in:
parent
fee18165d1
commit
9c053371da
38 changed files with 56 additions and 56 deletions
|
@ -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):
|
||||
|
|
|
@ -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']),
|
||||
|
|
|
@ -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 = {}
|
||||
|
|
|
@ -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']),
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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')
|
||||
|
|
|
@ -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')
|
||||
|
|
|
@ -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')
|
||||
|
|
|
@ -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')
|
||||
|
|
|
@ -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')
|
||||
|
|
|
@ -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')
|
||||
|
|
|
@ -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')
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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 = []
|
||||
|
||||
|
|
|
@ -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 = []
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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')
|
||||
|
|
|
@ -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')
|
||||
|
|
|
@ -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/'
|
||||
|
|
|
@ -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 = []
|
||||
|
|
|
@ -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 = []
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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')
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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')
|
||||
|
||||
|
|
|
@ -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')
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in a new issue