No more accessory, clothing, furniture item gender discrimination! (except for skirts)

This commit is contained in:
DenialMC 2015-05-15 22:37:41 +03:00
parent 568eb60cca
commit c866a4a52f
5 changed files with 154 additions and 266 deletions

View file

@ -18,42 +18,6 @@ class CatalogAccessoryItem(CatalogItem.CatalogItem):
def storedInTrunk(self): def storedInTrunk(self):
return 1 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
@ -311,19 +275,19 @@ class CatalogAccessoryItem(CatalogItem.CatalogItem):
def isHat(self): def isHat(self):
article = AccessoryTypes[self.accessoryType][ATArticle] article = AccessoryTypes[self.accessoryType][ATArticle]
return article in [AHat, ABoysHat, AGirlsHat] return article == AHat
def areGlasses(self): def areGlasses(self):
article = AccessoryTypes[self.accessoryType][ATArticle] article = AccessoryTypes[self.accessoryType][ATArticle]
return article in [AGlasses, ABoysGlasses, AGirlsGlasses] return article == AGlasses
def isBackpack(self): def isBackpack(self):
article = AccessoryTypes[self.accessoryType][ATArticle] article = AccessoryTypes[self.accessoryType][ATArticle]
return article in [ABackpack, ABoysBackpack, AGirlsBackpack] return article == ABackpack
def areShoes(self): def areShoes(self):
article = AccessoryTypes[self.accessoryType][ATArticle] article = AccessoryTypes[self.accessoryType][ATArticle]
return article in [AShoes, ABoysShoes, AGirlsShoes] return article == AShoes
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))

View file

@ -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),
@ -560,11 +551,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),
@ -600,11 +591,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),
@ -660,7 +651,7 @@ AccessoryTypes = {101: (AHat,
'slf1', 'slf1',
APriceBasicPlus, APriceBasicPlus,
3), 3),
430: (AGirlsShoes, 430: (AShoes,
'smj4', 'smj4',
APriceBasicPlus, APriceBasicPlus,
2), 2),

View file

