Valentines Day

This commit is contained in:
John 2015-06-25 21:43:32 +03:00
parent 721a28d9cf
commit 812164a696
8 changed files with 21 additions and 7 deletions

View file

@ -105,6 +105,15 @@ Holidays = {
'startMessage': TTLocalizer.NewYearFireworksStart,
'ongoingMessage': TTLocalizer.NewYearFireworksStart,
'endMessage': TTLocalizer.NewYearFireworksEnd
},
ToontownGlobals.VALENTOONS_DAY: {
'startMonth': 2,
'startDay': 9,
'endMonth': 2,
'endDay': 16,
'startMessage': TTLocalizer.ValentinesDayStart,
'ongoingMessage': TTLocalizer.ValentinesDayStart,
'endMessage': TTLocalizer.ValentinesDayEnd
}
}

View file

@ -6,7 +6,6 @@ from direct.showbase import PythonUtil
from direct.fsm.FSM import FSM
from toontown.parties import PartyGlobals
from toontown.parties import PartyUtils
from toontown.toonbase.ToontownGlobals import VALENTINES_DAY
class InviteVisual(DirectFrame):
notify = directNotify.newCategory('InviteVisual')

View file

@ -48,7 +48,7 @@ class PartyEditor(DirectObject, FSM):
self.partyPlanner.gui.find('**/activitiesButtonDown_inactive')), incButton_relief=None, incButton_pos=(-0.05, 0.0, -0.94), itemFrame_pos=(pos[0], pos[1], pos[2] + 0.04), itemFrame_relief=None, numItemsVisible=1, items=[])
isWinter = base.cr.newsManager.isHolidayRunning(ToontownGlobals.CHRISTMAS)
isVictory = base.cr.newsManager.isHolidayRunning(ToontownGlobals.VICTORY_PARTY_HOLIDAY)
isValentine = base.cr.newsManager.isHolidayRunning(ToontownGlobals.VALENTINES_DAY)
isValentine = base.cr.newsManager.isHolidayRunning(ToontownGlobals.VALENTOONS_DAY)
for activityId in PartyGlobals.PartyEditorActivityOrder:
if not isVictory and activityId in PartyGlobals.VictoryPartyActivityIds or not isWinter and activityId in PartyGlobals.WinterPartyActivityIds or not isValentine and activityId in PartyGlobals.ValentinePartyActivityIds:
pass

View file

@ -160,7 +160,7 @@ class PartyPlanner(DirectFrame, FSM):
defaultInviteTheme = PartyGlobals.InviteTheme.VictoryParty
elif base.cr.newsManager.isHolidayRunning(ToontownGlobals.KARTING_TICKETS_HOLIDAY) or base.cr.newsManager.isHolidayRunning(ToontownGlobals.GRAND_PRIX):
defaultInviteTheme = PartyGlobals.InviteTheme.Racing
elif base.cr.newsManager.isHolidayRunning(ToontownGlobals.VALENTINES_DAY):
elif base.cr.newsManager.isHolidayRunning(ToontownGlobals.VALENTOONS_DAY):
defaultInviteTheme = PartyGlobals.InviteTheme.Valentoons
if self.partyInfo is not None:
del self.partyInfo
@ -592,7 +592,7 @@ class PartyPlanner(DirectFrame, FSM):
def __handleHolidays(self):
self.inviteThemes = range(len(PartyGlobals.InviteTheme))
if not base.cr.newsManager.isHolidayRunning(ToontownGlobals.VALENTINES_DAY):
if not base.cr.newsManager.isHolidayRunning(ToontownGlobals.VALENTOONS_DAY):
self.inviteThemes.remove(PartyGlobals.InviteTheme.Valentoons)
if not base.cr.newsManager.isHolidayRunning(ToontownGlobals.VICTORY_PARTY_HOLIDAY):
self.inviteThemes.remove(PartyGlobals.InviteTheme.VictoryParty)

View file

@ -59,6 +59,9 @@ class DistributedTreasure(DistributedObject.DistributedObject):
def loadModel(self):
modelPath, grabSoundPath = TreasureGlobals.TreasureModels[self.treasureType]
if base.cr.newsManager.isHolidayRunning(VALENTOONS_DAY):
modelPath = TreasureGlobals.ValentineTreasureModel
self.grabSound = base.loadSfx(grabSoundPath)
self.rejectSound = base.loadSfx(self.rejectSoundPath)
if self.nodePath == None:

View file

@ -1,5 +1,6 @@
from RegenTreasurePlannerAI import RegenTreasurePlannerAI
from direct.directnotify import DirectNotifyGlobal
from toontown.toonbase import ToontownGlobals
class SZTreasurePlannerAI(RegenTreasurePlannerAI):
notify = DirectNotifyGlobal.directNotify.newCategory('SZTreasurePlannerAI')
@ -16,7 +17,7 @@ class SZTreasurePlannerAI(RegenTreasurePlannerAI):
def validAvatar(self, treasure, av):
# Avatars can only heal if they are missing some health, but aren't sad.
if av.getHp() < av.getMaxHp() and av.getHp() > 0:
av.toonUp(self.healAmount)
av.toonUp(self.healAmount * 2 if simbase.air.newsManager.isHolidayRunning(ToontownGlobals.VALENTOONS_DAY) else self.healAmount)
return True
else:
return False
return False

View file

@ -9,6 +9,8 @@ TreasureDL = 5
TreasureOZ = 6
TreasureE = 7
ValentineTreasureModel = 'phase_4/models/props/tt_m_ara_ext_heart'
TreasureModels = {
TreasureTT: (
'phase_4/models/props/icecream',

View file

@ -872,7 +872,7 @@ BEAN_COUNTER_INVASION = 54
DOUBLE_TALKER_INVASION = 55
DOWNSIZER_INVASION = 56
HYDRANT_ZERO_HOLIDAY = 58
VALENTINES_DAY = 59
VALENTOONS_DAY = 59
SILLYMETER_HOLIDAY = 60
MAILBOX_ZERO_HOLIDAY = 61
TRASHCAN_ZERO_HOLIDAY = 62