From 76423e911f124e0ee3c66dcc9a69ab4bbb1ed88c Mon Sep 17 00:00:00 2001 From: John Date: Mon, 27 Jul 2015 18:53:31 +0300 Subject: [PATCH] Added baru's pro shirt + fixed over-filling closet bug --- toontown/catalog/CatalogClothingItem.py | 4 ++-- toontown/catalog/CatalogGenerator.py | 1 + toontown/coderedemption/TTCodeRedemptionMgrAI.py | 7 ------- toontown/estate/DistributedMailboxAI.py | 10 +++++++--- toontown/estate/DistributedRewardCrateAI.py | 3 --- toontown/toon/DistributedNPCTailor.py | 2 +- toontown/toon/DistributedToonAI.py | 4 ++-- toontown/toon/ToonDNA.py | 6 +++--- toontown/toonbase/TTLocalizerEnglish.py | 2 +- 9 files changed, 17 insertions(+), 22 deletions(-) diff --git a/toontown/catalog/CatalogClothingItem.py b/toontown/catalog/CatalogClothingItem.py index fad58596..b1373508 100755 --- a/toontown/catalog/CatalogClothingItem.py +++ b/toontown/catalog/CatalogClothingItem.py @@ -291,7 +291,7 @@ ClothingTypes = {101: (ABoysShirt, 'bss1', 40), 1818: (AGirlsSkirt, 'sa_gs20', 5000), 1819: (AGirlsSkirt, 'sa_gs21', 5000), 1820: (AShirt, 'sa_ss55', 5000), - 1821: (AShirt, 'weed', 5000)} + 1821: (AShirt, 'flannel', 300)} class CatalogClothingItem(CatalogItem.CatalogItem): @@ -372,7 +372,7 @@ class CatalogClothingItem(CatalogItem.CatalogItem): return TTLocalizer.ClothingArticleNames[article] def recordPurchase(self, avatar, optional): - if avatar.isClosetFull(): + if avatar.isClosetFull(1): return ToontownGlobals.P_NoRoomForItem str = ClothingTypes[self.clothingType][CTString] dna = avatar.getStyle() diff --git a/toontown/catalog/CatalogGenerator.py b/toontown/catalog/CatalogGenerator.py index 487ec4d0..79edbbcd 100755 --- a/toontown/catalog/CatalogGenerator.py +++ b/toontown/catalog/CatalogGenerator.py @@ -542,6 +542,7 @@ MonthlySchedule = ((7, CatalogEmoteItem(22, True), CatalogEmoteItem(23, True), CatalogEmoteItem(24, True))), + CatalogClothingItem(1821, 0, True))), (5, 26, 6, diff --git a/toontown/coderedemption/TTCodeRedemptionMgrAI.py b/toontown/coderedemption/TTCodeRedemptionMgrAI.py index 331757e4..518f49b6 100755 --- a/toontown/coderedemption/TTCodeRedemptionMgrAI.py +++ b/toontown/coderedemption/TTCodeRedemptionMgrAI.py @@ -43,13 +43,6 @@ only include the comma if there are multiple arguments. class TTCodeRedemptionMgrAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory("TTCodeRedemptionMgrAI") codes = { - 'weed': { - 'items': [ - CatalogClothingItem.CatalogClothingItem(1821, 0) - ], - 'month': 4, - 'day': 20 - }, 'gardening': { 'items': [ CatalogGardenStarterItem.CatalogGardenStarterItem() diff --git a/toontown/estate/DistributedMailboxAI.py b/toontown/estate/DistributedMailboxAI.py index e939a7d8..46410a15 100755 --- a/toontown/estate/DistributedMailboxAI.py +++ b/toontown/estate/DistributedMailboxAI.py @@ -92,9 +92,13 @@ class DistributedMailboxAI(DistributedObjectAI): return item = av.mailboxContents[index] - del av.mailboxContents[index] - av.b_setMailboxContents(av.mailboxContents) - self.sendUpdateToAvatarId(avId, 'acceptItemResponse', [context, item.recordPurchase(av, optional)]) + returnCode = item.recordPurchase(av, optional) + + if returnCode == ToontownGlobals.P_ItemAvailable: + del av.mailboxContents[index] + av.b_setMailboxContents(av.mailboxContents) + + self.sendUpdateToAvatarId(avId, 'acceptItemResponse', [context, returnCode]) def discardItemMessage(self, context, item, index, optional): avId = self.air.getAvatarIdFromSender() diff --git a/toontown/estate/DistributedRewardCrateAI.py b/toontown/estate/DistributedRewardCrateAI.py index f4ac172c..179b6375 100644 --- a/toontown/estate/DistributedRewardCrateAI.py +++ b/toontown/estate/DistributedRewardCrateAI.py @@ -9,9 +9,6 @@ import random, time RANDOM_PRIZES = [ToontownGlobals.CRATE_BEANS] * 10 + [ToontownGlobals.CRATE_BUFFS] * 5 + [ToontownGlobals.CRATE_NAMETAGS] * 10 + [ToontownGlobals.CRATE_EMOTES] * 10 + [ToontownGlobals.CRATE_CLOTHING] * 30 + [ToontownGlobals.CRATE_ACCESSORIES] * 35 class DistributedRewardCrateAI(DistributedFurnitureItemAI): - - def __init__(self, air, furnitureMgr, item): - DistributedFurnitureItemAI.__init__(self, air, furnitureMgr, item) def requestKeyUsage(self): avId = self.air.getAvatarIdFromSender() diff --git a/toontown/toon/DistributedNPCTailor.py b/toontown/toon/DistributedNPCTailor.py index ae701637..2e24dde2 100755 --- a/toontown/toon/DistributedNPCTailor.py +++ b/toontown/toon/DistributedNPCTailor.py @@ -215,7 +215,7 @@ class DistributedNPCTailor(DistributedNPCToonBase): print 'setDNA: which = %d, top = %d, bot = %d' % (which, self.clothesGUI.topChoice, self.clothesGUI.bottomChoice) if self.roomAvailable == 0: if self.isLocalToon: - if self.av.isClosetFull() or which & ClosetGlobals.SHIRT and which & ClosetGlobals.SHORTS: + if self.av.isClosetFull(1) or which & ClosetGlobals.SHIRT and which & ClosetGlobals.SHORTS: self.__enterConfirmLoss(2, which) self.clothesGUI.hideButtons() self.button.hide() diff --git a/toontown/toon/DistributedToonAI.py b/toontown/toon/DistributedToonAI.py index 6fa7cdb4..4c27f7ae 100755 --- a/toontown/toon/DistributedToonAI.py +++ b/toontown/toon/DistributedToonAI.py @@ -831,7 +831,7 @@ class DistributedToonAI(DistributedPlayerAI.DistributedPlayerAI, DistributedSmoo return self.clothesTopsList def addToClothesTopsList(self, topTex, topTexColor, sleeveTex, sleeveTexColor): - if self.isClosetFull(): + if self.isClosetFull(1): return 0 index = 0 for i in xrange(0, len(self.clothesTopsList), 4): @@ -883,7 +883,7 @@ class DistributedToonAI(DistributedPlayerAI.DistributedPlayerAI, DistributedSmoo return self.clothesBottomsList def addToClothesBottomsList(self, botTex, botTexColor): - if self.isClosetFull(): + if self.isClosetFull(1): self.notify.warning('clothes bottoms list is full') return 0 index = 0 diff --git a/toontown/toon/ToonDNA.py b/toontown/toon/ToonDNA.py index 39e294b1..55ed726b 100755 --- a/toontown/toon/ToonDNA.py +++ b/toontown/toon/ToonDNA.py @@ -294,7 +294,7 @@ Shirts = ['phase_3/maps/desat_shirt_1.jpg', 'phase_4/maps/tt_t_chr_avt_shirt_saveBuilding4.jpg', 'phase_4/maps/tt_t_chr_avt_shirt_saveBuilding05.jpg', 'phase_4/maps/tt_t_chr_avt_shirt_anniversary.jpg', - 'phase_4/maps/WeedShirt.jpg'] + 'phase_4/maps/flannelshirt_red.jpg'] BoyShirts = [(0, 0), (1, 1), (2, 2), @@ -477,7 +477,7 @@ Sleeves = ['phase_3/maps/desat_sleeve_1.jpg', 'phase_4/maps/tt_t_chr_avt_shirtSleeve_saveBuilding4.jpg', 'phase_4/maps/tt_t_chr_avt_shirtSleeve_saveBuilding05.jpg', 'phase_4/maps/tt_t_chr_avt_shirtSleeve_anniversary.jpg', - 'phase_4/maps/WeedSleeve.jpg'] + 'phase_4/maps/flannelsleeve_red.jpg'] BoyShorts = ['phase_3/maps/desat_shorts_1.jpg', 'phase_3/maps/desat_shorts_2.jpg', 'phase_3/maps/desat_shorts_4.jpg', @@ -1202,7 +1202,7 @@ ShirtStyles = {'bss1': [0, 0, [(0, 0), 'jb_2': [113, 100, [(27, 27)]], 'ugcms': [117, 104, [(27, 27)]], 'lb_1': [119, 106, [(27, 27)]], - 'weed': [148, 135, [(27, 27)]]} + 'flannel': [148, 135, [(27, 27)]]} BottomStyles = {'bbs1': [0, [0, 1, 2, diff --git a/toontown/toonbase/TTLocalizerEnglish.py b/toontown/toonbase/TTLocalizerEnglish.py index ae2f5348..3b57f788 100755 --- a/toontown/toonbase/TTLocalizerEnglish.py +++ b/toontown/toonbase/TTLocalizerEnglish.py @@ -5278,7 +5278,7 @@ ClothingTypeNames = {1001: 'Ghost Shirt', 1784: 'Racing Skirt 1', 1801: 'Batty Moon Shirt', 1802: 'Mittens Shirt', - 1821: '420 BlazeIt Shirt'} + 1821: 'Plaid Punk Shirt'} AccessoryArticleNames = ('Hat', 'Glasses', 'Backpack',