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

This reverts commit c866a4a52f.
This commit is contained in:
John Cote 2015-05-17 00:52:14 -04:00
parent 35b064a59e
commit 88606b3876
5 changed files with 266 additions and 154 deletions

View file

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

View file

@ -7,6 +7,15 @@ 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
@ -19,7 +28,7 @@ AccessoryTypes = {101: (AHat,
'hsf1',
APriceCool,
5),
103: (AHat,
103: (AGirlsHat,
'hrb1',
APriceBasic,
1),
@ -31,11 +40,11 @@ AccessoryTypes = {101: (AHat,
'hsf3',
APriceCool,
0),
106: (AHat,
106: (AGirlsHat,
'hrb2',
APriceBasicPlus,
3),
107: (AHat,
107: (AGirlsHat,
'hrb3',
APriceBasicPlus,
0),
@ -87,7 +96,7 @@ AccessoryTypes = {101: (AHat,
'hpb1',
APriceBasicPlus,
6),
120: (AHat,
120: (ABoysHat,
'hcr1',
10000,
5),
@ -123,23 +132,23 @@ AccessoryTypes = {101: (AHat,
'hst1',
APriceBasicPlus,
1),
129: (AHat,
129: (AGirlsHat,
'hsu1',
APriceCool,
1),
130: (AHat,
130: (AGirlsHat,
'hrb4',
APriceBasic,
1),
131: (AHat,
131: (AGirlsHat,
'hrb5',
APriceBasicPlus,
4),
132: (AHat,
132: (AGirlsHat,
'hrb6',
APriceBasic,
2),
133: (AHat,
133: (AGirlsHat,
'hrb7',
APriceBasicPlus,
6),
@ -147,7 +156,7 @@ AccessoryTypes = {101: (AHat,
'hat1',
APriceCool,
2),
135: (AHat,
135: (AGirlsHat,
'hhd1',
APriceCool,
2),
@ -179,11 +188,11 @@ AccessoryTypes = {101: (AHat,
'hft2',
APriceCool,
6),
143: (AHat,
143: (ABoysHat,
'hhd2',
APriceCool,
3),
144: (AHat,
144: (AGirlsHat,
'hpc1',
APriceCool,
5),
@ -199,7 +208,7 @@ AccessoryTypes = {101: (AHat,
'hat2',
APriceCool,
2),
148: (AHat,
148: (AGirlsHat,
'htr1',
10000,
3),
@ -271,7 +280,7 @@ AccessoryTypes = {101: (AHat,
'hby1',
APriceAwesome,
5),
166: (AHat,
166: (AGirlsHat,
'hrb8',
APriceBasicPlus,
6),
@ -283,7 +292,7 @@ AccessoryTypes = {101: (AHat,
'hbb7',
APriceBasic,
6),
169: (AHat,
169: (AGirlsHat,
'hrb9',
APriceBasicPlus,
6),
@ -291,7 +300,7 @@ AccessoryTypes = {101: (AHat,
'hwt2',
APriceAwesome,
4),
171: (AHat,
171: (AGirlsHat,
'hhw1',
APriceBasicPlus,
7),
@ -403,11 +412,11 @@ AccessoryTypes = {101: (AHat,
'gsr1',
APriceBasicPlus,
5),
223: (AGlasses,
223: (ABoysGlasses,
'ghw1',
APriceBasic,
APriceTest,
0),
224: (AGlasses,
224: (ABoysGlasses,
'ghw2',
APriceBasic,
7),
@ -551,11 +560,11 @@ AccessoryTypes = {101: (AHat,
'scs1',
APriceBasicPlus,
6),
405: (AShoes,
405: (ABoysShoes,
'swt1',
APriceBasicPlus,
1),
406: (AShoes,
406: (AGirlsShoes,
'smj1',
APriceBasicPlus,
1),
@ -591,11 +600,11 @@ AccessoryTypes = {101: (AHat,
'sht1',
APriceAwesome,
4),
415: (AShoes,
415: (AGirlsShoes,
'smj2',
APriceBasicPlus,
3),
416: (AShoes,
416: (AGirlsShoes,
'smj3',
APriceBasicPlus,
4),
@ -651,7 +660,7 @@ AccessoryTypes = {101: (AHat,
'slf1',
APriceBasicPlus,
3),
430: (AShoes,
430: (AGirlsShoes,
'smj4',
APriceBasicPlus,
2),

View file

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

View file

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

View file

@ -0,0 +1,26 @@
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