From f784a15e1da2fbb5ae4cc86373d462c050601a31 Mon Sep 17 00:00:00 2001 From: DenialMC Date: Thu, 14 May 2015 20:34:00 +0300 Subject: [PATCH] You no longer need to wait any days to buy the items in the special menu.. and Loud, we start with 10000 beans not 15000!! --- astron/dclass/united.dc | 2 +- toontown/catalog/CatalogAccessoryItem.py | 22 +-- .../catalog/CatalogAccessoryItemGlobals.py | 3 +- toontown/catalog/CatalogClothingItem.py | 31 +--- toontown/catalog/CatalogEmoteItem.py | 20 +-- toontown/catalog/CatalogGenerator.py | 32 ++-- toontown/catalog/CatalogItem.py | 21 +-- toontown/catalog/CatalogItemPanel.py | 3 - toontown/catalog/CatalogScreen.py | 158 +++++++++--------- toontown/estate/DistributedPhoneAI.py | 3 - toontown/toonbase/TTLocalizerEnglish.py | 3 +- 11 files changed, 122 insertions(+), 176 deletions(-) diff --git a/astron/dclass/united.dc b/astron/dclass/united.dc index 5dfde674..ddf124ef 100644 --- a/astron/dclass/united.dc +++ b/astron/dclass/united.dc @@ -649,7 +649,7 @@ typedef int16 pair16[2]; dclass DistributedToon : DistributedPlayer { setDNAString(blob) required broadcast ownrecv db; setGM(uint16 = 0) required broadcast ownrecv db; - setMaxBankMoney(int16 maxMoney = 15000) required broadcast ownrecv db; + setMaxBankMoney(int16 maxMoney = 10000) required broadcast ownrecv db; setBankMoney(int16 money = 0) required broadcast ownrecv db; setMaxMoney(int16 maxMoney = 40) required broadcast ownrecv db; setMoney(int16 money = 0) required broadcast ownrecv db; diff --git a/toontown/catalog/CatalogAccessoryItem.py b/toontown/catalog/CatalogAccessoryItem.py index 225be227..2ec3cca8 100644 --- a/toontown/catalog/CatalogAccessoryItem.py +++ b/toontown/catalog/CatalogAccessoryItem.py @@ -10,9 +10,9 @@ from pandac.PandaModules import * class CatalogAccessoryItem(CatalogItem.CatalogItem): - def makeNewItem(self, accessoryType, loyaltyDays = 0): + def makeNewItem(self, accessoryType, isSpecial = False): self.accessoryType = accessoryType - self.loyaltyDays = loyaltyDays + self.isSpecial = isSpecial CatalogItem.CatalogItem.makeNewItem(self) def storedInTrunk(self): @@ -383,9 +383,9 @@ class CatalogAccessoryItem(CatalogItem.CatalogItem): CatalogItem.CatalogItem.decodeDatagram(self, di, versionNumber, store) self.accessoryType = di.getUint16() if versionNumber >= 6: - self.loyaltyDays = di.getUint16() + self.isSpecial = di.getBool() else: - self.loyaltyDays = 0 + self.isSpecial = False str = AccessoryTypes[self.accessoryType][ATString] if self.isHat(): defn = ToonDNA.HatStyles[str] @@ -400,18 +400,10 @@ class CatalogAccessoryItem(CatalogItem.CatalogItem): def encodeDatagram(self, dg, store): CatalogItem.CatalogItem.encodeDatagram(self, dg, store) dg.addUint16(self.accessoryType) - dg.addUint16(self.loyaltyDays) + dg.addBool(self.isSpecial) def isGift(self): - if self.getEmblemPrices(): - return 0 - if self.loyaltyRequirement() > 0: - return 0 - elif self.accessoryType in LoyaltyAccessoryItems: - return 0 - else: - return 1 - + return not self.getEmblemPrices() def getAllAccessories(*accessoryTypes): list = [] @@ -419,4 +411,4 @@ def getAllAccessories(*accessoryTypes): base = CatalogAccessoryItem(accessoryType) list.append(base) - return list + return list \ No newline at end of file diff --git a/toontown/catalog/CatalogAccessoryItemGlobals.py b/toontown/catalog/CatalogAccessoryItemGlobals.py index c7b02f15..c87f58d6 100644 --- a/toontown/catalog/CatalogAccessoryItemGlobals.py +++ b/toontown/catalog/CatalogAccessoryItemGlobals.py @@ -739,5 +739,4 @@ AccessoryTypes = {101: (AHat, 449: (AShoes, 'shw2', APriceCool, - 7)} -LoyaltyAccessoryItems = [] + 7)} \ No newline at end of file diff --git a/toontown/catalog/CatalogClothingItem.py b/toontown/catalog/CatalogClothingItem.py index 7ad4b8e0..544dae3d 100644 --- a/toontown/catalog/CatalogClothingItem.py +++ b/toontown/catalog/CatalogClothingItem.py @@ -292,22 +292,13 @@ ClothingTypes = {101: (ABoysShirt, 'bss1', 40), 1819: (AGirlsSkirt, 'sa_gs21', 5000), 1820: (AShirt, 'sa_ss55', 5000), 1821: (AShirt, 'weed', 5000)} -LoyaltyClothingItems = (1600, - 1601, - 1602, - 1603, - 1604, - 1605, - 1606, - 1607, - 1608) class CatalogClothingItem(CatalogItem.CatalogItem): - def makeNewItem(self, clothingType, colorIndex, loyaltyDays = 0): + def makeNewItem(self, clothingType, colorIndex, isSpecial = False): self.clothingType = clothingType self.colorIndex = colorIndex - self.loyaltyDays = loyaltyDays + self.isSpecial = isSpecial CatalogItem.CatalogItem.makeNewItem(self) def storedInCloset(self): @@ -566,9 +557,9 @@ class CatalogClothingItem(CatalogItem.CatalogItem): self.clothingType = di.getUint16() self.colorIndex = di.getUint8() if versionNumber >= 6: - self.loyaltyDays = di.getUint16() + self.isSpecial = di.getBool() else: - self.loyaltyDays = 0 + self.isSpecial = False str = ClothingTypes[self.clothingType][CTString] if self.isShirt(): color = ToonDNA.ShirtStyles[str][2][self.colorIndex] @@ -579,18 +570,10 @@ class CatalogClothingItem(CatalogItem.CatalogItem): CatalogItem.CatalogItem.encodeDatagram(self, dg, store) dg.addUint16(self.clothingType) dg.addUint8(self.colorIndex) - dg.addUint16(self.loyaltyDays) + dg.addBool(self.isSpecial) def isGift(self): - if self.getEmblemPrices(): - return 0 - if self.loyaltyRequirement() > 0: - return 0 - elif self.clothingType in LoyaltyClothingItems: - return 0 - else: - return 1 - + return not self.getEmblemPrices() def getAllClothes(*clothingTypes): list = [] @@ -600,4 +583,4 @@ def getAllClothes(*clothingTypes): for n in range(1, len(base.getColorChoices())): list.append(CatalogClothingItem(clothingType, n)) - return list + return list \ No newline at end of file diff --git a/toontown/catalog/CatalogEmoteItem.py b/toontown/catalog/CatalogEmoteItem.py index 2b6596ce..bd21122b 100644 --- a/toontown/catalog/CatalogEmoteItem.py +++ b/toontown/catalog/CatalogEmoteItem.py @@ -3,15 +3,14 @@ from toontown.toonbase import ToontownGlobals from toontown.toonbase import TTLocalizer from otp.otpbase import OTPLocalizer from direct.interval.IntervalGlobal import * -LoyaltyEmoteItems = (20, 21, 22, 23, 24, 25, 26) class CatalogEmoteItem(CatalogItem.CatalogItem): sequenceNumber = 0 pictureToon = None - def makeNewItem(self, emoteIndex, loyaltyDays = 0): + def makeNewItem(self, emoteIndex, isSpecial = False): self.emoteIndex = emoteIndex - self.loyaltyDays = loyaltyDays + self.isSpecial = isSpecial CatalogItem.CatalogItem.makeNewItem(self) def getPurchaseLimit(self): @@ -116,23 +115,16 @@ class CatalogEmoteItem(CatalogItem.CatalogItem): CatalogItem.CatalogItem.decodeDatagram(self, di, versionNumber, store) self.emoteIndex = di.getUint8() if versionNumber >= 6: - self.loyaltyDays = di.getUint16() + self.isSpecial = di.getBool() else: - self.loyaltyDays = 0 + self.isSpecial = False if self.emoteIndex > len(OTPLocalizer.EmoteList): raise ValueError def encodeDatagram(self, dg, store): CatalogItem.CatalogItem.encodeDatagram(self, dg, store) dg.addUint8(self.emoteIndex) - dg.addUint16(self.loyaltyDays) + dg.addBool(self.isSpecial) def isGift(self): - if self.getEmblemPrices(): - return 0 - if self.loyaltyRequirement() > 0: - return 0 - elif self.emoteIndex in LoyaltyEmoteItems: - return 0 - else: - return 1 + return not self.getEmblemPrices() \ No newline at end of file diff --git a/toontown/catalog/CatalogGenerator.py b/toontown/catalog/CatalogGenerator.py index cddaa4a8..188d35b8 100644 --- a/toontown/catalog/CatalogGenerator.py +++ b/toontown/catalog/CatalogGenerator.py @@ -540,22 +540,22 @@ MonthlySchedule = ((7, CatalogGardenStarterItem(), CatalogNametagItem(100), CatalogNametagItem(0), - CatalogClothingItem(1608, 0, 90), - CatalogClothingItem(1605, 0, 90), - CatalogClothingItem(1602, 0, 90), - CatalogClothingItem(1607, 0, 60), - CatalogClothingItem(1604, 0, 60), - CatalogClothingItem(1601, 0, 60), - CatalogClothingItem(1606, 0, 30), - CatalogClothingItem(1603, 0, 30), - CatalogClothingItem(1600, 0, 30), - CatalogEmoteItem(20, 30), - CatalogEmoteItem(21, 45), - CatalogEmoteItem(22, 60), - CatalogEmoteItem(23, 75), - CatalogEmoteItem(24, 90), - CatalogEmoteItem(25, 115), - CatalogEmoteItem(26, 130))), + CatalogClothingItem(1608, 0, True), + CatalogClothingItem(1605, 0, True), + CatalogClothingItem(1602, 0, True), + CatalogClothingItem(1607, 0, True), + CatalogClothingItem(1604, 0, True), + CatalogClothingItem(1601, 0, True), + CatalogClothingItem(1606, 0, True), + CatalogClothingItem(1603, 0, True), + CatalogClothingItem(1600, 0, True), + CatalogEmoteItem(20, True), + CatalogEmoteItem(21, True), + CatalogEmoteItem(22, True), + CatalogEmoteItem(23, True), + CatalogEmoteItem(24, True), + CatalogEmoteItem(25, True), + CatalogEmoteItem(26, True))), (5, 26, 6, diff --git a/toontown/catalog/CatalogItem.py b/toontown/catalog/CatalogItem.py index 619c3c02..01a86d93 100644 --- a/toontown/catalog/CatalogItem.py +++ b/toontown/catalog/CatalogItem.py @@ -20,7 +20,7 @@ CatalogTypeUnspecified = 0 CatalogTypeWeekly = 1 CatalogTypeBackorder = 2 CatalogTypeMonthly = 3 -CatalogTypeLoyalty = 4 +CatalogTypeSpecial = 4 class CatalogItem: notify = DirectNotifyGlobal.directNotify.newCategory('CatalogItem') @@ -32,6 +32,7 @@ class CatalogItem: self.giftTag = None self.giftCode = 0 self.hasPicture = False + self.isSpecial = False self.volume = 0 self.specialEventId = 0 if len(args) >= 1 and isinstance(args[0], DatagramIterator): @@ -127,14 +128,8 @@ class CatalogItem: def forGirlsOnly(self): return 0 - def setLoyaltyRequirement(self, days): - self.loyaltyDays = days - - def loyaltyRequirement(self): - if not hasattr(self, 'loyaltyDays'): - return 0 - else: - return self.loyaltyDays + def getIsSpecial(self): + return self.isSpecial def getPrice(self, catalogType): if catalogType == CatalogTypeBackorder: @@ -395,14 +390,6 @@ class CatalogItem: def getRequestPurchaseErrorTextTimeout(self): return 6 - def getDaysToGo(self, avatar): - accountDays = avatar.getAccountDays() - daysToGo = self.loyaltyRequirement() - accountDays - if daysToGo < 0: - daysToGo = 0 - return int(daysToGo) - - def encodeCatalogItem(dg, item, store): import CatalogItemTypes flags = item.getTypeCode() diff --git a/toontown/catalog/CatalogItemPanel.py b/toontown/catalog/CatalogItemPanel.py index b9c451ad..5e2f2d46 100644 --- a/toontown/catalog/CatalogItemPanel.py +++ b/toontown/catalog/CatalogItemPanel.py @@ -311,9 +311,6 @@ class CatalogItemPanel(DirectFrame): elif hasattr(self['item'], 'isSkillTooLow') and self['item'].isSkillTooLow(base.localAvatar): auxText = TTLocalizer.SkillTooLow self.buyButton['state'] = DGG.DISABLED - elif hasattr(self['item'], 'getDaysToGo') and self['item'].getDaysToGo(base.localAvatar): - auxText = TTLocalizer.DaysToGo % self['item'].getDaysToGo(base.localAvatar) - self.buyButton['state'] = DGG.DISABLED elif self['item'].getEmblemPrices() and not base.localAvatar.isEnoughMoneyAndEmblemsToBuy(self['item'].getPrice(self['type']), self['item'].getEmblemPrices()): self.buyButton['state'] = DGG.DISABLED elif self['item'].__class__.__name__ == "CatalogHouseItem" and self['item'].houseId == localAvatar.houseType: diff --git a/toontown/catalog/CatalogScreen.py b/toontown/catalog/CatalogScreen.py index cf5d9f45..36eb9d3c 100644 --- a/toontown/catalog/CatalogScreen.py +++ b/toontown/catalog/CatalogScreen.py @@ -112,8 +112,8 @@ class CatalogScreen(DirectFrame): def setNumBackPages(self, numBackPages): self.numBackPages = numBackPages - def setNumLoyaltyPages(self, numLoyaltyPages): - self.numLoyaltyPages = numLoyaltyPages + def setNumSpecialPages(self, numSpecialPages): + self.numSpecialPages = numSpecialPages def setNumEmblemPages(self, numEmblemPages): self.numEmblemPages = numEmblemPages @@ -127,49 +127,49 @@ class CatalogScreen(DirectFrame): def enableBackorderCatalogButton(self): self.backCatalogButton['state'] = DGG.NORMAL self.newCatalogButton['state'] = DGG.DISABLED - self.loyaltyCatalogButton['state'] = DGG.DISABLED + self.specialCatalogButton['state'] = DGG.DISABLED self.emblemCatalogButton['state'] = DGG.DISABLED def enableNewCatalogButton(self): self.backCatalogButton['state'] = DGG.DISABLED self.newCatalogButton['state'] = DGG.NORMAL - self.loyaltyCatalogButton['state'] = DGG.DISABLED + self.specialCatalogButton['state'] = DGG.DISABLED self.emblemCatalogButton['state'] = DGG.DISABLED - def enableLoyaltyCatalogButton(self): + def enableSpecialCatalogButton(self): self.backCatalogButton['state'] = DGG.DISABLED self.newCatalogButton['state'] = DGG.DISABLED - self.loyaltyCatalogButton['state'] = DGG.NORMAL + self.specialCatalogButton['state'] = DGG.NORMAL self.emblemCatalogButton['state'] = DGG.DISABLED def enableEmblemCatalogButton(self): self.backCatalogButton['state'] = DGG.DISABLED self.newCatalogButton['state'] = DGG.DISABLED - self.loyaltyCatalogButton['state'] = DGG.DISABLED + self.specialCatalogButton['state'] = DGG.DISABLED self.emblemCatalogButton['state'] = DGG.NORMAL def modeBackorderCatalog(self): self.backCatalogButton['state'] = DGG.DISABLED self.newCatalogButton['state'] = DGG.NORMAL - self.loyaltyCatalogButton['state'] = DGG.NORMAL + self.specialCatalogButton['state'] = DGG.NORMAL self.emblemCatalogButton['state'] = DGG.NORMAL def modeNewCatalog(self): self.backCatalogButton['state'] = DGG.NORMAL self.newCatalogButton['state'] = DGG.DISABLED - self.loyaltyCatalogButton['state'] = DGG.NORMAL + self.specialCatalogButton['state'] = DGG.NORMAL self.emblemCatalogButton['state'] = DGG.NORMAL - def modeLoyaltyCatalog(self): + def modeSpecialCatalog(self): self.backCatalogButton['state'] = DGG.NORMAL self.newCatalogButton['state'] = DGG.NORMAL - self.loyaltyCatalogButton['state'] = DGG.DISABLED + self.specialCatalogButton['state'] = DGG.DISABLED self.emblemCatalogButton['state'] = DGG.NORMAL def modeEmblemCatalog(self): self.backCatalogButton['state'] = DGG.NORMAL self.newCatalogButton['state'] = DGG.NORMAL - self.loyaltyCatalogButton['state'] = DGG.NORMAL + self.specialCatalogButton['state'] = DGG.NORMAL self.emblemCatalogButton['state'] = DGG.DISABLED def showNewItems(self, index = None): @@ -206,15 +206,15 @@ class CatalogScreen(DirectFrame): self.showPageItems() return - def showLoyaltyItems(self, index = None): + def showSpecialItems(self, index = None): if config.GetBool('want-qa-regression', 0): self.notify.info('QA-REGRESSION: CATALOG: Special item') taskMgr.remove('clarabelleHelpText1') messenger.send('wakeup') - self.viewing = 'Loyalty' - self.modeLoyaltyCatalog() - self.setMaxPageIndex(self.numLoyaltyPages) - if self.numLoyaltyPages == 0: + self.viewing = 'Special' + self.modeSpecialCatalog() + self.setMaxPageIndex(self.numSpecialPages) + if self.numSpecialPages == 0: self.setPageIndex(-1) elif index is not None: self.setPageIndex(index) @@ -249,11 +249,11 @@ class CatalogScreen(DirectFrame): self.viewing == 'New' if self.viewing == 'New' and self.pageIndex > self.maxPageIndex and self.numBackPages > 0: self.showBackorderItems() - if self.viewing == 'New' and self.pageIndex > self.maxPageIndex and self.numLoyaltyPages > 0: - self.showLoyaltyItems() - elif self.viewing == 'Backorder' and self.pageIndex > self.maxPageIndex and self.numLoyaltyPages > 0: - self.showLoyaltyItems() - elif self.viewing == 'Loyalty' and self.pageIndex > self.maxPageIndex and self.numEmblemPages > 0: + if self.viewing == 'New' and self.pageIndex > self.maxPageIndex and self.numSpecialPages > 0: + self.showSpecialItems() + elif self.viewing == 'Backorder' and self.pageIndex > self.maxPageIndex and self.numSpecialPages > 0: + self.showSpecialItems() + elif self.viewing == 'Special' and self.pageIndex > self.maxPageIndex and self.numEmblemPages > 0: self.showEmblemItems() else: self.pageIndex = min(self.pageIndex, self.maxPageIndex) @@ -266,10 +266,10 @@ class CatalogScreen(DirectFrame): self.pageIndex = self.pageIndex - 1 if self.viewing == 'Backorder' and self.pageIndex < 0 and self.numNewPages > 0: self.showNewItems(self.numNewPages - 1) - elif self.viewing == 'Loyalty' and self.pageIndex < 0 and self.numBackPages > 0: + elif self.viewing == 'Special' and self.pageIndex < 0 and self.numBackPages > 0: self.showBackorderItems(self.numBackPages - 1) - elif self.viewing == 'Emblem' and self.pageIndex < 0 and self.numLoyaltyPages > 0: - self.showLoyaltyItems(self.numLoyaltyPages - 1) + elif self.viewing == 'Emblem' and self.pageIndex < 0 and self.numSpecialPages > 0: + self.showSpecialItems(self.numSpecialPages - 1) else: self.pageIndex = max(self.pageIndex, -1) self.showPageItems() @@ -285,16 +285,16 @@ class CatalogScreen(DirectFrame): self.openCover() if self.viewing == 'New': page = self.pageList[self.pageIndex] - newOrBackOrLoyalty = 0 + newOrBackOrSpecial = 0 elif self.viewing == 'Backorder': page = self.backPageList[self.pageIndex] - newOrBackOrLoyalty = 1 - elif self.viewing == 'Loyalty': - page = self.loyaltyPageList[self.pageIndex] - newOrBackOrLoyalty = 2 + newOrBackOrSpecial = 1 + elif self.viewing == 'Special': + page = self.specialPageList[self.pageIndex] + newOrBackOrSpecial = 2 elif self.viewing == 'Emblem': page = self.emblemPageList[self.pageIndex] - newOrBackOrLoyalty = 3 + newOrBackOrSpecial = 3 page.show() for panel in self.panelDict[page.get_key()]: panel.load() @@ -304,7 +304,7 @@ class CatalogScreen(DirectFrame): pIndex = 0 randGen = random.Random() - randGen.seed(base.localAvatar.catalogScheduleCurrentWeek + (self.pageIndex << 8) + (newOrBackOrLoyalty << 16)) + randGen.seed(base.localAvatar.catalogScheduleCurrentWeek + (self.pageIndex << 8) + (newOrBackOrSpecial << 16)) for i in range(NUM_CATALOG_ROWS): for j in range(NUM_CATALOG_COLS): if pIndex < len(self.visiblePanels): @@ -319,8 +319,8 @@ class CatalogScreen(DirectFrame): if self.viewing == 'New': text = TTLocalizer.CatalogNew - elif self.viewing == 'Loyalty': - text = TTLocalizer.CatalogLoyalty + elif self.viewing == 'Special': + text = TTLocalizer.CatalogSpecial elif self.viewing == 'Backorder': text = TTLocalizer.CatalogBackorder elif self.viewing == 'Emblem': @@ -328,13 +328,13 @@ class CatalogScreen(DirectFrame): self.pageLabel['text'] = text + ' - %d' % (self.pageIndex + 1) if self.pageIndex < self.maxPageIndex: self.nextPageButton.show() - elif self.viewing == 'New' and self.numBackPages == 0 and self.numLoyaltyPages == 0: + elif self.viewing == 'New' and self.numBackPages == 0 and self.numSpecialPages == 0: self.nextPageButton.hide() - elif self.viewing == 'Backorder' and self.numLoyaltyPages == 0: + elif self.viewing == 'Backorder' and self.numSpecialPages == 0: self.nextPageButton.hide() - elif self.viewing == 'Loyalty' and self.numEmblemPages == 0: + elif self.viewing == 'Special' and self.numEmblemPages == 0: self.nextPageButton.hide() - elif self.viewing == 'Loyalty' and self.numEmblemPages > 0: + elif self.viewing == 'Special' and self.numEmblemPages > 0: self.nextPageButton.show() elif self.viewing == 'Emblem': self.nextPageButton.hide() @@ -369,7 +369,7 @@ class CatalogScreen(DirectFrame): for page in self.backPageList: page.hide() - for page in self.loyaltyPageList: + for page in self.specialPageList: page.hide() for page in self.emblemPageList: @@ -400,26 +400,26 @@ class CatalogScreen(DirectFrame): self.newCatalogButton2.show() if self.numBackPages > 0: self.backCatalogButton2.show() - if self.numLoyaltyPages > 0: - self.loyaltyCatalogButton2.show() + if self.numSpecialPages > 0: + self.specialCatalogButton2.show() if self.numEmblemPages > 0: self.emblemCatalogButton2.show() self.newCatalogButton.hide() self.backCatalogButton.hide() - self.loyaltyCatalogButton.hide() + self.specialCatalogButton.hide() self.emblemCatalogButton.hide() def hideDummyTabs(self): self.newCatalogButton2.hide() self.backCatalogButton2.hide() - self.loyaltyCatalogButton2.hide() + self.specialCatalogButton2.hide() self.emblemCatalogButton2.hide() if self.numNewPages > 0: self.newCatalogButton.show() if self.numBackPages > 0: self.backCatalogButton.show() - if self.numLoyaltyPages > 0: - self.loyaltyCatalogButton.show() + if self.numSpecialPages > 0: + self.specialCatalogButton.show() if self.numEmblemPages > 0: self.emblemCatalogButton.show() @@ -453,14 +453,14 @@ class CatalogScreen(DirectFrame): self.maxPageIndex = 0 self.numNewPages = 0 self.numBackPages = 5 - self.numLoyaltyPages = 0 + self.numSpecialPages = 0 self.viewing = 'New' self.panelList = [] self.backPanelList = [] self.pageList = [] self.backPageList = [] - self.loyaltyPanelList = [] - self.loyaltyPageList = [] + self.specialPanelList = [] + self.specialPageList = [] self.emblemPanelList = [] self.emblemPageList = [] self.panelDict = {} @@ -516,19 +516,19 @@ class CatalogScreen(DirectFrame): -0.2, 0.4), image_scale=(1.0, 1.0, smash), image_pos=(0.0, 0.0, lift), image=backDown, pressEffect=0, command=self.showBackorderItems, text=TTLocalizer.CatalogBackorder, text_font=ToontownGlobals.getSignFont(), text_pos=(0.25 - lift, 0.132), text_scale=TTLocalizer.CSbackCatalogButton, text_fg=(0.392, 0.549, 0.627, 1.0), text2_fg=(0.392, 0.349, 0.427, 1.0)) self.backCatalogButton2.hide() - self.loyaltyCatalogButton = DirectButton(self.base, relief=None, pos=(0, 0, 0.469), frameSize=(-0.2, + self.specialCatalogButton = DirectButton(self.base, relief=None, pos=(0, 0, 0.469), frameSize=(-0.2, 0.25, -0.85, -0.3), image=[newDown, newDown, newDown, - newUp], image_scale=(1.0, 1.0, smash), image_pos=(0.0, 0.0, -1.4 + lift), pressEffect=0, command=self.showLoyaltyItems, text=TTLocalizer.CatalogLoyalty, text_font=ToontownGlobals.getSignFont(), text_pos=(1.0 - lift, 0.132), text3_pos=(1.0 - lift, 0.112), text_scale=0.065, text_fg=(0.353, 0.627, 0.627, 1.0), text2_fg=(0.353, 0.427, 0.427, 1.0)) - self.loyaltyCatalogButton.hide() - self.loyaltyCatalogButton2 = DirectButton(self.base, relief=None, pos=(0, 0, 0.469), frameSize=(-0.2, + newUp], image_scale=(1.0, 1.0, smash), image_pos=(0.0, 0.0, -1.4 + lift), pressEffect=0, command=self.showSpecialItems, text=TTLocalizer.CatalogSpecial, text_font=ToontownGlobals.getSignFont(), text_pos=(1.0 - lift, 0.132), text3_pos=(1.0 - lift, 0.112), text_scale=0.065, text_fg=(0.353, 0.627, 0.627, 1.0), text2_fg=(0.353, 0.427, 0.427, 1.0)) + self.specialCatalogButton.hide() + self.specialCatalogButton2 = DirectButton(self.base, relief=None, pos=(0, 0, 0.469), frameSize=(-0.2, 0.25, -0.85, - -0.3), image_scale=(1.0, 1.0, smash), image_pos=(0.0, 0.0, -1.4 + lift), image=newDown, pressEffect=0, command=self.showLoyaltyItems, text=TTLocalizer.CatalogLoyalty, text_font=ToontownGlobals.getSignFont(), text_pos=(1.0 - lift, 0.132), text_scale=0.065, text_fg=(0.353, 0.627, 0.627, 1.0), text2_fg=(0.353, 0.427, 0.427, 1.0)) - self.loyaltyCatalogButton2.hide() + -0.3), image_scale=(1.0, 1.0, smash), image_pos=(0.0, 0.0, -1.4 + lift), image=newDown, pressEffect=0, command=self.showSpecialItems, text=TTLocalizer.CatalogSpecial, text_font=ToontownGlobals.getSignFont(), text_pos=(1.0 - lift, 0.132), text_scale=0.065, text_fg=(0.353, 0.627, 0.627, 1.0), text2_fg=(0.353, 0.427, 0.427, 1.0)) + self.specialCatalogButton2.hide() self.emblemCatalogButton = DirectButton(self.base, relief=None, pos=(0, 0, 1.05), frameSize=(-0.2, 0.25, -2.0, @@ -578,8 +578,8 @@ class CatalogScreen(DirectFrame): self.newCatalogButton2.component('text%d' % i).setR(90) self.backCatalogButton.component('text%d' % i).setR(90) self.backCatalogButton2.component('text%d' % i).setR(90) - self.loyaltyCatalogButton.component('text%d' % i).setR(90) - self.loyaltyCatalogButton2.component('text%d' % i).setR(90) + self.specialCatalogButton.component('text%d' % i).setR(90) + self.specialCatalogButton2.component('text%d' % i).setR(90) self.emblemCatalogButton.component('text%d' % i).setR(90) self.emblemCatalogButton2.component('text%d' % i).setR(90) @@ -623,8 +623,8 @@ class CatalogScreen(DirectFrame): continue if isMaxBankOffered and item in allBankItems and item.furnitureType != CatalogFurnitureItem.MaxBankId: continue - if item.loyaltyRequirement() != 0: - self.loyaltyPanelList.append(CatalogItemPanel.CatalogItemPanel(parent=hidden, item=item, type=CatalogItem.CatalogTypeLoyalty, parentCatalogScreen=self)) + if item.getIsSpecial(): + self.specialPanelList.append(CatalogItemPanel.CatalogItemPanel(parent=hidden, item=item, type=CatalogItem.CatalogTypeSpecial, parentCatalogScreen=self)) elif item.getEmblemPrices(): self.emblemPanelList.append(CatalogItemPanel.CatalogItemPanel(parent=hidden, item=item, type=CatalogItem.CatalogTypeWeekly, parentCatalogScreen=self)) else: @@ -641,8 +641,8 @@ class CatalogScreen(DirectFrame): continue if isMaxBankOffered and item in allBankItems and item.furnitureType != CatalogFurnitureItem.MaxBankId: continue - if item.loyaltyRequirement() != 0: - self.loyaltyPanelList.append(CatalogItemPanel.CatalogItemPanel(parent=hidden, item=item, type=CatalogItem.CatalogTypeLoyalty, parentCatalogScreen=self)) + if item.getIsSpecial(): + self.specialPanelList.append(CatalogItemPanel.CatalogItemPanel(parent=hidden, item=item, type=CatalogItem.CatalogTypeSpecial, parentCatalogScreen=self)) elif item.getEmblemPrices(): self.emblemPanelList.append(CatalogItemPanel.CatalogItemPanel(parent=hidden, item=item, type=CatalogItem.CatalogTypeBackorder, parentCatalogScreen=self)) else: @@ -652,8 +652,8 @@ class CatalogScreen(DirectFrame): self.setNumNewPages(numPages) numPages = self.packPages(self.backPanelList, self.backPageList, 'back') self.setNumBackPages(numPages) - numPages = self.packPages(self.loyaltyPanelList, self.loyaltyPageList, 'loyalty') - self.setNumLoyaltyPages(numPages) + numPages = self.packPages(self.specialPanelList, self.specialPageList, 'special') + self.setNumSpecialPages(numPages) numPages = self.packPages(self.emblemPanelList, self.emblemPageList, 'emblem') self.setNumEmblemPages(numPages) currentWeek = base.localAvatar.catalogScheduleCurrentWeek - 1 @@ -766,7 +766,7 @@ class CatalogScreen(DirectFrame): self.clarabelleFrame.setPosHprScale(-0.01, 0.0, -0.01, 0.0, 0.0, 0.0, 1.02, 1.0, 1.02) def reload(self): - for panel in self.panelList + self.backPanelList + self.loyaltyPanelList + self.emblemPanelList: + for panel in self.panelList + self.backPanelList + self.specialPanelList + self.emblemPanelList: panel.destroy() def priceSort(a, b, type): @@ -778,23 +778,23 @@ class CatalogScreen(DirectFrame): self.maxPageIndex = 0 self.numNewPages = 0 self.numBackPages = 5 - self.numLoyaltyPages = 0 + self.numSpecialPages = 0 self.viewing = 'New' self.panelList = [] self.backPanelList = [] - self.loyaltyList = [] + self.specialList = [] self.pageList = [] self.backPageList = [] - self.loyaltyPanelList = [] - self.loyaltyPageList = [] + self.specialPanelList = [] + self.specialPageList = [] self.panelDict = {} self.visiblePanels = [] itemList = base.localAvatar.monthlyCatalog + base.localAvatar.weeklyCatalog itemList.sort(lambda a, b: priceSort(a, b, CatalogItem.CatalogTypeWeekly)) itemList.reverse() for item in itemList: - if item.loyaltyRequirement() != 0: - self.loyaltyPanelList.append(CatalogItemPanel.CatalogItemPanel(parent=hidden, item=item, type=CatalogItem.CatalogTypeLoyalty, parentCatalogScreen=self)) + if item.getIsSpecial(): + self.specialPanelList.append(CatalogItemPanel.CatalogItemPanel(parent=hidden, item=item, type=CatalogItem.CatalogTypeSpecial, parentCatalogScreen=self)) else: self.panelList.append(CatalogItemPanel.CatalogItemPanel(parent=hidden, item=item, type=CatalogItem.CatalogTypeWeekly)) @@ -802,8 +802,8 @@ class CatalogScreen(DirectFrame): itemList.sort(lambda a, b: priceSort(a, b, CatalogItem.CatalogTypeBackorder)) itemList.reverse() for item in itemList: - if item.loyaltyRequirement() != 0: - self.loyaltyPanelList.append(CatalogItemPanel.CatalogItemPanel(parent=hidden, item=item, type=CatalogItem.CatalogTypeLoyalty, parentCatalogScreen=self)) + if item.getIsSpecial(): + self.specialPanelList.append(CatalogItemPanel.CatalogItemPanel(parent=hidden, item=item, type=CatalogItem.CatalogTypeSpecial, parentCatalogScreen=self)) else: self.backPanelList.append(CatalogItemPanel.CatalogItemPanel(parent=hidden, item=item, type=CatalogItem.CatalogTypeBackorder)) @@ -811,8 +811,8 @@ class CatalogScreen(DirectFrame): self.setNumNewPages(numPages) numPages = self.packPages(self.backPanelList, self.backPageList, 'back') self.setNumBackPages(numPages) - numPages = self.packPages(self.loyaltyPanelList, self.loyaltyPageList, 'loyalty') - self.setNumLoyaltyPages(numPages) + numPages = self.packPages(self.specialPanelList, self.specialPageList, 'special') + self.setNumSpecialPages(numPages) seriesNumber = (base.localAvatar.catalogScheduleCurrentWeek - 1) / ToontownGlobals.CatalogNumWeeksPerSeries + 1 self.catalogSeries['text'] = Localizer.CatalogSeriesLabel % seriesNumber weekNumber = (base.localAvatar.catalogScheduleCurrentWeek - 1) % ToontownGlobals.CatalogNumWeeksPerSeries + 1 @@ -835,7 +835,7 @@ class CatalogScreen(DirectFrame): self.destroy() del self.base del self.squares - for panel in self.panelList + self.backPanelList + self.loyaltyPanelList + self.emblemPanelList: + for panel in self.panelList + self.backPanelList + self.specialPanelList + self.emblemPanelList: panel.destroy() del self.panelList @@ -853,8 +853,8 @@ class CatalogScreen(DirectFrame): del self.newCatalogButton2 del self.backCatalogButton del self.backCatalogButton2 - del self.loyaltyCatalogButton - del self.loyaltyCatalogButton2 + del self.specialCatalogButton + del self.specialCatalogButton2 del self.pageLabel if self.createdGiftGui: del self.giftToggle @@ -899,8 +899,8 @@ class CatalogScreen(DirectFrame): self.newCatalogButton2.hide() self.backCatalogButton.hide() self.backCatalogButton2.hide() - self.loyaltyCatalogButton.hide() - self.loyaltyCatalogButton2.hide() + self.specialCatalogButton.hide() + self.specialCatalogButton2.hide() self.emblemCatalogButton.hide() self.emblemCatalogButton2.hide() self.hangup.hide() @@ -924,7 +924,7 @@ class CatalogScreen(DirectFrame): if hasattr(self, 'beanBank'): self.beanBank['text'] = str(base.localAvatar.getTotalMoney()) if lock == 0: - for item in self.panelList + self.backPanelList + self.loyaltyPanelList + self.emblemPanelList: + for item in self.panelList + self.backPanelList + self.specialPanelList + self.emblemPanelList: if type(item) != type(''): item.updateButtons(self.gifting) diff --git a/toontown/estate/DistributedPhoneAI.py b/toontown/estate/DistributedPhoneAI.py index 59271837..aa08fd29 100644 --- a/toontown/estate/DistributedPhoneAI.py +++ b/toontown/estate/DistributedPhoneAI.py @@ -98,9 +98,6 @@ class DistributedPhoneAI(DistributedFurnitureItemAI): if isinstance(item, CatalogInvalidItem): self.air.writeServerEvent('suspicious', avId, 'Tried to purchase invalid catalog item.') return - if item.loyaltyRequirement(): - self.air.writeServerEvent('suspicious', avId, 'Tried to purchase an unimplemented loyalty item!') - return if item in av.backCatalog: price = item.getPrice(CatalogItem.CatalogTypeBackorder) elif item in av.weeklyCatalog or item in av.monthlyCatalog: diff --git a/toontown/toonbase/TTLocalizerEnglish.py b/toontown/toonbase/TTLocalizerEnglish.py index beb9e51f..edac2f42 100644 --- a/toontown/toonbase/TTLocalizerEnglish.py +++ b/toontown/toonbase/TTLocalizerEnglish.py @@ -5422,7 +5422,7 @@ CatalogCurrency = 'beans' CatalogHangUp = 'Hang Up' CatalogNew = 'NEW' CatalogBackorder = 'BACKORDER' -CatalogLoyalty = 'SPECIAL' +CatalogSpecial = 'SPECIAL' CatalogEmblem = 'EMBLEM' CatalogPagePrefix = 'Page' CatalogGreeting = "Hello! Thanks for calling Clarabelle's Cattlelog. Can I help you?" @@ -8081,7 +8081,6 @@ ElevatorLawBotCourse0 = 'Office A' ElevatorLawBotCourse1 = 'Office B' ElevatorLawBotCourse2 = 'Office C' ElevatorLawBotCourse3 = 'Office D' -DaysToGo = 'Wait\n%s Days' IceGameTitle = 'Ice Slide' IceGameInstructions = 'Get as close to the center by the end of the second round. Use arrow keys to change direction and force. Press Ctrl to launch your toon. Hit barrels for extra points and avoid the TNT!' IceGameInstructionsNoTnt = 'Get as close to the center by the end of the second round. Use arrow keys to change direction and force. Press Ctrl to launch your toon. Hit barrels for extra points.'