Cleanup toontown/estate

This commit is contained in:
John Cote 2015-04-29 04:12:56 -04:00
parent 1ed2a72334
commit 4be89cbfb3
22 changed files with 91 additions and 121 deletions

View file

@ -3,4 +3,3 @@ from toontown.estate.DistributedStatuaryAI import DistributedStatuaryAI
class DistributedAnimatedStatuaryAI(DistributedStatuaryAI):
notify = DirectNotifyGlobal.directNotify.newCategory("DistributedAnimatedStatuaryAI")

View file

@ -49,7 +49,6 @@ class DistributedCannonAI(DistributedObjectAI):
self.avId = avId
self.d_setMovie(CannonGlobals.CANNON_MOVIE_LOAD)
self.acceptOnce(self.air.getAvatarExitEvent(avId), self.__handleUnexpectedExit, extraArgs=[avId])
else:
self.air.writeServerEvent('suspicious', avId, 'DistributedCannonAI.requestEnter cannon already occupied')
self.notify.warning('requestEnter() - cannon already occupied')

View file

@ -6,4 +6,3 @@ class DistributedChangingStatuaryAI(DistributedStatuaryAI):
def setGrowthLevel(self, todo0):
pass

View file

@ -25,12 +25,9 @@ class DistributedEstateAI(DistributedObjectAI):
self.lastEpochTimestamp = 0
self.rentalTimestamp = 0
self.houses = [None] * 6
self.pond = None
self.spots = []
self.targets = []
self.owner = None
def generate(self):
@ -46,7 +43,6 @@ class DistributedEstateAI(DistributedObjectAI):
target.generateWithRequired(self.zoneId)
self.targets.append(target)
spot = DistributedFishingSpotAI(self.air)
spot.setPondDoId(self.pond.getDoId())
spot.setPosHpr(49.1029, -124.805, 0.344704, 90, 0, 0)
@ -73,7 +69,6 @@ class DistributedEstateAI(DistributedObjectAI):
self.createTreasurePlanner()
def destroy(self):
for house in self.houses:
if house:
@ -144,7 +139,7 @@ class DistributedEstateAI(DistributedObjectAI):
def getDecorData(self):
return self.decorData
def setLastEpochTimeStamp(self, last): #how do I do this
def setLastEpochTimeStamp(self, last):
self.lastEpochTimestamp = last
def d_setLastEpochTimeStamp(self, last):
@ -293,7 +288,6 @@ class DistributedEstateAI(DistributedObjectAI):
def getSlot4ToonId(self):
return self.toons[4]
def setSlot4Items(self, items):
self.items[4] = items

View file

@ -18,4 +18,3 @@ class DistributedFireworksCannonAI(DistributedFireworkShowAI):
def setPosition(self, todo0, todo1, todo2):
pass

View file

@ -9,4 +9,3 @@ class DistributedFlowerAI(DistributedPlantBaseAI):
def setVariety(self, todo0):
pass

View file

@ -416,7 +416,6 @@ class DistributedFurnitureManagerAI(DistributedObjectAI):
def recoverDeletedItem(self, blob, index):
pass
def handleMessage(self, func, response, *args):
context = args[-1]
args = args[:-1]
@ -565,7 +564,6 @@ def fillAttic():
fm.saveToHouse()
return "everything has been moved to the attic"
@magicWord(category=CATEGORY_PROGRAMMER, types=[])
def emptyHouse():
"""

View file

@ -9,4 +9,3 @@ class DistributedGagTreeAI(DistributedPlantBaseAI):
def requestHarvest(self):
pass

View file

@ -6,4 +6,3 @@ class DistributedGardenAI(DistributedObjectAI):
def sendNewProp(self, todo0, todo1, todo2, todo3):
pass

View file

@ -6,4 +6,3 @@ class DistributedGardenBoxAI(DistributedLawnDecorAI):
def setTypeIndex(self, todo0):
pass

View file

@ -18,4 +18,3 @@ class DistributedGardenPlotAI(DistributedLawnDecorAI):
def plantNothing(self, todo0):
pass

View file

@ -63,7 +63,6 @@ class DistributedHouseAI(DistributedObjectAI):
self.sendUpdate('setHouseReady', [])
def delete(self):
self.door.requestDelete()
self.interiorDoor.requestDelete()

View file

@ -3,4 +3,3 @@ from toontown.building.DistributedDoorAI import DistributedDoorAI
class DistributedHouseDoorAI(DistributedDoorAI):
notify = DirectNotifyGlobal.directNotify.newCategory("DistributedHouseDoorAI")

View file

@ -30,4 +30,3 @@ class DistributedLawnDecorAI(DistributedNodeAI):
def interactionDenied(self, todo0):
pass

View file

@ -113,20 +113,16 @@ class DistributedPhoneAI(DistributedFurnitureItemAI):
ep = list(item.getEmblemPrices())
if len(ep) != 2:
return []
if all(ep):
ep[payMethod] = 0
else:
ep = item.getEmblemPrices()
return ep
def charge():
ep = _getEmblemPrices()
if ep:
av.subtractEmblems(ep)
av.takeMoney(item.getPrice(priceType))
if item.getDeliveryTime():

View file

@ -18,4 +18,3 @@ class DistributedPlantBaseAI(DistributedLawnDecorAI):
def waterPlantDone(self):
pass

View file

@ -12,4 +12,3 @@ class DistributedStatuaryAI(DistributedLawnDecorAI):
def setGrowthLevel(self, todo0):
pass

View file

@ -83,4 +83,3 @@ class DistributedTargetAI(DistributedObjectAI):
def delete(self):
taskMgr.remove(self.taskName('newGame'))
taskMgr.remove(self.taskName('gameover'))

View file

@ -6,4 +6,3 @@ class DistributedToonStatuaryAI(DistributedStatuaryAI):
def setOptional(self, todo0):
pass

View file

@ -109,7 +109,6 @@ class LoadPetFSM(FSM):
self.toon = toon
self.callback = callback
self.pet = None
self.done = False
def start(self):
@ -117,7 +116,6 @@ class LoadPetFSM(FSM):
if not self.petId in self.mgr.air.doId2do:
self.mgr.air.sendActivate(self.petId, self.mgr.air.districtId, self.estate.zoneId)
self.acceptOnce('generate-%d' % self.petId, self.__generated)
else:
self.__generated(self.mgr.air.doId2do[self.petId])