add support for custom views in factory

This commit is contained in:
Samir Naik 2003-11-12 03:31:44 +00:00
parent 85dae20f1f
commit 853432e4ff

View File

@ -12,6 +12,7 @@ import EntityCreator
import OnscreenText
import Task
import LevelUtil
import FactoryCameraViews
class DistributedLevel(DistributedObject.DistributedObject,
Level.Level):
@ -79,6 +80,10 @@ class DistributedLevel(DistributedObject.DistributedObject,
# add factory menu to SpeedChat
toonbase.localToon.chatMgr.chatInputSpeedChat.addFactoryMenu()
# add special camera views
self.factoryViews = FactoryCameraViews.FactoryCameraViews(self)
# the real required fields
def setLevelZoneId(self, zoneId):
# this is the zone that the level is in; we should listen to this
@ -301,7 +306,9 @@ class DistributedLevel(DistributedObject.DistributedObject,
DistributedObject.DistributedObject.delete(self)
# remove factory menu to SpeedChat
toonbase.localToon.chatMgr.chatInputSpeedChat.removeFactoryMenu()
# remove special camera views
del self.factoryViews
def getZoneNode(self, zoneNum):
return self.zoneNum2node[zoneNum]