@ -10,72 +10,68 @@ CTArticle = 0
CTString = 1 CTString = 1
CTBasePrice = 2 CTBasePrice = 2
CTEmblemPrices = 3 CTEmblemPrices = 3
ABoysShirt = 0 AShirt = 0
AGirlsShirt = 1 AShorts = 1
AShirt = 2 AGirlsSkirt = 2
ABoysShorts = 3 ClothingTypes = {101: (AShirt, 'bss1', 40),
AGirlsShorts = 4 102: (AShirt, 'bss2', 40),
AGirlsSkirt = 5 103: (AShirt, 'bss3', 40),
AShorts = 6 105: (AShirt, 'bss4', 40),
ClothingTypes = {101: (ABoysShirt, 'bss1', 40), 104: (AShirt, 'bss5', 40),
102: (ABoysShirt, 'bss2', 40), 106: (AShirt, 'bss6', 40),
103: (ABoysShirt, 'bss3', 40), 107: (AShirt, 'bss7', 40),
105: (ABoysShirt, 'bss4', 40), 108: (AShirt, 'bss8', 40),
104: (ABoysShirt, 'bss5', 40), 109: (AShirt, 'bss9', 40),
106: (ABoysShirt, 'bss6', 40), 111: (AShirt, 'bss11', 40),
107: (ABoysShirt, 'bss7', 40), 115: (AShirt, 'bss15', 40),
108: (ABoysShirt, 'bss8', 40), 116: (AShirt, 'c_ss1', 80),
109: (ABoysShirt, 'bss9', 40), 117: (AShirt, 'c_ss2', 80),
111: (ABoysShirt, 'bss11', 40), 118: (AShirt, 'c_bss1', 80),
115: (ABoysShirt, 'bss15', 40), 119: (AShirt, 'c_bss2', 80),
116: (ABoysShirt, 'c_ss1', 80), 120: (AShirt, 'c_ss3', 80),
117: (ABoysShirt, 'c_ss2', 80), 121: (AShirt, 'c_bss3', 80),
118: (ABoysShirt, 'c_bss1', 80), 122: (AShirt, 'c_bss4', 80),
119: (ABoysShirt, 'c_bss2', 80), 123: (AShirt, 'c_ss4', 120),
120: (ABoysShirt, 'c_ss3', 80), 124: (AShirt, 'c_ss5', 120),
121: (ABoysShirt, 'c_bss3', 80),
122: (ABoysShirt, 'c_bss4', 80),
123: (ABoysShirt, 'c_ss4', 120),
124: (ABoysShirt, 'c_ss5', 120),
125: (AShirt, 'c_ss6', 120), 125: (AShirt, 'c_ss6', 120),
126: (AShirt, 'c_ss7', 120), 126: (AShirt, 'c_ss7', 120),
127: (AShirt, 'c_ss8', 120), 127: (AShirt, 'c_ss8', 120),
128: (AShirt, 'c_ss9', 120), 128: (AShirt, 'c_ss9', 120),
129: (AShirt, 'c_ss10', 120), 129: (AShirt, 'c_ss10', 120),
130: (AShirt, 'c_ss11', 120), 130: (AShirt, 'c_ss11', 120),
131: (ABoysShirt, 'c_ss12', 160), 131: (AShirt, 'c_ss12', 160),
201: (AGirlsShirt, 'gss1', 40), 201: (AShirt, 'gss1', 40),
202: (AGirlsShirt, 'gss2', 40), 202: (AShirt, 'gss2', 40),
203: (AGirlsShirt, 'gss3', 40), 203: (AShirt, 'gss3', 40),
205: (AGirlsShirt, 'gss4', 40), 205: (AShirt, 'gss4', 40),
204: (AGirlsShirt, 'gss5', 40), 204: (AShirt, 'gss5', 40),
206: (AGirlsShirt, 'gss6', 40), 206: (AShirt, 'gss6', 40),
207: (AGirlsShirt, 'gss7', 40), 207: (AShirt, 'gss7', 40),
208: (AGirlsShirt, 'gss8', 40), 208: (AShirt, 'gss8', 40),
209: (AGirlsShirt, 'gss9', 40), 209: (AShirt, 'gss9', 40),
211: (AGirlsShirt, 'gss11', 40), 211: (AShirt, 'gss11', 40),
215: (AGirlsShirt, 'gss15', 40), 215: (AShirt, 'gss15', 40),
216: (AGirlsShirt, 'c_ss1', 80), 216: (AShirt, 'c_ss1', 80),
217: (AGirlsShirt, 'c_ss2', 80), 217: (AShirt, 'c_ss2', 80),
218: (AGirlsShirt, 'c_gss1', 80), 218: (AShirt, 'c_gss1', 80),
219: (AGirlsShirt, 'c_gss2', 80), 219: (AShirt, 'c_gss2', 80),
220: (AGirlsShirt, 'c_ss3', 80), 220: (AShirt, 'c_ss3', 80),
221: (AGirlsShirt, 'c_gss3', 80), 221: (AShirt, 'c_gss3', 80),
222: (AGirlsShirt, 'c_gss4', 80), 222: (AShirt, 'c_gss4', 80),
223: (AGirlsShirt, 'c_gss5', 80), 223: (AShirt, 'c_gss5', 80),
224: (AGirlsShirt, 'c_ss4', 120), 224: (AShirt, 'c_ss4', 120),
225: (AGirlsShirt, 'c_ss13', 160), 225: (AShirt, 'c_ss13', 160),
301: (ABoysShorts, 'bbs1', 50), 301: (AShorts, 'bbs1', 50),
302: (ABoysShorts, 'bbs2', 50), 302: (AShorts, 'bbs2', 50),
303: (ABoysShorts, 'bbs3', 50), 303: (AShorts, 'bbs3', 50),
304: (ABoysShorts, 'bbs4', 50), 304: (AShorts, 'bbs4', 50),
305: (ABoysShorts, 'bbs5', 50), 305: (AShorts, 'bbs5', 50),
308: (ABoysShorts, 'bbs8', 50), 308: (AShorts, 'bbs8', 50),
310: (ABoysShorts, 'c_bs1', 120), 310: (AShorts, 'c_bs1', 120),
311: (ABoysShorts, 'c_bs2', 120), 311: (AShorts, 'c_bs2', 120),
312: (ABoysShorts, 'c_bs3', 120), 312: (AShorts, 'c_bs3', 120),
313: (ABoysShorts, 'c_bs4', 120), 313: (AShorts, 'c_bs4', 120),
314: (ABoysShorts, 'c_bs5', 160), 314: (AShorts, 'c_bs5', 160),
401: (AGirlsSkirt, 'gsk1', 50), 401: (AGirlsSkirt, 'gsk1', 50),
403: (AGirlsSkirt, 'gsk3', 50), 403: (AGirlsSkirt, 'gsk3', 50),
404: (AGirlsSkirt, 'gsk4', 50), 404: (AGirlsSkirt, 'gsk4', 50),
@ -88,19 +84,19 @@ ClothingTypes = {101: (ABoysShirt, 'bss1', 40),
412: (AGirlsSkirt, 'c_gsk5', 120), 412: (AGirlsSkirt, 'c_gsk5', 120),
413: (AGirlsSkirt, 'c_gsk6', 120), 413: (AGirlsSkirt, 'c_gsk6', 120),
414: (AGirlsSkirt, 'c_gsk7', 160), 414: (AGirlsSkirt, 'c_gsk7', 160),
451: (AGirlsShorts, 'gsh1', 50), 451: (AShorts, 'gsh1', 50),
452: (AGirlsShorts, 'gsh2', 50), 452: (AShorts, 'gsh2', 50),
453: (AGirlsShorts, 'gsh3', 50), 453: (AShorts, 'gsh3', 50),
1001: (AShirt, 'hw_ss1', 200), 1001: (AShirt, 'hw_ss1', 200),
1002: (AShirt, 'hw_ss2', 200), 1002: (AShirt, 'hw_ss2', 200),
1100: (AShirt, 'wh_ss1', 200), 1100: (AShirt, 'wh_ss1', 200),
1101: (AShirt, 'wh_ss2', 200), 1101: (AShirt, 'wh_ss2', 200),
1102: (AShirt, 'wh_ss3', 200), 1102: (AShirt, 'wh_ss3', 200),
1103: (AShirt, 'wh_ss4', 200), 1103: (AShirt, 'wh_ss4', 200),
1104: (ABoysShorts, 'wh_bs1', 200), 1104: (AShorts, 'wh_bs1', 200),
1105: (ABoysShorts, 'wh_bs2', 200), 1105: (AShorts, 'wh_bs2', 200),
1106: (ABoysShorts, 'wh_bs3', 200), 1106: (AShorts, 'wh_bs3', 200),
1107: (ABoysShorts, 'wh_bs4', 200), 1107: (AShorts, 'wh_bs4', 200),
1108: (AGirlsSkirt, 'wh_gsk1', 200), 1108: (AGirlsSkirt, 'wh_gsk1', 200),
1109: (AGirlsSkirt, 'wh_gsk2', 200), 1109: (AGirlsSkirt, 'wh_gsk2', 200),
1110: (AGirlsSkirt, 'wh_gsk3', 200), 1110: (AGirlsSkirt, 'wh_gsk3', 200),
@ -110,36 +106,36 @@ ClothingTypes = {101: (ABoysShirt, 'bss1', 40),
1114: (AShirt, 'hw_ss7', 200), 1114: (AShirt, 'hw_ss7', 200),
1115: (AShirt, 'hw_ss8', 200), 1115: (AShirt, 'hw_ss8', 200),
1116: (AShirt, 'hw_ss9', 300), 1116: (AShirt, 'hw_ss9', 300),
1117: (ABoysShorts, 'hw_bs1', 200), 1117: (AShorts, 'hw_bs1', 200),
1118: (ABoysShorts, 'hw_bs2', 300), 1118: (AShorts, 'hw_bs2', 300),
1119: (ABoysShorts, 'hw_bs5', 200), 1119: (AShorts, 'hw_bs5', 200),
1120: (ABoysShorts, 'hw_bs6', 200), 1120: (AShorts, 'hw_bs6', 200),
1121: (ABoysShorts, 'hw_bs7', 300), 1121: (AShorts, 'hw_bs7', 300),
1122: (AGirlsShorts, 'hw_gs1', 200), 1122: (AShorts, 'hw_gs1', 200),
1123: (AGirlsShorts, 'hw_gs2', 300), 1123: (AShorts, 'hw_gs2', 300),
1124: (AGirlsShorts, 'hw_gs5', 200), 1124: (AShorts, 'hw_gs5', 200),
1125: (AGirlsShorts, 'hw_gs6', 200), 1125: (AShorts, 'hw_gs6', 200),
1126: (AGirlsShorts, 'hw_gs7', 300), 1126: (AShorts, 'hw_gs7', 300),
1127: (AGirlsSkirt, 'hw_gsk1', 300), 1127: (AGirlsSkirt, 'hw_gsk1', 300),
1200: (AGirlsShirt, 'vd_ss1', 200), 1200: (AShirt, 'vd_ss1', 200),
1201: (AShirt, 'vd_ss2', 200), 1201: (AShirt, 'vd_ss2', 200),
1202: (ABoysShirt, 'vd_ss3', 200), 1202: (AShirt, 'vd_ss3', 200),
1203: (AGirlsShirt, 'vd_ss4', 200), 1203: (AShirt, 'vd_ss4', 200),
1204: (AGirlsSkirt, 'vd_gs1', 200), 1204: (AGirlsSkirt, 'vd_gs1', 200),
1205: (ABoysShorts, 'vd_bs1', 200), 1205: (AShorts, 'vd_bs1', 200),
1206: (AShirt, 'vd_ss5', 200), 1206: (AShirt, 'vd_ss5', 200),
1207: (AShirt, 'vd_ss6', 200), 1207: (AShirt, 'vd_ss6', 200),
1208: (ABoysShorts, 'vd_bs2', 200), 1208: (AShorts, 'vd_bs2', 200),
1209: (ABoysShorts, 'vd_bs3', 200), 1209: (AShorts, 'vd_bs3', 200),
1210: (AGirlsSkirt, 'vd_gs2', 200), 1210: (AGirlsSkirt, 'vd_gs2', 200),
1211: (AGirlsSkirt, 'vd_gs3', 200), 1211: (AGirlsSkirt, 'vd_gs3', 200),
1212: (AShirt, 'vd_ss7', 200), 1212: (AShirt, 'vd_ss7', 200),
1300: (AShirt, 'sd_ss1', 200), 1300: (AShirt, 'sd_ss1', 200),
1301: (AShirt, 'sd_ss2', 225), 1301: (AShirt, 'sd_ss2', 225),
1302: (AGirlsShorts, 'sd_gs1', 200), 1302: (AShorts, 'sd_gs1', 200),
1303: (ABoysShorts, 'sd_bs1', 200), 1303: (AShorts, 'sd_bs1', 200),
1304: (AShirt, 'sd_ss3', 25), 1304: (AShirt, 'sd_ss3', 25),
1305: (ABoysShorts, 'sd_bs2', 25), 1305: (AShorts, 'sd_bs2', 25),
1306: (AGirlsSkirt, 'sd_gs2', 25), 1306: (AGirlsSkirt, 'sd_gs2', 25),
1400: (AShirt, 'tc_ss1', 200), 1400: (AShirt, 'tc_ss1', 200),
1401: (AShirt, 'tc_ss2', 200), 1401: (AShirt, 'tc_ss2', 200),
@ -150,17 +146,17 @@ ClothingTypes = {101: (ABoysShirt, 'bss1', 40),
1406: (AShirt, 'tc_ss7', 200), 1406: (AShirt, 'tc_ss7', 200),
1500: (AShirt, 'j4_ss1', 200), 1500: (AShirt, 'j4_ss1', 200),
1501: (AShirt, 'j4_ss2', 200), 1501: (AShirt, 'j4_ss2', 200),
1502: (ABoysShorts, 'j4_bs1', 200), 1502: (AShorts, 'j4_bs1', 200),
1503: (AGirlsSkirt, 'j4_gs1', 200), 1503: (AGirlsSkirt, 'j4_gs1', 200),
1600: (AShirt, 'pj_ss1', 500), 1600: (AShirt, 'pj_ss1', 500),
1601: (AShirt, 'pj_ss2', 500), 1601: (AShirt, 'pj_ss2', 500),
1602: (AShirt, 'pj_ss3', 500), 1602: (AShirt, 'pj_ss3', 500),
1603: (ABoysShorts, 'pj_bs1', 500), 1603: (AShorts, 'pj_bs1', 500),
1604: (ABoysShorts, 'pj_bs2', 500), 1604: (AShorts, 'pj_bs2', 500),
1605: (ABoysShorts, 'pj_bs3', 500), 1605: (AShorts, 'pj_bs3', 500),
1606: (AGirlsShorts, 'pj_gs1', 500), 1606: (AShorts, 'pj_gs1', 500),
1607: (AGirlsShorts, 'pj_gs2', 500), 1607: (AShorts, 'pj_gs2', 500),
1608: (AGirlsShorts, 'pj_gs3', 500), 1608: (AShorts, 'pj_gs3', 500),
1700: (AShirt, 'sa_ss1', 200), 1700: (AShirt, 'sa_ss1', 200),
1701: (AShirt, 'sa_ss2', 200), 1701: (AShirt, 'sa_ss2', 200),
1702: (AShirt, 'sa_ss3', 200), 1702: (AShirt, 'sa_ss3', 200),
@ -172,11 +168,11 @@ ClothingTypes = {101: (ABoysShirt, 'bss1', 40),
1708: (AShirt, 'sa_ss9', 200), 1708: (AShirt, 'sa_ss9', 200),
1709: (AShirt, 'sa_ss10', 200), 1709: (AShirt, 'sa_ss10', 200),
1710: (AShirt, 'sa_ss11', 200), 1710: (AShirt, 'sa_ss11', 200),
1711: (ABoysShorts, 'sa_bs1', 200), 1711: (AShorts, 'sa_bs1', 200),
1712: (ABoysShorts, 'sa_bs2', 200), 1712: (AShorts, 'sa_bs2', 200),
1713: (ABoysShorts, 'sa_bs3', 200), 1713: (AShorts, 'sa_bs3', 200),
1714: (ABoysShorts, 'sa_bs4', 200), 1714: (AShorts, 'sa_bs4', 200),
1715: (ABoysShorts, 'sa_bs5', 200), 1715: (AShorts, 'sa_bs5', 200),
1716: (AGirlsSkirt, 'sa_gs1', 200), 1716: (AGirlsSkirt, 'sa_gs1', 200),
1717: (AGirlsSkirt, 'sa_gs2', 200), 1717: (AGirlsSkirt, 'sa_gs2', 200),
1718: (AGirlsSkirt, 'sa_gs3', 200), 1718: (AGirlsSkirt, 'sa_gs3', 200),
@ -194,11 +190,11 @@ ClothingTypes = {101: (ABoysShirt, 'bss1', 40),
1730: (AShirt, 'sa_ss21', 200), 1730: (AShirt, 'sa_ss21', 200),
1731: (AShirt, 'sa_ss22', 200), 1731: (AShirt, 'sa_ss22', 200),
1732: (AShirt, 'sa_ss23', 200), 1732: (AShirt, 'sa_ss23', 200),
1733: (ABoysShorts, 'sa_bs6', 200), 1733: (AShorts, 'sa_bs6', 200),
1734: (ABoysShorts, 'sa_bs7', 250), 1734: (AShorts, 'sa_bs7', 250),
1735: (ABoysShorts, 'sa_bs8', 250), 1735: (AShorts, 'sa_bs8', 250),
1736: (ABoysShorts, 'sa_bs9', 200), 1736: (AShorts, 'sa_bs9', 200),
1737: (ABoysShorts, 'sa_bs10', 200), 1737: (AShorts, 'sa_bs10', 200),
1738: (AGirlsSkirt, 'sa_gs6', 200), 1738: (AGirlsSkirt, 'sa_gs6', 200),
1739: (AGirlsSkirt, 'sa_gs7', 250), 1739: (AGirlsSkirt, 'sa_gs7', 250),
1740: (AGirlsSkirt, 'sa_gs8', 250), 1740: (AGirlsSkirt, 'sa_gs8', 250),
@ -206,8 +202,8 @@ ClothingTypes = {101: (ABoysShirt, 'bss1', 40),
1742: (AGirlsSkirt, 'sa_gs10', 200), 1742: (AGirlsSkirt, 'sa_gs10', 200),
1743: (AShirt, 'sa_ss24', 250), 1743: (AShirt, 'sa_ss24', 250),
1744: (AShirt, 'sa_ss25', 250), 1744: (AShirt, 'sa_ss25', 250),
1745: (ABoysShorts, 'sa_bs11', 250), 1745: (AShorts, 'sa_bs11', 250),
1746: (ABoysShorts, 'sa_bs12', 250), 1746: (AShorts, 'sa_bs12', 250),
1747: (AGirlsSkirt, 'sa_gs11', 250), 1747: (AGirlsSkirt, 'sa_gs11', 250),
1748: (AGirlsSkirt, 'sa_gs12', 250), 1748: (AGirlsSkirt, 'sa_gs12', 250),
1749: (AShirt, 'sil_1', 1), 1749: (AShirt, 'sil_1', 1),
@ -216,8 +212,8 @@ ClothingTypes = {101: (ABoysShirt, 'bss1', 40),
1752: (AShirt, 'sil_4', 5000), 1752: (AShirt, 'sil_4', 5000),
1753: (AShirt, 'sil_5', 5000), 1753: (AShirt, 'sil_5', 5000),
1754: (AShirt, 'sil_6', 1), 1754: (AShirt, 'sil_6', 1),
1755: (ABoysShorts, 'sil_bs1', 1), 1755: (AShorts, 'sil_bs1', 1),
1756: (AGirlsShorts, 'sil_gs1', 1), 1756: (AShorts, 'sil_gs1', 1),
1757: (AShirt, 'sil_7', 20), 1757: (AShirt, 'sil_7', 20),
1758: (AShirt, 'sil_8', 20), 1758: (AShirt, 'sil_8', 20),
1759: (AShirt, 1759: (AShirt,
@ -236,24 +232,24 @@ ClothingTypes = {101: (ABoysShirt, 'bss1', 40),
1763: (AShirt, 'sb_1', 20), 1763: (AShirt, 'sb_1', 20),
1764: (AShirt, 'sa_ss27', 5000), 1764: (AShirt, 'sa_ss27', 5000),
1765: (AShirt, 'sa_ss28', 5000), 1765: (AShirt, 'sa_ss28', 5000),
1766: (ABoysShorts, 'sa_bs13', 5000), 1766: (AShorts, 'sa_bs13', 5000),
1767: (AGirlsShorts, 'sa_gs13', 5000), 1767: (AShorts, 'sa_gs13', 5000),
1768: (AShirt, 'jb_1', 20), 1768: (AShirt, 'jb_1', 20),
1769: (AShirt, 'jb_2', 20), 1769: (AShirt, 'jb_2', 20),
1770: (AShirt, 'hw_ss3', 250), 1770: (AShirt, 'hw_ss3', 250),
1771: (AShirt, 'hw_ss4', 250), 1771: (AShirt, 'hw_ss4', 250),
1772: (ABoysShorts, 'hw_bs3', 250), 1772: (AShorts, 'hw_bs3', 250),
1773: (AGirlsShorts, 'hw_gs3', 250), 1773: (AShorts, 'hw_gs3', 250),
1774: (ABoysShorts, 'hw_bs4', 250), 1774: (AShorts, 'hw_bs4', 250),
1775: (AGirlsShorts, 'hw_gs4', 250), 1775: (AShorts, 'hw_gs4', 250),
1776: (AShirt, 'ugcms', 15000), 1776: (AShirt, 'ugcms', 15000),
1777: (AShirt, 'lb_1', 20), 1777: (AShirt, 'lb_1', 20),
1778: (AShirt, 'sa_ss29', 5000), 1778: (AShirt, 'sa_ss29', 5000),
1779: (AShirt, 'sa_ss30', 5000), 1779: (AShirt, 'sa_ss30', 5000),
1780: (ABoysShorts, 'sa_bs14', 5000), 1780: (AShorts, 'sa_bs14', 5000),
1781: (AGirlsShorts, 'sa_gs14', 5000), 1781: (AShorts, 'sa_gs14', 5000),
1782: (AShirt, 'sa_ss31', 5000), 1782: (AShirt, 'sa_ss31', 5000),
1783: (ABoysShorts, 'sa_bs15', 5000), 1783: (AShorts, 'sa_bs15', 5000),
1784: (AGirlsSkirt, 'sa_gs15', 5000), 1784: (AGirlsSkirt, 'sa_gs15', 5000),
1785: (AShirt, 'sa_ss32', 5000), 1785: (AShirt, 'sa_ss32', 5000),
1786: (AShirt, 'sa_ss33', 5000), 1786: (AShirt, 'sa_ss33', 5000),
@ -261,18 +257,18 @@ ClothingTypes = {101: (ABoysShirt, 'bss1', 40),
1788: (AShirt, 'sa_ss35', 5000), 1788: (AShirt, 'sa_ss35', 5000),
1789: (AShirt, 'sa_ss36', 5000), 1789: (AShirt, 'sa_ss36', 5000),
1790: (AShirt, 'sa_ss37', 5000), 1790: (AShirt, 'sa_ss37', 5000),
1791: (ABoysShorts, 'sa_bs16', 5000), 1791: (AShorts, 'sa_bs16', 5000),
1792: (ABoysShorts, 'sa_bs17', 5000), 1792: (AShorts, 'sa_bs17', 5000),
1793: (AGirlsSkirt, 'sa_gs16', 5000), 1793: (AGirlsSkirt, 'sa_gs16', 5000),
1794: (AGirlsSkirt, 'sa_gs17', 5000), 1794: (AGirlsSkirt, 'sa_gs17', 5000),
1795: (AShirt, 'sa_ss38', 5000), 1795: (AShirt, 'sa_ss38', 5000),
1796: (AShirt, 'sa_ss39', 5000), 1796: (AShirt, 'sa_ss39', 5000),
1797: (ABoysShorts, 'sa_bs18', 5000), 1797: (AShorts, 'sa_bs18', 5000),
1798: (AGirlsSkirt, 'sa_gs18', 5000), 1798: (AGirlsSkirt, 'sa_gs18', 5000),
1799: (AShirt, 'sa_ss40', 5000), 1799: (AShirt, 'sa_ss40', 5000),
1800: (AShirt, 'sa_ss41', 5000), 1800: (AShirt, 'sa_ss41', 5000),
1801: (AShirt, 'sa_ss42', 250), 1801: (AShirt, 'sa_ss42', 250),
1802: (AGirlsShirt, 'sa_ss43', 250), 1802: (AShirt, 'sa_ss43', 250),
1803: (AShirt, 'sa_ss44', 5000), 1803: (AShirt, 'sa_ss44', 5000),
1804: (AShirt, 'sa_ss45', 5000), 1804: (AShirt, 'sa_ss45', 5000),
1805: (AShirt, 'sa_ss46', 5000), 1805: (AShirt, 'sa_ss46', 5000),
@ -284,9 +280,9 @@ ClothingTypes = {101: (ABoysShirt, 'bss1', 40),
1811: (AShirt, 'sa_ss52', 5000), 1811: (AShirt, 'sa_ss52', 5000),
1812: (AShirt, 'sa_ss53', 5000), 1812: (AShirt, 'sa_ss53', 5000),
1813: (AShirt, 'sa_ss54', 5000), 1813: (AShirt, 'sa_ss54', 5000),
1814: (ABoysShorts, 'sa_bs19', 5000), 1814: (AShorts, 'sa_bs19', 5000),
1815: (ABoysShorts, 'sa_bs20', 5000), 1815: (AShorts, 'sa_bs20', 5000),
1816: (ABoysShorts, 'sa_bs21', 5000), 1816: (AShorts, 'sa_bs21', 5000),
1817: (AGirlsSkirt, 'sa_gs19', 5000), 1817: (AGirlsSkirt, 'sa_gs19', 5000),
1818: (AGirlsSkirt, 'sa_gs20', 5000), 1818: (AGirlsSkirt, 'sa_gs20', 5000),
1819: (AGirlsSkirt, 'sa_gs21', 5000), 1819: (AGirlsSkirt, 'sa_gs21', 5000),
@ -305,28 +301,11 @@ class CatalogClothingItem(CatalogItem.CatalogItem):
return 1 return 1
def notOfferedTo(self, avatar): def notOfferedTo(self, avatar):
article = ClothingTypes[self.clothingType][CTArticle] return avatar.getStyle().getGender() == 'm' and self.forGirlsOnly()
if article == AShirt or article == AShorts:
return 0
forBoys = (article == ABoysShirt or article == ABoysShorts)
if avatar.getStyle().getGender() == 'm':
return not forBoys
else:
return forBoys
def forBoysOnly(self):
article = ClothingTypes[self.clothingType][CTArticle]
if article == ABoysShirt or article == ABoysShorts:
return 1
else:
return 0
def forGirlsOnly(self): def forGirlsOnly(self):
article = ClothingTypes[self.clothingType][CTArticle] article = ClothingTypes[self.clothingType][CTArticle]
if article == AGirlsShirt or article == AGirlsSkirt or article == AGirlsShorts: return article == AGirlsSkirt
return 1
else:
return 0
def getPurchaseLimit(self): def getPurchaseLimit(self):
return 1 return 1
@ -499,7 +478,7 @@ class CatalogClothingItem(CatalogItem.CatalogItem):
def isShirt(self): def isShirt(self):
article = ClothingTypes[self.clothingType][CTArticle] article = ClothingTypes[self.clothingType][CTArticle]
return article < ABoysShorts return article == AShirt
def isSkirt(self): def isSkirt(self):
article = ClothingTypes[self.clothingType][CTArticle] article = ClothingTypes[self.clothingType][CTArticle]
@ -518,7 +497,7 @@ class CatalogClothingItem(CatalogItem.CatalogItem):
defn = ToonDNA.BottomStyles[str] defn = ToonDNA.BottomStyles[str]
botTex = defn[0] botTex = defn[0]
article = ClothingTypes[self.clothingType][CTArticle] article = ClothingTypes[self.clothingType][CTArticle]
if article == ABoysShorts: if article == AShorts:
return ToonDNA.BoyShorts[botTex] return ToonDNA.BoyShorts[botTex]
else: else:
return ToonDNA.GirlBottoms[botTex][0] return ToonDNA.GirlBottoms[botTex][0]

View file

@ -18,8 +18,6 @@ FLIsTable = 32
FLPhone = 64 FLPhone = 64
FLBillboard = 128 FLBillboard = 128
FLTrunk = 256 FLTrunk = 256
FLBoysOnly = 512
FLGirlsOnly = 1024
furnitureColors = [ furnitureColors = [
(0.792, 0.353, 0.29, 1.0), (0.792, 0.353, 0.29, 1.0),
(0.176, 0.592, 0.439, 1.0), (0.176, 0.592, 0.439, 1.0),
@ -163,8 +161,7 @@ FurnitureTypes = {
210: ('phase_5.5/models/estate/girly_bed', 210: ('phase_5.5/models/estate/girly_bed',
None, None,
None, None,
450, 450),
FLGirlsOnly),
220: ('phase_5.5/models/estate/bathtub_bed', 220: ('phase_5.5/models/estate/bathtub_bed',
None, None,
None, None,
@ -208,8 +205,7 @@ FurnitureTypes = {
410: ('phase_5.5/models/estate/FireplaceGirlee', 410: ('phase_5.5/models/estate/FireplaceGirlee',
None, None,
None, None,
800, 800),
FLGirlsOnly),
420: ('phase_5.5/models/estate/FireplaceRound', 420: ('phase_5.5/models/estate/FireplaceRound',
None, None,
None, None,
@ -251,7 +247,7 @@ FurnitureTypes = {
None, None,
None, None,
1100, 1100,
FLGirlsOnly, None,
None, None,
0.5), 0.5),
491: ('phase_5.5/models/estate/tt_m_prp_int_fireplace_bugRoom', 491: ('phase_5.5/models/estate/tt_m_prp_int_fireplace_bugRoom',
@ -917,23 +913,7 @@ class CatalogFurnitureItem(CatalogAtticItem.CatalogAtticItem):
return not forBoys return not forBoys
else: else:
return forBoys return forBoys
if self.forBoysOnly():
if avatar.getStyle().getGender() == 'm':
return 0 return 0
else:
return 1
elif self.forGirlsOnly():
if avatar.getStyle().getGender() == 'f':
return 0
else:
return 1
return 0
def forBoysOnly(self):
return self.getFlags() & FLBoysOnly > 0
def forGirlsOnly(self):
return self.getFlags() & FLGirlsOnly > 0
def isDeletable(self): def isDeletable(self):
return self.getFlags() & (FLBank | FLCloset | FLPhone | FLTrunk) == 0 return self.getFlags() & (FLBank | FLCloset | FLPhone | FLTrunk) == 0

View file

@ -1,26 +0,0 @@
import AnimatedProp
from direct.interval.IntervalGlobal import *
from direct.task import Task
import math
class SleepingHydrantAnimatedProp(AnimatedProp.AnimatedProp):
def __init__(self, node):
AnimatedProp.AnimatedProp.__init__(self, node)
self.task = None
return
def bobTask(self, task):
self.node.setSz(1.0 + 0.08 * math.sin(task.time))
return Task.cont
def enter(self):
AnimatedProp.AnimatedProp.enter(self)
self.task = taskMgr.add(self.bobTask, self.uniqueName('bobTask'))
def exit(self):
AnimatedProp.AnimatedProp.exit(self)
if self.task:
taskMgr.remove(self.task)
self.task = None
return