Add silly meter code and make codes case insensitive

This commit is contained in:
DenialMC 2015-05-11 01:09:48 +03:00
parent de561c6fc3
commit bd25086f69

View file

@ -43,7 +43,6 @@ only include the comma if there are multiple arguments.
class TTCodeRedemptionMgrAI(DistributedObjectAI):
notify = DirectNotifyGlobal.directNotify.newCategory("TTCodeRedemptionMgrAI")
codes = {
# weed code is for testing purposes, remove when done.
'weed': {
'items': [
CatalogClothingItem.CatalogClothingItem(1821, 0)
@ -55,6 +54,11 @@ class TTCodeRedemptionMgrAI(DistributedObjectAI):
'items': [
CatalogGardenStarterItem.CatalogGardenStarterItem()
]
},
'sillymeter': {
'items': [
CatalogClothingItem.CatalogClothingItem(1753, 0)
]
}
}
@ -77,6 +81,8 @@ class TTCodeRedemptionMgrAI(DistributedObjectAI):
if not av:
return
code = code.lower()
if code in self.codes:
if av.isCodeRedeemed(code):
self.sendUpdateToAvatarId(avId, 'redeemCodeResult', [4])