mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-23 11:42:39 -06:00
Accessory gender equality (Clothing equality is harder and will be done later cause of 63)
This commit is contained in:
parent
18fb9b1924
commit
98347f5b7f
3 changed files with 30 additions and 86 deletions
|
@ -15,45 +15,6 @@ class CatalogAccessoryItem(CatalogItem.CatalogItem):
|
|||
self.isSpecial = isSpecial
|
||||
CatalogItem.CatalogItem.makeNewItem(self)
|
||||
|
||||
def storedInTrunk(self):
|
||||
return 1
|
||||
|
||||
def notOfferedTo(self, avatar):
|
||||
article = AccessoryTypes[self.accessoryType][ATArticle]
|
||||
if article in [AHat,
|
||||
AGlasses,
|
||||
ABackpack,
|
||||
AShoes]:
|
||||
return 0
|
||||
forBoys = article in [ABoysHat,
|
||||
ABoysGlasses,
|
||||
ABoysBackpack,
|
||||
ABoysShoes]
|
||||
if avatar.getStyle().getGender() == 'm':
|
||||
return not forBoys
|
||||
else:
|
||||
return forBoys
|
||||
|
||||
def forBoysOnly(self):
|
||||
article = AccessoryTypes[self.accessoryType][ATArticle]
|
||||
if article in [ABoysHat,
|
||||
ABoysGlasses,
|
||||
ABoysBackpack,
|
||||
ABoysShoes]:
|
||||
return 1
|
||||
else:
|
||||
return 0
|
||||
|
||||
def forGirlsOnly(self):
|
||||
article = AccessoryTypes[self.accessoryType][ATArticle]
|
||||
if article in [AGirlsHat,
|
||||
AGirlsGlasses,
|
||||
AGirlsBackpack,
|
||||
AGirlsShoes]:
|
||||
return 1
|
||||
else:
|
||||
return 0
|
||||
|
||||
def getPurchaseLimit(self):
|
||||
return 1
|
||||
|
||||
|
@ -234,7 +195,6 @@ class CatalogAccessoryItem(CatalogItem.CatalogItem):
|
|||
model.setColorScale(color, 1)
|
||||
if needsAlpha:
|
||||
model.setTransparency(1)
|
||||
return
|
||||
|
||||
def loadModel(self):
|
||||
modelPath = self.getFilename()
|
||||
|
@ -259,8 +219,8 @@ class CatalogAccessoryItem(CatalogItem.CatalogItem):
|
|||
from toontown.toontowngui import TTDialog
|
||||
avatar = base.localAvatar
|
||||
accessoriesOnOrder = 0
|
||||
for item in avatar.onOrder + avatar.mailboxContents:
|
||||
if item.storedInTrunk():
|
||||
for item in avatar.onOrder + avatar.mailboxContents + avatar.onGiftOrder:
|
||||
if hasattr(item, 'isHat'):
|
||||
accessoriesOnOrder += 1
|
||||
|
||||
if avatar.isTrunkFull(accessoriesOnOrder):
|
||||
|
@ -300,20 +260,16 @@ class CatalogAccessoryItem(CatalogItem.CatalogItem):
|
|||
return CatalogItem.CatalogItem.getAcceptItemErrorText(self, retcode)
|
||||
|
||||
def isHat(self):
|
||||
article = AccessoryTypes[self.accessoryType][ATArticle]
|
||||
return article in [AHat, ABoysHat, AGirlsHat]
|
||||
return AccessoryTypes[self.accessoryType][ATArticle] == AHat
|
||||
|
||||
def areGlasses(self):
|
||||
article = AccessoryTypes[self.accessoryType][ATArticle]
|
||||
return article in [AGlasses, ABoysGlasses, AGirlsGlasses]
|
||||
return AccessoryTypes[self.accessoryType][ATArticle] == AGlasses
|
||||
|
||||
def isBackpack(self):
|
||||
article = AccessoryTypes[self.accessoryType][ATArticle]
|
||||
return article in [ABackpack, ABoysBackpack, AGirlsBackpack]
|
||||
return AccessoryTypes[self.accessoryType][ATArticle] == ABackpack
|
||||
|
||||
def areShoes(self):
|
||||
article = AccessoryTypes[self.accessoryType][ATArticle]
|
||||
return article in [AShoes, ABoysShoes, AGirlsShoes]
|
||||
return AccessoryTypes[self.accessoryType][ATArticle] == AShoes
|
||||
|
||||
def output(self, store = -1):
|
||||
return 'CatalogAccessoryItem(%s%s)' % (self.accessoryType, self.formatOptionalData(store))
|
||||
|
|
|
@ -7,15 +7,6 @@ AHat = 0
|
|||
AGlasses = 1
|
||||
ABackpack = 2
|
||||
AShoes = 3
|
||||
ABoysHat = 4
|
||||
ABoysGlasses = 5
|
||||
ABoysBackpack = 6
|
||||
ABoysShoes = 7
|
||||
AGirlsHat = 8
|
||||
AGirlsGlasses = 9
|
||||
AGirlsBackpack = 10
|
||||
AGirlsShoes = 11
|
||||
APriceTest = 5
|
||||
APriceBasic = 250
|
||||
APriceBasicPlus = 400
|
||||
APriceCool = 800
|
||||
|
@ -28,7 +19,7 @@ AccessoryTypes = {101: (AHat,
|
|||
'hsf1',
|
||||
APriceCool,
|
||||
5),
|
||||
103: (AGirlsHat,
|
||||
103: (AHat,
|
||||
'hrb1',
|
||||
APriceBasic,
|
||||
1),
|
||||
|
@ -40,11 +31,11 @@ AccessoryTypes = {101: (AHat,
|
|||
'hsf3',
|
||||
APriceCool,
|
||||
0),
|
||||
106: (AGirlsHat,
|
||||
106: (AHat,
|
||||
'hrb2',
|
||||
APriceBasicPlus,
|
||||
3),
|
||||
107: (AGirlsHat,
|
||||
107: (AHat,
|
||||
'hrb3',
|
||||
APriceBasicPlus,
|
||||
0),
|
||||
|
@ -96,7 +87,7 @@ AccessoryTypes = {101: (AHat,
|
|||
'hpb1',
|
||||
APriceBasicPlus,
|
||||
6),
|
||||
120: (ABoysHat,
|
||||
120: (AHat,
|
||||
'hcr1',
|
||||
10000,
|
||||
5),
|
||||
|
@ -132,23 +123,23 @@ AccessoryTypes = {101: (AHat,
|
|||
'hst1',
|
||||
APriceBasicPlus,
|
||||
1),
|
||||
129: (AGirlsHat,
|
||||
129: (AHat,
|
||||
'hsu1',
|
||||
APriceCool,
|
||||
1),
|
||||
130: (AGirlsHat,
|
||||
130: (AHat,
|
||||
'hrb4',
|
||||
APriceBasic,
|
||||
1),
|
||||
131: (AGirlsHat,
|
||||
131: (AHat,
|
||||
'hrb5',
|
||||
APriceBasicPlus,
|
||||
4),
|
||||
132: (AGirlsHat,
|
||||
132: (AHat,
|
||||
'hrb6',
|
||||
APriceBasic,
|
||||
2),
|
||||
133: (AGirlsHat,
|
||||
133: (AHat,
|
||||
'hrb7',
|
||||
APriceBasicPlus,
|
||||
6),
|
||||
|
@ -156,7 +147,7 @@ AccessoryTypes = {101: (AHat,
|
|||
'hat1',
|
||||
APriceCool,
|
||||
2),
|
||||
135: (AGirlsHat,
|
||||
135: (AHat,
|
||||
'hhd1',
|
||||
APriceCool,
|
||||
2),
|
||||
|
@ -188,11 +179,11 @@ AccessoryTypes = {101: (AHat,
|
|||
'hft2',
|
||||
APriceCool,
|
||||
6),
|
||||
143: (ABoysHat,
|
||||
143: (AHat,
|
||||
'hhd2',
|
||||
APriceCool,
|
||||
3),
|
||||
144: (AGirlsHat,
|
||||
144: (AHat,
|
||||
'hpc1',
|
||||
APriceCool,
|
||||
5),
|
||||
|
@ -208,7 +199,7 @@ AccessoryTypes = {101: (AHat,
|
|||
'hat2',
|
||||
APriceCool,
|
||||
2),
|
||||
148: (AGirlsHat,
|
||||
148: (AHat,
|
||||
'htr1',
|
||||
10000,
|
||||
3),
|
||||
|
@ -280,7 +271,7 @@ AccessoryTypes = {101: (AHat,
|
|||
'hby1',
|
||||
APriceAwesome,
|
||||
5),
|
||||
166: (AGirlsHat,
|
||||
166: (AHat,
|
||||
'hrb8',
|
||||
APriceBasicPlus,
|
||||
6),
|
||||
|
@ -292,7 +283,7 @@ AccessoryTypes = {101: (AHat,
|
|||
'hbb7',
|
||||
APriceBasic,
|
||||
6),
|
||||
169: (AGirlsHat,
|
||||
169: (AHat,
|
||||
'hrb9',
|
||||
APriceBasicPlus,
|
||||
6),
|
||||
|
@ -300,7 +291,7 @@ AccessoryTypes = {101: (AHat,
|
|||
'hwt2',
|
||||
APriceAwesome,
|
||||
4),
|
||||
171: (AGirlsHat,
|
||||
171: (AHat,
|
||||
'hhw1',
|
||||
APriceBasicPlus,
|
||||
7),
|
||||
|
@ -412,11 +403,11 @@ AccessoryTypes = {101: (AHat,
|
|||
'gsr1',
|
||||
APriceBasicPlus,
|
||||
5),
|
||||
223: (ABoysGlasses,
|
||||
223: (AGlasses,
|
||||
'ghw1',
|
||||
APriceTest,
|
||||
APriceBasic,
|
||||
0),
|
||||
224: (ABoysGlasses,
|
||||
224: (AGlasses,
|
||||
'ghw2',
|
||||
APriceBasic,
|
||||
7),
|
||||
|
@ -564,11 +555,11 @@ AccessoryTypes = {101: (AHat,
|
|||
'scs1',
|
||||
APriceBasicPlus,
|
||||
6),
|
||||
405: (ABoysShoes,
|
||||
405: (AShoes,
|
||||
'swt1',
|
||||
APriceBasicPlus,
|
||||
1),
|
||||
406: (AGirlsShoes,
|
||||
406: (AShoes,
|
||||
'smj1',
|
||||
APriceBasicPlus,
|
||||
1),
|
||||
|
@ -604,11 +595,11 @@ AccessoryTypes = {101: (AHat,
|
|||
'sht1',
|
||||
APriceAwesome,
|
||||
4),
|
||||
415: (AGirlsShoes,
|
||||
415: (AShoes,
|
||||
'smj2',
|
||||
APriceBasicPlus,
|
||||
3),
|
||||
416: (AGirlsShoes,
|
||||
416: (AShoes,
|
||||
'smj3',
|
||||
APriceBasicPlus,
|
||||
4),
|
||||
|
@ -664,7 +655,7 @@ AccessoryTypes = {101: (AHat,
|
|||
'slf1',
|
||||
APriceBasicPlus,
|
||||
3),
|
||||
430: (AGirlsShoes,
|
||||
430: (AShoes,
|
||||
'smj4',
|
||||
APriceBasicPlus,
|
||||
2),
|
||||
|
|
|
@ -78,9 +78,6 @@ class CatalogItem:
|
|||
def storedInCloset(self):
|
||||
return 0
|
||||
|
||||
def storedInTrunk(self):
|
||||
return 0
|
||||
|
||||
def storedInAttic(self):
|
||||
return 0
|
||||
|
||||
|
|
Loading…
Reference in a new issue