diff --git a/toontown/parties/PartyEditor.py b/toontown/parties/PartyEditor.py index bac13a04..5a26add3 100755 --- a/toontown/parties/PartyEditor.py +++ b/toontown/parties/PartyEditor.py @@ -120,7 +120,7 @@ class PartyEditor(DirectObject, FSM): self.initPartyClock() if self.currentElement: - self.currentElement.checkSoldOutAndPaidStatusAndAffordability() + self.currentElement.checkSoldOutAndAffordability() def buyCurrentElement(self): if self.currentElement: @@ -151,7 +151,7 @@ class PartyEditor(DirectObject, FSM): self.elementList.scrollTo(0) self.elementList['items'][0].elementSelectedFromList() self.currentElement = self.elementList['items'][self.elementList.getSelectedIndex()] - self.currentElement.checkSoldOutAndPaidStatusAndAffordability() + self.currentElement.checkSoldOutAndAffordability() self.partyPlanner.instructionLabel['text'] = TTLocalizer.PartyPlannerEditorInstructionsIdle self.updateCostsAndBank() self.handleMutuallyExclusiveActivities() diff --git a/toontown/parties/PartyEditorGridElement.py b/toontown/parties/PartyEditorGridElement.py index 1f2c9ea4..3023bdb0 100755 --- a/toontown/parties/PartyEditorGridElement.py +++ b/toontown/parties/PartyEditorGridElement.py @@ -13,11 +13,11 @@ from toontown.parties import PartyUtils class PartyEditorGridElement(DirectButton): notify = directNotify.newCategory('PartyEditorGridElement') - def __init__(self, partyEditor, id, isDecoration, checkSoldOutAndPaidStatusAndAffordability, **kw): + def __init__(self, partyEditor, id, isDecoration, checkSoldOutAndAffordability, **kw): self.partyEditor = partyEditor self.id = id self.isDecoration = isDecoration - self.checkSoldOutAndPaidStatusAndAffordability = checkSoldOutAndPaidStatusAndAffordability + self.checkSoldOutAndAffordability = checkSoldOutAndAffordability if self.isDecoration: self.name = TTLocalizer.PartyDecorationNameDict[self.id]['editor'] colorList = ((1.0, 1.0, 1.0, 1.0), @@ -218,7 +218,7 @@ class PartyEditorGridElement(DirectButton): self.partyEditor.handleMutuallyExclusiveActivities() else: self.stash() - self.checkSoldOutAndPaidStatusAndAffordability() + self.checkSoldOutAndAffordability() return def placeInPartyGrounds(self, desiredXY = None): @@ -230,7 +230,7 @@ class PartyEditorGridElement(DirectButton): self.partyEditor.partyEditorGrid.registerNewElement(self, self.centerGridSquare, self.getGridSize()) self.partyEditor.updateCostsAndBank() self.partyEditor.partyPlanner.instructionLabel['text'] = TTLocalizer.PartyPlannerEditorInstructionsPartyGrounds - self.checkSoldOutAndPaidStatusAndAffordability() + self.checkSoldOutAndAffordability() return True else: return False diff --git a/toontown/parties/PartyEditorListElement.py b/toontown/parties/PartyEditorListElement.py index 5e117bc2..4c9e1bd1 100755 --- a/toontown/parties/PartyEditorListElement.py +++ b/toontown/parties/PartyEditorListElement.py @@ -73,11 +73,11 @@ class PartyEditorListElement(DirectButton): self.partyEditorGridElements = [] if self.isDecoration: for i in xrange(PartyGlobals.DecorationInformationDict[self.id]['limitPerParty']): - self.partyEditorGridElements.append(PartyEditorGridElement(self.partyEditor, self.id, self.isDecoration, self.checkSoldOutAndPaidStatusAndAffordability)) + self.partyEditorGridElements.append(PartyEditorGridElement(self.partyEditor, self.id, self.isDecoration, self.checkSoldOutAndAffordability)) else: for i in xrange(PartyGlobals.ActivityInformationDict[self.id]['limitPerParty']): - self.partyEditorGridElements.append(PartyEditorGridElement(self.partyEditor, self.id, self.isDecoration, self.checkSoldOutAndPaidStatusAndAffordability)) + self.partyEditorGridElements.append(PartyEditorGridElement(self.partyEditor, self.id, self.isDecoration, self.checkSoldOutAndAffordability)) self.activeGridElementIndex = -1 self.adjustForUnreleased() @@ -113,12 +113,12 @@ class PartyEditorListElement(DirectButton): self.partyEditor.partyPlanner.elementDescriptionNode.setText(TTLocalizer.PartyActivityNameDict[self.id]['description']) self.partyEditor.partyPlanner.elementPriceNode.setText('%d %s' % (PartyGlobals.ActivityInformationDict[self.id]['cost'], TTLocalizer.PartyPlannerBeans)) self.partyEditor.partyPlanner.elementTitleLabel['text'] = self.name - self.checkSoldOutAndPaidStatusAndAffordability() + self.checkSoldOutAndAffordability() - def checkSoldOutAndPaidStatusAndAffordability(self): + def checkSoldOutAndAffordability(self): if self.partyEditor.currentElement != self: if self.partyEditor.currentElement is not None: - self.partyEditor.currentElement.checkSoldOutAndPaidStatusAndAffordability() + self.partyEditor.currentElement.checkSoldOutAndAffordability() return if self.isDecoration: infoDict = PartyGlobals.DecorationInformationDict @@ -178,7 +178,7 @@ class PartyEditorListElement(DirectButton): self.activeGridElementIndex = i return True else: - self.checkSoldOutAndPaidStatusAndAffordability() + self.checkSoldOutAndAffordability() return False def released(self, mouseEvent): diff --git a/toontown/uberdog/DistributedPartyManager.py b/toontown/uberdog/DistributedPartyManager.py index 14aa3979..8e732f15 100755 --- a/toontown/uberdog/DistributedPartyManager.py +++ b/toontown/uberdog/DistributedPartyManager.py @@ -16,6 +16,7 @@ class DistributedPartyManager(DistributedObject): def __init__(self, cr): DistributedObject.__init__(self, cr) base.cr.partyManager = self + self.allowUnreleased = False self.partyPlannerStyle = None self.partyPlannerName = None self.showDoid = False @@ -41,6 +42,16 @@ class DistributedPartyManager(DistributedObject): def deallocateZoneIdFromPlannedParty(self, zoneId): self.sendUpdate('freeZoneIdFromPlannedParty', [base.localAvatar.doId, zoneId]) + def allowUnreleasedClient(self): + return self.allowUnreleased + + def setAllowUnreleaseClient(self, newValue): + self.allowUnreleased = newValue + + def toggleAllowUnreleasedClient(self): + self.allowUnreleased = not self.allowUnreleased + return self.allowUnreleased + def sendAddParty(self, hostId, startTime, endTime, isPrivate, inviteTheme, activities, decorations, inviteeIds): self.sendUpdate('addPartyRequest', [hostId, startTime, diff --git a/toontown/uberdog/DistributedPartyManagerAI.py b/toontown/uberdog/DistributedPartyManagerAI.py index 4c59acfd..fc021d58 100755 --- a/toontown/uberdog/DistributedPartyManagerAI.py +++ b/toontown/uberdog/DistributedPartyManagerAI.py @@ -57,6 +57,10 @@ class DistributedPartyManagerAI(DistributedObjectAI): # well fuck. ud died. self.notify.warning("uberdog lost!") + def canBuyParties(self): + return True + + def addPartyRequest(self, hostId, startTime, endTime, isPrivate, inviteTheme, activities, decorations, inviteeIds): if hostId != simbase.air.getAvatarIdFromSender(): self.air.writeServerEvent('suspicious',simbase.air.getAvatarIdFromSender(),'Toon tried to create a party as someone else!')