Added gagshops
This commit is contained in:
parent
7925624f7f
commit
7a4b976305
4 changed files with 13 additions and 16 deletions
|
@ -4,7 +4,7 @@ import cPickle
|
|||
from otp.ai.AIBaseGlobal import *
|
||||
import DistributedBuildingAI
|
||||
import HQBuildingAI
|
||||
#import GagshopBuildingAI
|
||||
import GagshopBuildingAI
|
||||
#import PetshopBuildingAI
|
||||
#from toontown.building.KartShopBuildingAI import KartShopBuildingAI
|
||||
#from toontown.building import DistributedAnimBuildingAI
|
||||
|
@ -202,11 +202,11 @@ class DistributedBuildingMgrAI:
|
|||
return building
|
||||
|
||||
def newGagshopBuilding(self, blockNumber):
|
||||
return
|
||||
dnaStore = self.air.dnaStoreMap[self.canonicalBranchID]
|
||||
exteriorZoneId = dnaStore.getBlock(blockNumber).zone
|
||||
exteriorZoneId = ZoneUtil.getTrueZoneId(exteriorZoneId, self.branchID)
|
||||
interiorZoneId = self.branchID - self.branchID % 100 + 500 + blockNumber
|
||||
self.notify.debug("Spawning GagShop ext: {0} int: {1}".format(exteriorZoneId, interiorZoneId))
|
||||
building = GagshopBuildingAI.GagshopBuildingAI(self.air, exteriorZoneId, interiorZoneId, blockNumber)
|
||||
self.__buildings[blockNumber] = building
|
||||
return building
|
||||
|
|
|
@ -1,17 +1,13 @@
|
|||
from direct.distributed import DistributedObjectAI
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.distributed.DistributedObjectAI import DistributedObjectAI
|
||||
|
||||
class DistributedGagshopInteriorAI(DistributedObjectAI):
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory("DistributedGagshopInteriorAI")
|
||||
class DistributedGagshopInteriorAI(DistributedObjectAI.DistributedObjectAI):
|
||||
|
||||
def __init__(self, air):
|
||||
DistributedObjectAI.__init__(self, air)
|
||||
self.zoneId = 0
|
||||
self.block = 0
|
||||
|
||||
def setZoneIdAndBlock(self, zoneId, block):
|
||||
self.zoneId = zoneId
|
||||
def __init__(self, block, air, zoneId):
|
||||
DistributedObjectAI.DistributedObjectAI.__init__(self, air)
|
||||
self.block = block
|
||||
|
||||
self.zoneId = zoneId
|
||||
|
||||
def getZoneIdAndBlock(self):
|
||||
return [self.zoneId, self.block]
|
||||
r = [self.zoneId, self.block]
|
||||
return r
|
||||
|
|
|
@ -7,6 +7,7 @@ from direct.task.Task import Task
|
|||
from toontown.toonbase import TTLocalizer
|
||||
from toontown.hood import ZoneUtil
|
||||
from toontown.toontowngui import TeaserPanel
|
||||
from otp.nametag.NametagConstants import *
|
||||
|
||||
class DistributedNPCClerk(DistributedNPCToonBase):
|
||||
|
||||
|
@ -98,7 +99,8 @@ class DistributedNPCClerk(DistributedNPCToonBase):
|
|||
self.setupAvatars(self.av)
|
||||
if self.isLocalToon:
|
||||
camera.wrtReparentTo(render)
|
||||
camera.lerpPosHpr(-5, 9, self.getHeight() - 0.5, -150, -2, 0, 1, other=self, blendType='easeOut', task=self.uniqueName('lerpCamera'))
|
||||
self.cameraLerp = LerpPosHprInterval(camera, 1, Point3(-5, 9, self.getHeight() - 0.5), Point3(-150, -2, 0), other=self, blendType='easeInOut')
|
||||
self.cameraLerp.start()
|
||||
self.setChatAbsolute(TTLocalizer.STOREOWNER_GREETING, CFSpeech | CFTimeout)
|
||||
if self.isLocalToon:
|
||||
taskMgr.doMethodLater(1.0, self.popupPurchaseGUI, self.uniqueName('popupPurchaseGUI'))
|
||||
|
|
|
@ -92,7 +92,6 @@ def createNPC(air, npcId, desc, zoneId, posIndex = 0, questCallback = None):
|
|||
elif type == NPC_HQ:
|
||||
npc = DistributedNPCToonAI.DistributedNPCToonAI(air, npcId, questCallback=questCallback, hq=1)
|
||||
elif type == NPC_CLERK:
|
||||
return False
|
||||
npc = DistributedNPCClerkAI.DistributedNPCClerkAI(air, npcId)
|
||||
elif type == NPC_TAILOR:
|
||||
return False
|
||||
|
|
Loading…
Reference in a new issue