Added baru's pro shirt + fixed over-filling closet bug

This commit is contained in:
John 2015-07-27 18:53:31 +03:00
parent 0308b56ac4
commit 76423e911f
9 changed files with 17 additions and 22 deletions

View file

@ -291,7 +291,7 @@ ClothingTypes = {101: (ABoysShirt, 'bss1', 40),
1818: (AGirlsSkirt, 'sa_gs20', 5000), 1818: (AGirlsSkirt, 'sa_gs20', 5000),
1819: (AGirlsSkirt, 'sa_gs21', 5000), 1819: (AGirlsSkirt, 'sa_gs21', 5000),
1820: (AShirt, 'sa_ss55', 5000), 1820: (AShirt, 'sa_ss55', 5000),
1821: (AShirt, 'weed', 5000)} 1821: (AShirt, 'flannel', 300)}
class CatalogClothingItem(CatalogItem.CatalogItem): class CatalogClothingItem(CatalogItem.CatalogItem):
@ -372,7 +372,7 @@ class CatalogClothingItem(CatalogItem.CatalogItem):
return TTLocalizer.ClothingArticleNames[article] return TTLocalizer.ClothingArticleNames[article]
def recordPurchase(self, avatar, optional): def recordPurchase(self, avatar, optional):
if avatar.isClosetFull(): if avatar.isClosetFull(1):
return ToontownGlobals.P_NoRoomForItem return ToontownGlobals.P_NoRoomForItem
str = ClothingTypes[self.clothingType][CTString] str = ClothingTypes[self.clothingType][CTString]
dna = avatar.getStyle() dna = avatar.getStyle()

View file

