diff --git a/toontown/estate/DistributedCannon.py b/toontown/estate/DistributedCannon.py index 79588af3..96849318 100644 --- a/toontown/estate/DistributedCannon.py +++ b/toontown/estate/DistributedCannon.py @@ -1,29 +1,29 @@ -from pandac.PandaModules import * -from toontown.toonbase.ToonBaseGlobal import * -from toontown.toonbase import ToontownGlobals +from direct.controls.ControlManager import CollisionHandlerRayStart +from direct.distributed import DistributedObject from direct.distributed.ClockDelta import * -from direct.interval.IntervalGlobal import * from direct.fsm import ClassicFSM, State from direct.fsm import State +from direct.gui.DirectGui import * +from direct.interval.IntervalGlobal import * +from direct.task.Task import Task +import math +from pandac.PandaModules import * +from pandac.PandaModules import * + +import CannonGlobals +from toontown.effects import DustCloud +from toontown.effects import Splash +from toontown.effects import Wake +from toontown.minigame import CannonGameGlobals +from toontown.minigame import Trajectory +from toontown.nametag.NametagFloat3d import NametagFloat3d +from toontown.toon import ToonHead +from toontown.toonbase import TTLocalizer +from toontown.toonbase import ToontownGlobals from toontown.toonbase import ToontownGlobals from toontown.toonbase import ToontownTimer -from direct.task.Task import Task -from toontown.minigame import Trajectory -import math -from toontown.toon import ToonHead -from toontown.effects import Splash -from toontown.effects import DustCloud -from toontown.minigame import CannonGameGlobals -import CannonGlobals -from direct.gui.DirectGui import * -from pandac.PandaModules import * -from toontown.toonbase import TTLocalizer -from direct.distributed import DistributedObject -from toontown.effects import Wake -from direct.controls.ControlManager import CollisionHandlerRayStart +from toontown.toonbase.ToonBaseGlobal import * -from toontown.nametag.NametagFloat3d import NametagFloat3d -from toontown.nametag.Nametag import Nametag LAND_TIME = 2 WORLD_SCALE = 2.0 @@ -267,7 +267,7 @@ class DistributedCannon(DistributedObject.DistributedObject): self.curPinballScore = 0 self.curPinballMultiplier = 1 self.incrementPinballInfo(0, 0) - if self.cr.doId2do.has_key(self.avId): + if self.avId in self.cr.doId2do: self.av = self.cr.doId2do[self.avId] self.acceptOnce(self.av.uniqueName('disable'), self.__avatarGone) self.av.stopSmooth() @@ -844,7 +844,6 @@ class DistributedCannon(DistributedObject.DistributedObject): flyTask.info = info seqTask = Task.sequence(shootTask, smokeTask, flyTask) if self.av == base.localAvatar: - print 'disable controls' base.localAvatar.disableAvatarControls() taskMgr.add(seqTask, self.taskName('flyingToon') + '-' + str(avId)) self.acceptOnce(self.uniqueName('stopFlyTask'), self.__stopFlyTask) @@ -866,7 +865,6 @@ class DistributedCannon(DistributedObject.DistributedObject): def removeAvFromCannon(self): place = base.cr.playGame.getPlace() - print 'removeAvFromCannon' self.notify.debug('self.inWater = %s' % self.inWater) if place: if not hasattr(place, 'fsm'): @@ -895,7 +893,6 @@ class DistributedCannon(DistributedObject.DistributedObject): self.av.startSmooth() self.av.setScale(1, 1, 1) if self.av == base.localAvatar: - print 'enable controls' base.localAvatar.enableAvatarControls() self.ignore(self.av.uniqueName('disable')) self.__destroyToonModels() @@ -1163,7 +1160,6 @@ class DistributedCannon(DistributedObject.DistributedObject): if hitP[2] > ToontownGlobals.EstateWakeWaterHeight: self.notify.debug('we hit the ground before we hit water') self.__hitGround(avatar, pos, extraArgs) - print 'but not really' return self.inWater = 1 self.notify.debug('hit water') @@ -1246,7 +1242,7 @@ class DistributedCannon(DistributedObject.DistributedObject): for id in doIds: t = self.cr.doId2do.get(id) if t: - pos = t.nodePath.getPos() + pos = t.pos rad = 10.5 height = 10.0 t_impact = trajectory.checkCollisionWithCylinderSides(pos, rad, height) @@ -1512,7 +1508,7 @@ class DistributedCannon(DistributedObject.DistributedObject): (0, 1, 5, 4), (0, 4, 7, 3), (1, 2, 6, 5)] - for i in range(len(vertices)): + for i in xrange(len(vertices)): vertex = vertices[i] vertexWriter.addData3f(vertex[0], vertex[1], vertex[2]) colorWriter.addData4f(*colors[i]) @@ -1581,5 +1577,4 @@ class DistributedCannon(DistributedObject.DistributedObject): def turnOnBumperCollision(self, whatever = 0): if self.bumperCol: - self.bumperCol.setCollideMask(ToontownGlobals.WallBitmask) - + self.bumperCol.setCollideMask(ToontownGlobals.WallBitmask)# decompiled 0 files: 0 okay, 1 failed, 0 verify failed diff --git a/toontown/estate/DistributedEstateAI.py b/toontown/estate/DistributedEstateAI.py index b8df7120..213a080c 100644 --- a/toontown/estate/DistributedEstateAI.py +++ b/toontown/estate/DistributedEstateAI.py @@ -1,22 +1,28 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI -from direct.distributed.PyDatagramIterator import * -from direct.distributed.PyDatagram import * + from toontown.toonbase import ToontownGlobals + import HouseGlobals + import time import random + from toontown.fishing.DistributedFishingPondAI import DistributedFishingPondAI from toontown.fishing.DistributedFishingTargetAI import DistributedFishingTargetAI from toontown.fishing.DistributedPondBingoManagerAI import DistributedPondBingoManagerAI from toontown.fishing import FishingTargetGlobals + from toontown.safezone.DistributedFishingSpotAI import DistributedFishingSpotAI from toontown.safezone.SZTreasurePlannerAI import SZTreasurePlannerAI +from toontown.safezone import DistributedTreasureAI from toontown.safezone import TreasureGlobals + from DistributedGardenBoxAI import * from DistributedGagTreeAI import * from DistributedFlowerAI import * import GardenGlobals + from DistributedCannonAI import * from DistributedTargetAI import * import CannonGlobals @@ -26,6 +32,9 @@ NULL_TREES = [NULL_PLANT] * 8 NULL_FLOWERS = [NULL_PLANT] * 10 NULL_STATUARY = 0 +from direct.distributed.PyDatagramIterator import * +from direct.distributed.PyDatagram import * + def unpackGardenSetter(f): def w(klass, data): if data: @@ -181,7 +190,7 @@ class CannonRental(Rental): def destroy(self): self.estate.b_setClouds(0) Rental.destroy(self) - + def generateTreasures(self): doIds = [] z = 35 @@ -189,13 +198,13 @@ class CannonRental(Rental): for i in xrange(20): x = random.randint(100, 300) - 200 y = random.randint(100, 300) - 200 - treasure = DistributedTreasureAI.DistributedTreasureAI(self.estate.air, self, 9, x, y, z) + treasure = DistributedTreasureAI.DistributedTreasureAI(self.estate.air, self, 7, x, y, z) treasure.generateWithRequired(self.estate.zoneId) self.objects.add(treasure) doIds.append(treasure.doId) self.estate.sendUpdate("setTreasureIds", [doIds]) - + def grabAttempt(self, avId, treasureId): av = self.estate.air.doId2do.get(avId) if av == None: diff --git a/toontown/estate/DistributedTarget.py b/toontown/estate/DistributedTarget.py index 95bf8bf8..c56869de 100644 --- a/toontown/estate/DistributedTarget.py +++ b/toontown/estate/DistributedTarget.py @@ -155,12 +155,12 @@ class DistributedTarget(DistributedObject.DistributedObject): def showTimer(self): if base.localAvatar.animFSM.getCurrentState().getName() != 'ReadBook': - base.setCellsAvailable([base.rightCells[0]], 0) + base.setCellsActive([base.rightCells[0]], 0) self.timer.show() def hideTimer(self): self.timer.hide() - base.setCellsAvailable([base.rightCells[0]], 1) + base.setCellsActive([base.rightCells[0]], 1) def setPosition(self, x, y, z): self.geom.setPos(x, y, z) diff --git a/toontown/toonbase/ToontownGlobals.py b/toontown/toonbase/ToontownGlobals.py index 76909fc2..b27c73ac 100644 --- a/toontown/toonbase/ToontownGlobals.py +++ b/toontown/toonbase/ToontownGlobals.py @@ -43,8 +43,8 @@ BossbotHQCameraFar = 3000.0 BossbotHQCameraNear = 1.0 SpeedwayCameraFar = 8000.0 SpeedwayCameraNear = 1.0 -MaxMailboxContents = 30 -MaxHouseItems = 45 +MaxMailboxContents = 60 +MaxHouseItems = 250 MaxAccessories = 50 ExtraDeletedItems = 5 DeletedItemLifetime = 7 * 24 * 60 @@ -1688,4 +1688,4 @@ PropIdToColor = [ (0.93, 0.623, 0.196, 1), (0.96, 0.356, 0.839, 1), (0.196, 0.917, 0.929, 1) -] \ No newline at end of file +]