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