mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-24 04:02:40 -06:00
Start on Fish Bingo
This commit is contained in:
parent
1364ee1021
commit
1ff86c076d
11 changed files with 60 additions and 89 deletions
|
@ -23,6 +23,10 @@ class HolidayManagerAI:
|
|||
# Halloween: Black Cat Day
|
||||
self.currentHolidays.append(ToontownGlobals.BLACK_CAT_DAY)
|
||||
|
||||
if date.weekday() == 6:
|
||||
# Saturday: Fish Bingo
|
||||
self.currentHolidays.append(ToontownGlobals.SILLY_SATURDAY_BINGO)
|
||||
|
||||
simbase.air.newsManager.setHolidayIdList([self.currentHolidays])
|
||||
|
||||
def isHolidayRunning(self, holidayId):
|
||||
|
|
|
@ -195,6 +195,8 @@ class NewsManager(DistributedObject.DistributedObject):
|
|||
elif holidayId in promotionalSpeedChatHolidays:
|
||||
if hasattr(base, 'TTSCPromotionalMenu'):
|
||||
base.TTSCPromotionalMenu.startHoliday(holidayId)
|
||||
elif holidayId == ToontownGlobals.SILLY_SATURDAY_BINGO:
|
||||
self.setBingoOngoing()
|
||||
elif holidayId == ToontownGlobals.MORE_XP_HOLIDAY:
|
||||
self.setMoreXpHolidayStart()
|
||||
elif holidayId == ToontownGlobals.JELLYBEAN_DAY:
|
||||
|
@ -310,6 +312,8 @@ class NewsManager(DistributedObject.DistributedObject):
|
|||
elif holidayId in promotionalSpeedChatHolidays:
|
||||
if hasattr(base, 'TTSCPromotionalMenu'):
|
||||
base.TTSCPromotionalMenu.endHoliday(holidayId)
|
||||
elif holidayId == ToontownGlobals.SILLY_SATURDAY_BINGO:
|
||||
self.setBingoEnd()
|
||||
elif holidayId == ToontownGlobals.MORE_XP_HOLIDAY:
|
||||
self.setMoreXpHolidayEnd()
|
||||
elif holidayId == ToontownGlobals.JELLYBEAN_DAY:
|
||||
|
@ -557,9 +561,7 @@ class NewsManager(DistributedObject.DistributedObject):
|
|||
|
||||
def holidayNotify(self):
|
||||
for id in self.holidayIdList:
|
||||
if id == 19:
|
||||
self.setBingoOngoing()
|
||||
elif id == 20:
|
||||
if id == 20:
|
||||
self.setCircuitRaceOngoing()
|
||||
elif id == 21:
|
||||
self.setTrolleyHolidayOngoing()
|
||||
|
|
|
@ -234,7 +234,7 @@ class Estate(Place.Place):
|
|||
self.notify.info('remove estate-check-toon-underwater to TaskMgr in enterTeleportIn()')
|
||||
taskMgr.remove('estate-check-toon-underwater')
|
||||
if base.wantPets:
|
||||
if base.localAvatar.hasPet() and not base.localAvatar.bPetTutorialDone:
|
||||
if base.localAvatar.hasPet() and not base.localAvatar.petTutorialDone:
|
||||
self.nextState = 'petTutorial'
|
||||
|
||||
def teleportInDone(self):
|
||||
|
|
|
@ -437,8 +437,6 @@ class BingoCardGui(DirectFrame):
|
|||
|
||||
def castingStarted(self):
|
||||
if taskMgr.hasTaskNamed(self.taskNameFlashFish):
|
||||
if not base.localAvatar.bFishBingoMarkTutorialDone:
|
||||
pass
|
||||
#todo: fix setFishBingoMarkTutorialDone
|
||||
#self.showTutorial(BG.TutorialMark)
|
||||
#base.localAvatar.b_setFishBingoMarkTutorialDone(True)
|
||||
if not base.localAvatar.fishBingoMarkTutorialDone:
|
||||
self.showTutorial(BG.TutorialMark)
|
||||
base.localAvatar.b_setFishBingoMarkTutorialDone(True)
|
|
@ -136,13 +136,10 @@ class Place(StateData.StateData, FriendsListManager.FriendsListManager):
|
|||
return self.getZoneId()
|
||||
|
||||
def handleTeleportQuery(self, fromAvatar, toAvatar):
|
||||
if base.config.GetBool('want-tptrack', False):
|
||||
if toAvatar == localAvatar:
|
||||
toAvatar.doTeleportResponse(fromAvatar, toAvatar, toAvatar.doId, 1, toAvatar.defaultShard, base.cr.playGame.getPlaceId(), self.getZoneId(), fromAvatar.doId)
|
||||
else:
|
||||
self.notify.warning('handleTeleportQuery toAvatar.doId != localAvatar.doId' % (toAvatar.doId, localAvatar.doId))
|
||||
if toAvatar == localAvatar:
|
||||
toAvatar.doTeleportResponse(fromAvatar, toAvatar, toAvatar.doId, 1, toAvatar.defaultShard, base.cr.playGame.getPlaceId(), self.getZoneId(), fromAvatar.doId)
|
||||
else:
|
||||
fromAvatar.d_teleportResponse(toAvatar.doId, 1, toAvatar.defaultShard, base.cr.playGame.getPlaceId(), self.getZoneId())
|
||||
self.notify.warning('handleTeleportQuery toAvatar.doId != localAvatar.doId' % (toAvatar.doId, localAvatar.doId))
|
||||
|
||||
def detectedPhoneCollision(self):
|
||||
self.fsm.request('phone')
|
||||
|
|
|
@ -443,11 +443,9 @@ class DistributedFishingSpot(DistributedObject.DistributedObject):
|
|||
self.castButton.bind(DGG.B3RELEASE, requestLocalCasting)
|
||||
if self.firstCast and len(self.av.fishCollection) == 0 and len(self.av.fishTank) == 0:
|
||||
self.__showHowTo(TTLocalizer.FishingHowToFirstTime)
|
||||
elif base.wantBingo and self.pond.hasPondBingoManager() and not self.av.bFishBingoTutorialDone:
|
||||
pass
|
||||
#todo: fix b_setFishBingoTutorialDone crash
|
||||
#self.__showHowTo(TTLocalizer.FishBingoHelpMain)
|
||||
#self.av.b_setFishBingoTutorialDone(True)
|
||||
elif base.wantBingo and self.pond.hasPondBingoManager() and not self.av.fishBingoTutorialDone:
|
||||
self.__showHowTo(TTLocalizer.FishBingoHelpMain)
|
||||
self.av.b_setFishBingoTutorialDone(True)
|
||||
|
||||
def __moneyChange(self, money):
|
||||
self.jar['text'] = str(money)
|
||||
|
|
|
@ -125,13 +125,13 @@ class GolfKart(StateData.StateData):
|
|||
del self.noTrolleyBox
|
||||
|
||||
def __handleNoTrolleyAck(self):
|
||||
ntbDoneStatus = self.noTrolleyBox.doneStatus
|
||||
if ntbDoneStatus == 'ok':
|
||||
ntdoneStatus = self.noTrolleyBox.doneStatus
|
||||
if ntdoneStatus == 'ok':
|
||||
doneStatus = {}
|
||||
doneStatus['mode'] = 'reject'
|
||||
messenger.send(self.doneEvent, [doneStatus])
|
||||
else:
|
||||
self.notify.error('Unrecognized doneStatus: ' + str(ntbDoneStatus))
|
||||
self.notify.error('Unrecognized doneStatus: ' + str(ntdoneStatus))
|
||||
|
||||
def enterRequestBoard(self):
|
||||
return None
|
||||
|
|
|
@ -127,13 +127,13 @@ class PicnicBasket(StateData.StateData):
|
|||
del self.noTrolleyBox
|
||||
|
||||
def __handleNoTrolleyAck(self):
|
||||
ntbDoneStatus = self.noTrolleyBox.doneStatus
|
||||
if ntbDoneStatus == 'ok':
|
||||
ntdoneStatus = self.noTrolleyBox.doneStatus
|
||||
if ntdoneStatus == 'ok':
|
||||
doneStatus = {}
|
||||
doneStatus['mode'] = 'reject'
|
||||
messenger.send(self.doneEvent, [doneStatus])
|
||||
else:
|
||||
self.notify.error('Unrecognized doneStatus: ' + str(ntbDoneStatus))
|
||||
self.notify.error('Unrecognized doneStatus: ' + str(ntdoneStatus))
|
||||
|
||||
def enterRequestBoard(self):
|
||||
return None
|
||||
|
|
|
@ -154,9 +154,9 @@ class DistributedToon(DistributedPlayer.DistributedPlayer, Toon.Toon, Distribute
|
|||
self.emblems = [0, 0]
|
||||
self.maxNPCFriends = 16
|
||||
self.petId = 0
|
||||
self.bPetTutorialDone = False
|
||||
self.bFishBingoTutorialDone = False
|
||||
self.bFishBingoMarkTutorialDone = False
|
||||
self.petTutorialDone = False
|
||||
self.fishBingoTutorialDone = False
|
||||
self.fishBingoMarkTutorialDone = False
|
||||
self.accessories = []
|
||||
if base.wantKarts:
|
||||
self.kartDNA = [-1] * getNumFields()
|
||||
|
@ -1744,35 +1744,35 @@ class DistributedToon(DistributedPlayer.DistributedPlayer, Toon.Toon, Distribute
|
|||
def hasPet(self):
|
||||
return self.petId != 0
|
||||
|
||||
def b_setPetTutorialDone(self, bDone):
|
||||
self.d_setPetTutorialDone(bDone)
|
||||
self.setPetTutorialDone(bDone)
|
||||
def b_setPetTutorialDone(self, done):
|
||||
self.d_setPetTutorialDone(done)
|
||||
self.setPetTutorialDone(done)
|
||||
|
||||
def d_setPetTutorialDone(self, bDone):
|
||||
self.sendUpdate('setPetTutorialDone', [bDone])
|
||||
def d_setPetTutorialDone(self, done):
|
||||
self.sendUpdate('setPetTutorialDone', [done])
|
||||
|
||||
def setPetTutorialDone(self, bDone):
|
||||
self.bPetTutorialDone = bDone
|
||||
def setPetTutorialDone(self, done):
|
||||
self.petTutorialDone = done
|
||||
|
||||
def b_setFishBingoTutorialDone(self, bDone):
|
||||
self.d_setFishBingoTutorialDone(bDone)
|
||||
self.setFishBingoTutorialDone(bDone)
|
||||
def b_setFishBingoTutorialDone(self, done):
|
||||
self.d_setFishBingoTutorialDone(done)
|
||||
self.setFishBingoTutorialDone(done)
|
||||
|
||||
def d_setFishBingoTutorialDone(self, bDone):
|
||||
self.sendUpdate('setFishBingoTutorialDone', [bDone])
|
||||
def d_setFishBingoTutorialDone(self, done):
|
||||
self.sendUpdate('setFishBingoTutorialDone', [done])
|
||||
|
||||
def setFishBingoTutorialDone(self, bDone):
|
||||
self.bFishBingoTutorialDone = bDone
|
||||
def setFishBingoTutorialDone(self, done):
|
||||
self.fishBingoTutorialDone = done
|
||||
|
||||
def b_setFishBingoMarkTutorialDone(self, bDone):
|
||||
self.d_setFishBingoMarkTutorialDone(bDone)
|
||||
self.setFishBingoMarkTutorialDone(bDone)
|
||||
def b_setFishBingoMarkTutorialDone(self, done):
|
||||
self.d_setFishBingoMarkTutorialDone(done)
|
||||
self.setFishBingoMarkTutorialDone(done)
|
||||
|
||||
def d_setFishBingoMarkTutorialDone(self, bDone):
|
||||
self.sendUpdate('setFishBingoMarkTutorialDone', [bDone])
|
||||
def d_setFishBingoMarkTutorialDone(self, done):
|
||||
self.sendUpdate('setFishBingoMarkTutorialDone', [done])
|
||||
|
||||
def setFishBingoMarkTutorialDone(self, bDone):
|
||||
self.bFishBingoMarkTutorialDone = bDone
|
||||
def setFishBingoMarkTutorialDone(self, done):
|
||||
self.fishBingoMarkTutorialDone = done
|
||||
|
||||
def b_setPetMovie(self, petId, flag):
|
||||
self.d_setPetMovie(petId, flag)
|
||||
|
|
|
@ -75,12 +75,6 @@ class DistributedToonAI(DistributedPlayerAI.DistributedPlayerAI, DistributedSmoo
|
|||
ToontownGlobals.FT_Torso: (CogDisguiseGlobals.torsoIndex,)}
|
||||
lastFlagAvTime = globalClock.getFrameTime()
|
||||
flagCounts = {}
|
||||
WantTpTrack = simbase.config.GetBool('want-tptrack', False)
|
||||
BanOnDbCheckFail = simbase.config.GetBool('want-ban-dbcheck', 0)
|
||||
DbCheckAccountDateEnable = config.GetBool('account-blackout-enable', 1)
|
||||
DbCheckAccountDateBegin = config.GetString('account-blackout-start', '2013-08-20 12:30:00')
|
||||
DbCheckAccountDateDisconnect = config.GetBool('account-blackout-disconnect', 0)
|
||||
WantOldGMNameBan = simbase.config.GetBool('want-old-gm-name-ban', 1)
|
||||
petId = None
|
||||
|
||||
def __init__(self, air):
|
||||
|
@ -183,7 +177,6 @@ class DistributedToonAI(DistributedPlayerAI.DistributedPlayerAI, DistributedSmoo
|
|||
self.hostedParties = []
|
||||
self.partiesInvitedTo = []
|
||||
self.partyReplyInfoBases = []
|
||||
self._dbCheckDoLater = None
|
||||
self.teleportOverride = 0
|
||||
self._gmDisabled = False
|
||||
self.promotionStatus = [0, 0, 0, 0]
|
||||
|
@ -241,9 +234,6 @@ class DistributedToonAI(DistributedPlayerAI.DistributedPlayerAI, DistributedSmoo
|
|||
DistributedAvatarAI.DistributedAvatarAI.sendDeleteEvent(self)
|
||||
|
||||
def delete(self):
|
||||
if self._dbCheckDoLater:
|
||||
taskMgr.remove(self._dbCheckDoLater)
|
||||
self._dbCheckDoLater = None
|
||||
if self.isPlayerControlled():
|
||||
messenger.send('avatarExited', [self])
|
||||
if simbase.wantPets:
|
||||
|
@ -306,7 +296,7 @@ class DistributedToonAI(DistributedPlayerAI.DistributedPlayerAI, DistributedSmoo
|
|||
def handleLogicalZoneChange(self, newZoneId, oldZoneId):
|
||||
DistributedAvatarAI.DistributedAvatarAI.handleLogicalZoneChange(self, newZoneId, oldZoneId)
|
||||
|
||||
if self.isPlayerControlled() and self.WantTpTrack:
|
||||
if self.isPlayerControlled():
|
||||
messenger.send(self.staticGetLogicalZoneChangeAllEvent(), [newZoneId, oldZoneId, self])
|
||||
|
||||
def announceZoneChange(self, newZoneId, oldZoneId):
|
||||
|
@ -3038,17 +3028,14 @@ class DistributedToonAI(DistributedPlayerAI.DistributedPlayerAI, DistributedSmoo
|
|||
self.air.writeServerEvent('suspicious', self.doId, 'setPetMovie: playing pet movie %s on non-pet object %s' % (flag, petId))
|
||||
return
|
||||
|
||||
def setPetTutorialDone(self, bDone):
|
||||
self.notify.debug('setPetTutorialDone')
|
||||
self.bPetTutorialDone = True
|
||||
def setPetTutorialDone(self, done):
|
||||
self.petTutorialDone = True
|
||||
|
||||
def setFishBingoTutorialDone(self, bDone):
|
||||
self.notify.debug('setFishBingoTutorialDone')
|
||||
self.bFishBingoTutorialDone = True
|
||||
def setFishBingoTutorialDone(self, done):
|
||||
self.fishBingoTutorialDone = True
|
||||
|
||||
def setFishBingoMarkTutorialDone(self, bDone):
|
||||
self.notify.debug('setFishBingoMarkTutorialDone')
|
||||
self.bFishBingoMarkTutorialDone = True
|
||||
def setFishBingoMarkTutorialDone(self, done):
|
||||
self.fishBingoMarkTutorialDone = True
|
||||
|
||||
def enterEstate(self, ownerId, zoneId):
|
||||
DistributedToonAI.notify.debug('enterEstate: %s %s %s' % (self.doId, ownerId, zoneId))
|
||||
|
@ -4064,21 +4051,9 @@ class DistributedToonAI(DistributedPlayerAI.DistributedPlayerAI, DistributedSmoo
|
|||
|
||||
def setName(self, name):
|
||||
DistributedPlayerAI.DistributedPlayerAI.setName(self, name)
|
||||
if self.WantOldGMNameBan:
|
||||
if self.isGenerated():
|
||||
self._checkOldGMName()
|
||||
self._updateGMName()
|
||||
|
||||
def _checkOldGMName(self):
|
||||
if '$' in set(self.name):
|
||||
if config.GetBool('want-ban-old-gm-name', 0):
|
||||
self.ban('invalid name: %s' % self.name)
|
||||
else:
|
||||
self.air.writeServerEvent('suspicious', self.doId, '$ found in toon name')
|
||||
|
||||
def teleportResponseToAI(self, toAvId, available, shardId, hoodId, zoneId, fromAvId):
|
||||
if not self.WantTpTrack:
|
||||
return
|
||||
senderId = self.air.getAvatarIdFromSender()
|
||||
if toAvId != self.doId:
|
||||
self.air.writeServerEvent('suspicious', self.doId, 'toAvId=%d is not equal to self.doId' % toAvId)
|
||||
|
@ -5225,4 +5200,3 @@ def emblems(silver=10, gold=10):
|
|||
@magicWord(category=CATEGORY_PROGRAMMER)
|
||||
def catalog():
|
||||
simbase.air.catalogManager.deliverCatalogFor(spellbook.getTarget())
|
||||
|
||||
|
|
|
@ -125,13 +125,13 @@ class Trolley(StateData.StateData):
|
|||
del self.noTrolleyBox
|
||||
|
||||
def __handleNoTrolleyAck(self):
|
||||
ntbDoneStatus = self.noTrolleyBox.doneStatus
|
||||
if ntbDoneStatus == 'ok':
|
||||
ntdoneStatus = self.noTrolleyBox.doneStatus
|
||||
if ntdoneStatus == 'ok':
|
||||
doneStatus = {}
|
||||
doneStatus['mode'] = 'reject'
|
||||
messenger.send(self.doneEvent, [doneStatus])
|
||||
else:
|
||||
self.notify.error('Unrecognized doneStatus: ' + str(ntbDoneStatus))
|
||||
self.notify.error('Unrecognized doneStatus: ' + str(ntdoneStatus))
|
||||
|
||||
def enterRequestBoard(self):
|
||||
return None
|
||||
|
@ -155,8 +155,6 @@ class Trolley(StateData.StateData):
|
|||
return None
|
||||
|
||||
def enterBoarded(self):
|
||||
if base.config.GetBool('want-qa-regression', 0):
|
||||
self.notify.info('QA-REGRESSION: RIDETHETROLLEY: Ride the Trolley')
|
||||
self.enableExitButton()
|
||||
return None
|
||||
|
||||
|
|
Loading…
Reference in a new issue