From 460587cbd7c1dbac28d771a82f3cba52910a75c8 Mon Sep 17 00:00:00 2001 From: John Cote Date: Sat, 9 May 2015 03:04:51 -0400 Subject: [PATCH] Cleanup and typo fix. --- toontown/battle/DistributedBattleBaseAI.py | 5 ++--- toontown/hood/SkyUtil.py | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/toontown/battle/DistributedBattleBaseAI.py b/toontown/battle/DistributedBattleBaseAI.py index 3abcb11a..7ff920cb 100644 --- a/toontown/battle/DistributedBattleBaseAI.py +++ b/toontown/battle/DistributedBattleBaseAI.py @@ -1136,16 +1136,15 @@ class DistributedBattleBaseAI(DistributedObjectAI.DistributedObjectAI, BattleBas petProxy.setSurprise(pet.getSurprise()) pet.requestDelete() def deleted(task): - petProxy.doNotDeallocateChannel = True + petProxy.doNotDeallocateChannel = True petProxy.generateWithRequiredAndId(petId, self.air.districtId, self.zoneId) petProxy.broadcastDominantMood() self.pets[toonId] = petProxy return task.done - + self.acceptOnce(self.air.getAvatarExitEvent(petId), lambda: taskMgr.doMethodLater(0, deleted, self.uniqueName('petdel-%d' % petId))) - else: self.notify.warning('error generating petProxy: %s' % petId) diff --git a/toontown/hood/SkyUtil.py b/toontown/hood/SkyUtil.py index 2868e120..012fc4ef 100644 --- a/toontown/hood/SkyUtil.py +++ b/toontown/hood/SkyUtil.py @@ -8,7 +8,7 @@ notify = directNotify.newCategory('SkyUtil') def cloudSkyTrack(task): task.h += globalClock.getDt() * 0.25 if task.cloud1.isEmpty() or task.cloud2.isEmpty(): - notify.warning("Couln't find clouds!") + notify.warning("Couldn't find clouds!") return Task.done task.cloud1.setH(task.h) @@ -34,4 +34,4 @@ def startCloudSky(hood, parent=camera, effects=CompassEffect.PRot | CompassEffec if not skyTrackTask.cloud1.isEmpty() and not skyTrackTask.cloud2.isEmpty(): taskMgr.add(skyTrackTask, 'skyTrack') else: - notify.warning("Couln't find clouds!") + notify.warning("Couldn't find clouds!")