From 639a8d953c47bc3f3a4d6a4c9668a5144a2657b5 Mon Sep 17 00:00:00 2001 From: Loudrob Date: Fri, 6 Mar 2015 21:13:52 -0500 Subject: [PATCH] CodeRedemption: Added notice, and added all catalog item imports. --- .../coderedemption/TTCodeRedemptionMgrAI.py | 18 +++++++++++++----- toontown/shtiker/OptionsPage.py | 1 + 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/toontown/coderedemption/TTCodeRedemptionMgrAI.py b/toontown/coderedemption/TTCodeRedemptionMgrAI.py index b4303199..c4d7c064 100644 --- a/toontown/coderedemption/TTCodeRedemptionMgrAI.py +++ b/toontown/coderedemption/TTCodeRedemptionMgrAI.py @@ -1,6 +1,15 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI from toontown.catalog import CatalogClothingItem +from toontown.catalog import CatalogNametagItem +from toontown.catalog import CatalogChatItem +from toontown.catalog import CatalogEmoteItem +from toontown.catalog import CatalogGardenItem +from toontown.catalog import CatalogGardenStarterItem +from toontown.catalog import CatalogMouldingItem +from toontown.catalog import CatalogRentalItem +from toontown.catalog import CatalogFurnitureItem +from toontown.catalog import CatalogFlooringItem from toontown.toonbase import ToontownGlobals from datetime import datetime, timedelta import time @@ -22,12 +31,11 @@ Expiration date, month and day are optional fields. class TTCodeRedemptionMgrAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory("TTCodeRedemptionMgrAI") codes = { - 'weed': { + 'test': { 'items': [ CatalogClothingItem.CatalogClothingItem(1821, 0) - ], - 'month': 4, - 'day': 20 + ] + 'expirationDate': datetime(2015, 3, 30) } } @@ -82,4 +90,4 @@ class TTCodeRedemptionMgrAI(DistributedObjectAI): av.onOrder.append(item) av.b_setDeliverySchedule(av.onOrder) - self.sendUpdateToAvatarId(avId, 'redeemCodeResult', [context, 0, 0]) \ No newline at end of file + self.sendUpdateToAvatarId(avId, 'redeemCodeResult', [context, 0, 0]) diff --git a/toontown/shtiker/OptionsPage.py b/toontown/shtiker/OptionsPage.py index 79bff0eb..4ea1b8af 100644 --- a/toontown/shtiker/OptionsPage.py +++ b/toontown/shtiker/OptionsPage.py @@ -568,6 +568,7 @@ class CodesTabPage(DirectFrame): return def load(self): + self.notice = DirectLabel(parent=self, relief=None, text='NOTICE: All codes can only be entered once!', text_scale=0.06, pos=(0.0, 0, 0.53), text_fg=Vec4(1.0, 0, 0, 1)) cdrGui = loader.loadModel('phase_3.5/models/gui/tt_m_gui_sbk_codeRedemptionGui') instructionGui = cdrGui.find('**/tt_t_gui_sbk_cdrPresent') flippyGui = cdrGui.find('**/tt_t_gui_sbk_cdrFlippy')