fixed doors

This commit is contained in:
Zach 2015-05-27 14:47:33 -05:00
parent 279c2913ec
commit 0b8f650966
4 changed files with 19 additions and 24 deletions

View file

@ -35,15 +35,23 @@ class BossLobbyGui(DirectFrame):
DirectFrame.__init__(self, relief=None)
self.initialiseoptions(BossLobbyGui.InitialFrame)
self.callback = callback
self.load()
self.selection = -1
self.load()
def destroy(self):
self.title.destroy()
for button in self.buttons:
button.destroy()
self.okButton.destroy()
self.cancelButton.destroy()
if hasattr(self, 'title') and self.title:
self.title.destroy()
del self.title
if hasattr(self, 'buttons') and len(self.buttons):
for button in self.buttons:
button.destroy()
del self.buttons
if hasattr(self, 'okButton') and self.okButton:
self.okButton.destroy()
del self.okButton
if hasattr(self, 'cancelButton') and self.cancelButton:
self.cancelButton.destroy()
del self.cancelButton
DirectFrame.destroy(self)
def load(self):
@ -68,18 +76,6 @@ class BossLobbyGui(DirectFrame):
private
])
def unload(self):
self.title.destroy()
self.public.destroy()
self.private.destroy()
self.okButton.destroy()
self.cancelButton.destroy()
del self.title
del self.public
del self.private
del self.okButton
del self.cancelButton
def setSelection(self, buttonId):
newSelection = self.buttons[buttonId]
if newSelection:
@ -114,6 +110,7 @@ class BossLobbyGui(DirectFrame):
def destroy(self):
if hasattr(self, 'frame') and self.frame:
self.frame.destroy()
del self.frame
DirectFrame.destroy(self)
def loadFrame(self, frameNum, args={}):

View file

@ -11,11 +11,12 @@ class DistributedCogHQExteriorDoor(DistributedCogHQDoor.DistributedCogHQDoor):
def __init__(self, cr):
DistributedCogHQDoor.DistributedCogHQDoor.__init__(self, cr)
self.lobbyGui = None
def selectLobby(self, avId):
self.lobbyGui = BossLobbyGui(self.sendConfirmation, avId)
def sendConfirmation(self, avId, status):
self.lobbyGui.destroy()
del self.lobbyGui
self.lobbyGui = None
self.sendUpdate('confirmEntrance', [avId, status])

View file

@ -7,12 +7,13 @@ from direct.fsm import State
from toontown.toonbase import ToontownGlobals
import CogDisguiseGlobals
from toontown.building import FADoorCodes
from toontown.building import DoorTypes
class DistributedCogHQExteriorDoorAI(DistributedCogHQDoorAI.DistributedCogHQDoorAI):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCogHQExteriorDoorAI')
def __init__(self, air, blockNumber, doorType, destinationZone, doorIndex = 0, lockValue = FADoorCodes.SB_DISGUISE_INCOMPLETE, swing = 3):
DistributedCogHQDoorAI.DistributedCogHQDoorAI.__init__(self, air, blockNumber, doorType, doorIndex, lockValue, swing)
DistributedCogHQDoorAI.DistributedCogHQDoorAI.__init__(self, air, blockNumber, doorType, destinationZone, doorIndex, lockValue, swing)
def requestEnter(self):
avId = self.air.getAvatarIdFromSender()

View file

@ -61,10 +61,6 @@ class CogHQAI:
doorIndex=intDoorIndex, lockValue=lock)
intDoor.zoneId = destinationZone
# it works with
# DistributedCogHQDoorAI.DistributedCogHQDoorAI
# so idfk
# figure it out
extDoor = DistributedCogHQExteriorDoorAI.DistributedCogHQExteriorDoorAI(
self.air, 0, DoorTypes.EXT_COGHQ, destinationZone,
doorIndex=extDoorIndex, lockValue=lock)