Poodletooth-iLand/toontown/building/PetshopBuildingAI.py

54 lines
1.8 KiB
Python
Raw Normal View History

from panda3d.core import *
2015-03-29 15:41:02 +00:00
from direct.directnotify import DirectNotifyGlobal
2015-03-03 22:10:12 +00:00
import DistributedDoorAI
import DistributedPetshopInteriorAI
2015-03-29 15:41:02 +00:00
import FADoorCodes
2015-03-03 22:10:12 +00:00
import DoorTypes
from toontown.toon import NPCToons
from toontown.toonbase import ToontownGlobals
2015-03-29 15:41:02 +00:00
from toontown.quest import Quests
from toontown.hood import ZoneUtil
2015-03-03 22:10:12 +00:00
class PetshopBuildingAI:
2015-03-29 15:41:02 +00:00
notify = DirectNotifyGlobal.directNotify.newCategory('PetshopBuildingAI')
2015-03-03 22:10:12 +00:00
def __init__(self, air, exteriorZone, interiorZone, blockNumber):
self.air = air
self.exteriorZone = exteriorZone
self.interiorZone = interiorZone
self.setup(blockNumber)
def cleanup(self):
for npc in self.npcs:
npc.requestDelete()
del self.npcs
self.door.requestDelete()
del self.door
self.insideDoor.requestDelete()
del self.insideDoor
self.interior.requestDelete()
del self.interior
def setup(self, blockNumber):
self.interior = DistributedPetshopInteriorAI.DistributedPetshopInteriorAI(
blockNumber, self.air, self.interiorZone)
self.interior.generateWithRequired(self.interiorZone)
self.npcs = NPCToons.createNpcsInZone(self.air, self.interiorZone)
2015-07-05 23:59:25 +00:00
2015-03-03 22:10:12 +00:00
door = DistributedDoorAI.DistributedDoorAI(
self.air, blockNumber, DoorTypes.EXT_STANDARD)
insideDoor = DistributedDoorAI.DistributedDoorAI(
self.air, blockNumber, DoorTypes.INT_STANDARD)
door.setOtherDoor(insideDoor)
insideDoor.setOtherDoor(door)
door.zoneId = self.exteriorZone
insideDoor.zoneId = self.interiorZone
door.generateWithRequired(self.exteriorZone)
insideDoor.generateWithRequired(self.interiorZone)
self.door = door
self.insideDoor = insideDoor
def createPet(self, ownerId, seed):
2015-07-05 23:59:25 +00:00
return