Remove ScavengerHuntTarget (not used in the game), remove debug print, use a list of speedchat indexes instead for effect mgr.

This commit is contained in:
John 2015-06-23 15:36:18 +03:00
parent 2b6ca4e5cd
commit 8c4f5b08f7
5 changed files with 2 additions and 56 deletions

View file

@ -334,7 +334,6 @@ from toontown.ai import DistributedReportMgr/AI
from toontown.ai import DistributedPolarPlaceEffectMgr/AI
from toontown.ai import DistributedEffectMgr/AI
from toontown.ai import DistributedResistanceEmoteMgr/AI
from toontown.ai import DistributedScavengerHuntTarget/AI
from toontown.ai import DistributedTrickOrTreatTarget/AI
from toontown.ai import DistributedWinterCarolingTarget/AI
from toontown.coghq import DistributedMint/AI
@ -2440,10 +2439,6 @@ dclass DistributedResistanceEmoteMgr : DistributedObject {
addResistanceEmote() clsend airecv;
};
dclass DistributedScavengerHuntTarget : DistributedObject {
attemptScavengerHunt() airecv clsend;
};
dclass DistributedTrickOrTreatTarget : DistributedObject {
doScavengerHunt(int8);
requestScavengerHunt() airecv clsend;

View file

@ -10,7 +10,6 @@ class DistributedEffectMgr(DistributedObject):
def setHoliday(self, holiday):
self.holiday = holiday
print 'holiday is %s' % self.holiday
self.accept(SpeedChatGlobals.SCStaticTextMsgEvent, self.__saidPhrase)
def __saidPhrase(self, phraseId):
@ -19,7 +18,7 @@ class DistributedEffectMgr(DistributedObject):
holidayInfo = HolidayGlobals.getHoliday(self.holiday)
if 'speedchatIndex' not in holidayInfo or phraseId != holidayInfo['speedchatIndex']:
if 'speedchatIndexes' not in holidayInfo or phraseId not in holidayInfo['speedchatIndexes']:
return
self.sendUpdate('addEffect')

View file

@ -1,40 +0,0 @@
from direct.directnotify import DirectNotifyGlobal
from direct.distributed import DistributedObject
from otp.speedchat import SpeedChatGlobals
class DistributedScavengerHuntTarget(DistributedObject.DistributedObject):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedScavengerHuntTarget')
def __init__(self, cr):
DistributedObject.DistributedObject.__init__(self, cr)
def setupListenerDetails(self):
self.triggered = False
self.triggerDelay = 15
self.accept(SpeedChatGlobals.SCCustomMsgEvent, self.phraseSaid)
def phraseSaid(self, phraseId):
self.notify.debug('Checking if phrase was said')
helpPhrase = 10003
def reset():
self.triggered = False
if phraseId == helpPhrase and not self.triggered:
self.triggered = True
self.attemptScavengerHunt()
taskMgr.doMethodLater(self.triggerDelay, reset, 'ScavengerHunt-phrase-reset', extraArgs=[])
def announceGenerate(self):
DistributedObject.DistributedObject.announceGenerate(self)
DistributedScavengerHuntTarget.notify.debug('announceGenerate')
self.setupListenerDetails()
def delete(self):
self.ignoreAll()
taskMgr.remove('ScavengerHunt-phrase-reset')
DistributedObject.DistributedObject.delete(self)
def attemptScavengerHunt(self):
DistributedScavengerHuntTarget.notify.debug('attempScavengerHunt')
self.sendUpdate('attemptScavengerHunt', [])

View file

@ -1,8 +0,0 @@
from direct.directnotify import DirectNotifyGlobal
from direct.distributed.DistributedObjectAI import DistributedObjectAI
class DistributedScavengerHuntTargetAI(DistributedObjectAI):
notify = DirectNotifyGlobal.directNotify.newCategory("DistributedScavengerHuntTargetAI")
def attemptScavengerHunt(self):
pass

View file

@ -53,7 +53,7 @@ Holidays = {
'startMessage': TTLocalizer.IdesOfMarchStart,
'ongoingMessage': TTLocalizer.IdesOfMarchStart,
'endMessage': TTLocalizer.IdesOfMarchEnd,
'speedchatIndex': 30450, # It's easy to be green!
'speedchatIndexes': [30450], # It's easy to be green!
'effectMessage': TTLocalizer.GreenToonEffectMsg
}
}