@ -542,6 +542,7 @@ MonthlySchedule = ((7,
CatalogEmoteItem(22, True), CatalogEmoteItem(22, True),
CatalogEmoteItem(23, True), CatalogEmoteItem(23, True),
CatalogEmoteItem(24, True))), CatalogEmoteItem(24, True))),
CatalogClothingItem(1821, 0, True))),
(5, (5,
26, 26,
6, 6,

View file

@ -43,13 +43,6 @@ only include the comma if there are multiple arguments.
class TTCodeRedemptionMgrAI(DistributedObjectAI): class TTCodeRedemptionMgrAI(DistributedObjectAI):
notify = DirectNotifyGlobal.directNotify.newCategory("TTCodeRedemptionMgrAI") notify = DirectNotifyGlobal.directNotify.newCategory("TTCodeRedemptionMgrAI")
codes = { codes = {
'weed': {
'items': [
CatalogClothingItem.CatalogClothingItem(1821, 0)
],
'month': 4,
'day': 20
},
'gardening': { 'gardening': {
'items': [ 'items': [
CatalogGardenStarterItem.CatalogGardenStarterItem() CatalogGardenStarterItem.CatalogGardenStarterItem()

View file

@ -92,9 +92,13 @@ class DistributedMailboxAI(DistributedObjectAI):
return return
item = av.mailboxContents[index] item = av.mailboxContents[index]
del av.mailboxContents[index] returnCode = item.recordPurchase(av, optional)
av.b_setMailboxContents(av.mailboxContents)
self.sendUpdateToAvatarId(avId, 'acceptItemResponse', [context, 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): def discardItemMessage(self, context, item, index, optional):
avId = self.air.getAvatarIdFromSender() avId = self.air.getAvatarIdFromSender()

View file

@ -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 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): class DistributedRewardCrateAI(DistributedFurnitureItemAI):
def __init__(self, air, furnitureMgr, item):
DistributedFurnitureItemAI.__init__(self, air, furnitureMgr, item)
def requestKeyUsage(self): def requestKeyUsage(self):
avId = self.air.getAvatarIdFromSender() avId = self.air.getAvatarIdFromSender()

View file

@ -215,7 +215,7 @@ class DistributedNPCTailor(DistributedNPCToonBase):
print 'setDNA: which = %d, top = %d, bot = %d' % (which, self.clothesGUI.topChoice, self.clothesGUI.bottomChoice) print 'setDNA: which = %d, top = %d, bot = %d' % (which, self.clothesGUI.topChoice, self.clothesGUI.bottomChoice)
if self.roomAvailable == 0: if self.roomAvailable == 0:
if self.isLocalToon: 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.__enterConfirmLoss(2, which)
self.clothesGUI.hideButtons() self.clothesGUI.hideButtons()
self.button.hide() self.button.hide()

View file

@ -831,7 +831,7 @@ class DistributedToonAI(DistributedPlayerAI.DistributedPlayerAI, DistributedSmoo
return self.clothesTopsList return self.clothesTopsList
def addToClothesTopsList(self, topTex, topTexColor, sleeveTex, sleeveTexColor): def addToClothesTopsList(self, topTex, topTexColor, sleeveTex, sleeveTexColor):
if self.isClosetFull(): if self.isClosetFull(1):
return 0 return 0
index = 0 index = 0
for i in xrange(0, len(self.clothesTopsList), 4): for i in xrange(0, len(self.clothesTopsList), 4):
@ -883,7 +883,7 @@ class DistributedToonAI(DistributedPlayerAI.DistributedPlayerAI, DistributedSmoo
return self.clothesBottomsList return self.clothesBottomsList
def addToClothesBottomsList(self, botTex, botTexColor): def addToClothesBottomsList(self, botTex, botTexColor):
if self.isClosetFull(): if self.isClosetFull(1):
self.notify.warning('clothes bottoms list is full') self.notify.warning('clothes bottoms list is full')
return 0 return 0
index = 0 index = 0

View file

@ -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_saveBuilding4.jpg',
'phase_4/maps/tt_t_chr_avt_shirt_saveBuilding05.jpg', 'phase_4/maps/tt_t_chr_avt_shirt_saveBuilding05.jpg',
'phase_4/maps/tt_t_chr_avt_shirt_anniversary.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), BoyShirts = [(0, 0),
(1, 1), (1, 1),
(2, 2), (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_saveBuilding4.jpg',
'phase_4/maps/tt_t_chr_avt_shirtSleeve_saveBuilding05.jpg', 'phase_4/maps/tt_t_chr_avt_shirtSleeve_saveBuilding05.jpg',
'phase_4/maps/tt_t_chr_avt_shirtSleeve_anniversary.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', BoyShorts = ['phase_3/maps/desat_shorts_1.jpg',
'phase_3/maps/desat_shorts_2.jpg', 'phase_3/maps/desat_shorts_2.jpg',
'phase_3/maps/desat_shorts_4.jpg', 'phase_3/maps/desat_shorts_4.jpg',
@ -1202,7 +1202,7 @@ ShirtStyles = {'bss1': [0, 0, [(0, 0),
'jb_2': [113, 100, [(27, 27)]], 'jb_2': [113, 100, [(27, 27)]],
'ugcms': [117, 104, [(27, 27)]], 'ugcms': [117, 104, [(27, 27)]],
'lb_1': [119, 106, [(27, 27)]], 'lb_1': [119, 106, [(27, 27)]],
'weed': [148, 135, [(27, 27)]]} 'flannel': [148, 135, [(27, 27)]]}
BottomStyles = {'bbs1': [0, [0, BottomStyles = {'bbs1': [0, [0,
1, 1,
2, 2,

View file

@ -5278,7 +5278,7 @@ ClothingTypeNames = {1001: 'Ghost Shirt',
1784: 'Racing Skirt 1', 1784: 'Racing Skirt 1',
1801: 'Batty Moon Shirt', 1801: 'Batty Moon Shirt',
1802: 'Mittens Shirt', 1802: 'Mittens Shirt',
1821: '420 BlazeIt Shirt'} 1821: 'Plaid Punk Shirt'}
AccessoryArticleNames = ('Hat', AccessoryArticleNames = ('Hat',
'Glasses', 'Glasses',
'Backpack', 'Backpack',