diff --git a/dependencies/astron/dclass/stride.dc b/dependencies/astron/dclass/stride.dc index 192f6d10..1702b997 100644 --- a/dependencies/astron/dclass/stride.dc +++ b/dependencies/astron/dclass/stride.dc @@ -255,7 +255,6 @@ from toontown.coghq import DistributedCogHQDoor/AI from toontown.coghq import DistributedSellbotHQDoor/AI from toontown.toon import DistributedNPCToonBase/AI from toontown.toon import DistributedNPCToon/AI -from toontown.toon import DistributedSmartNPC/AI from toontown.toon import DistributedNPCSpecialQuestGiver/AI from toontown.toon import DistributedNPCFlippyInToonHall/AI from toontown.toon import DistributedNPCScientist/AI @@ -1745,13 +1744,6 @@ dclass DistributedNPCToon : DistributedNPCToonBase { chooseTrack(int8) airecv clsend; }; -dclass DistributedSmartNPC : DistributedNPCToonBase { - greet(uint32, uint32) broadcast ram; - talkMessage(uint32, string) airecv clsend; - respond(uint32, string, uint32) broadcast ram; - dismiss(uint32, uint16) broadcast ram; -}; - dclass DistributedNPCSpecialQuestGiver : DistributedNPCToonBase { setMovie(uint8, uint32, uint32, uint16[], int16) broadcast ram; setMovieDone() airecv clsend; @@ -1844,7 +1836,6 @@ dclass DistributedElevator : DistributedObject { requestExit() airecv clsend; setElevatorTripId(uint32) required broadcast ram; setAntiShuffle(uint8) required broadcast ram; - setMinLaff(uint8) required broadcast ram; }; dclass DistributedElevatorFSM : DistributedObject { @@ -1871,7 +1862,6 @@ dclass DistributedElevatorFSM : DistributedObject { requestExit() airecv clsend; setElevatorTripId(uint32) required broadcast ram; setAntiShuffle(uint8) required broadcast ram; - setMinLaff(uint8) required broadcast ram; }; dclass DistributedElevatorFloor : DistributedElevatorFSM { @@ -1947,7 +1937,7 @@ dclass DistributedBoardingParty : DistributedObject { postSizeReject(uint32, uint32, uint32) broadcast; postInviteAccepted(uint32) broadcast; postInviteDelcined(uint32) broadcast; - postInviteNotQualify(uint32, int8, uint32) broadcast; + postInviteNotQualify(uint32, int8) broadcast; postAlreadyInGroup() broadcast; postGroupDissolve(uint32, uint32, uint32 [], uint8) broadcast; postMessageAcceptanceFailed(uint32, int8) broadcast; diff --git a/dependencies/config/general.prc b/dependencies/config/general.prc index 07a99380..493aacbe 100644 --- a/dependencies/config/general.prc +++ b/dependencies/config/general.prc @@ -99,7 +99,6 @@ want-cogbuildings #t # Optional: show-total-population #t want-mat-all-tailors #t -want-talkative-tyler #f estate-day-night #t want-garden-game #f want-language-selection #t diff --git a/otp/distributed/OTPClientRepository.py b/otp/distributed/OTPClientRepository.py index 4ecb646a..1dd5c298 100755 --- a/otp/distributed/OTPClientRepository.py +++ b/otp/distributed/OTPClientRepository.py @@ -813,7 +813,7 @@ class OTPClientRepository(ClientRepositoryBase): district = None if not district: self.distributedDistrict = self.getStartingDistrict() - if self.distributedDistrict is None: + if not self.distributedDistrict: self.loginFSM.request('noShards') return shardId = self.distributedDistrict.doId @@ -1030,26 +1030,26 @@ class OTPClientRepository(ClientRepositoryBase): pass def getStartingDistrict(self): - district = None - if len(self.activeDistrictMap.keys()) == 0: + if not self.activeDistrictMap: self.notify.info('no shards') return maxPop = config.GetInt('shard-mid-pop', 300) + preferred = settings.get('preferredShard', None) + + if preferred: + for shard in self.activeDistrictMap.values(): + if shard.available and shard.name == preferred and shard.avatarCount < maxPop: + return shard - # Join the least populated district. for shard in self.activeDistrictMap.values(): - if district: - if shard.avatarCount < district.avatarCount and shard.available: - if shard.avatarCount < maxPop: - district = shard - else: - if shard.available: - if shard.avatarCount < maxPop: - district = shard + if shard.available and shard.avatarCount < maxPop: + district = shard + maxPop = district.avatarCount - if district is not None: + if district: self.notify.debug('chose %s: pop %s' % (district.name, district.avatarCount)) + return district def getShardName(self, shardId): diff --git a/otp/otpbase/OTPLocalizerEnglish.py b/otp/otpbase/OTPLocalizerEnglish.py index d37d265f..bf709ccf 100755 --- a/otp/otpbase/OTPLocalizerEnglish.py +++ b/otp/otpbase/OTPLocalizerEnglish.py @@ -376,7 +376,7 @@ SuitFaceoffTaunts = {'b': ['Do you have a donation for me?', 'Good, it takes two to mingle.', "Let's mingle.", 'This looks like a good place to mingle.', - "Well,isn't this cozy?", + "Well, isn't this cozy?", "You're mingling with defeat.", "I'm going to mingle in your business.", "Are you sure you're ready to mingle?"], @@ -520,7 +520,7 @@ SuitFaceoffTaunts = {'b': ['Do you have a donation for me?', 'Care to take a few turns with me?', 'I have my own special spin on the subject.'], 'f': ["I'm gonna tell the boss about you!", - "I may be just a flunky - But I'm real spunky.", + "I may be just a Flunky - But I'm real spunky.", "I'm using you to step up the corporate ladder.", "You're not going to like the way I work.", 'The boss is counting on me to stop you.', @@ -543,7 +543,7 @@ SuitFaceoffTaunts = {'b': ['Do you have a donation for me?', 'Careful, I may leave a mark.'], 'ym': ["I'm positive you're not going to like this.", "I don't know the meaning of no.", - 'Want to meet? I say yes, anytime.', + 'Want to meet? I say yes, anytime.', 'You need some positive enforcement.', "I'm going to make a positive impression.", "I haven't been wrong yet.", @@ -592,7 +592,7 @@ SuitFaceoffTaunts = {'b': ['Do you have a donation for me?', 'Can I interest you in an insurance plan?', 'You should have missed my call.', "You won't be able to get rid of me now.", - 'This a bad time? Good.', + 'This a bad time? Good.', 'I was planning on running into you.', 'I will be reversing the charges for this call.', 'I have some costly items for you today.', @@ -644,7 +644,7 @@ SuitFaceoffTaunts = {'b': ['Do you have a donation for me?', "I've been asked to pinch-hit.", "I'll prove you're not dreaming.", 'Heads you lose, tails I win.', - 'A Penny for your gags.'], + 'A penny for your gags.'], 'tw': ['Things are about to get very tight.', "That's Mr. Tightwad to you.", "I'm going to cut off your funding.", diff --git a/otp/settings/Settings.py b/otp/settings/Settings.py index 5fa803ba..de87fe0e 100755 --- a/otp/settings/Settings.py +++ b/otp/settings/Settings.py @@ -17,7 +17,7 @@ class Settings(collections.MutableMapping): def write(self): with open(self.filename, 'w') as f: - json.dump(self.store, f) + json.dump(self.store, f, sort_keys=True, indent=2, separators=(',', ': ')) def __setitem__(self, key, value): self.store[key] = value diff --git a/toontown/building/BoardingPartyBase.py b/toontown/building/BoardingPartyBase.py index 87c5ea18..fe470a4d 100755 --- a/toontown/building/BoardingPartyBase.py +++ b/toontown/building/BoardingPartyBase.py @@ -3,14 +3,13 @@ from toontown.toonbase import ToontownGlobals import copy BOARDCODE_OKAY = 1 BOARDCODE_MISSING = 0 -BOARDCODE_MINLAFF = -1 -BOARDCODE_PROMOTION = -2 -BOARDCODE_BATTLE = -3 -BOARDCODE_SPACE = -4 -BOARDCODE_DIFF_GROUP = -6 -BOARDCODE_PENDING_INVITE = -7 -BOARDCODE_IN_ELEVATOR = -8 -BOARDCODE_GROUPS_TO_LARGE = -9 # JBS +BOARDCODE_PROMOTION = -1 +BOARDCODE_BATTLE = -2 +BOARDCODE_SPACE = -3 +BOARDCODE_DIFF_GROUP = -4 +BOARDCODE_PENDING_INVITE = -5 +BOARDCODE_IN_ELEVATOR = -6 +BOARDCODE_GROUPS_TOO_LARGE = -7 # JBS INVITE_ACCEPT_FAIL_GROUP_FULL = -1 class BoardingPartyBase: diff --git a/toontown/building/DistributedBBElevatorAI.py b/toontown/building/DistributedBBElevatorAI.py index 41abeccd..8e2095d9 100755 --- a/toontown/building/DistributedBBElevatorAI.py +++ b/toontown/building/DistributedBBElevatorAI.py @@ -3,7 +3,7 @@ import DistributedBossElevatorAI class DistributedBBElevatorAI(DistributedBossElevatorAI.DistributedBossElevatorAI): - def __init__(self, air, bldg, zone, antiShuffle = 0, minLaff = 0): - DistributedBossElevatorAI.DistributedBossElevatorAI.__init__(self, air, bldg, zone, antiShuffle=antiShuffle, minLaff=0) + def __init__(self, air, bldg, zone, antiShuffle = 0): + DistributedBossElevatorAI.DistributedBossElevatorAI.__init__(self, air, bldg, zone, antiShuffle=antiShuffle) self.type = ELEVATOR_BB self.countdownTime = ElevatorData[self.type]['countdown'] \ No newline at end of file diff --git a/toontown/building/DistributedBoardingParty.py b/toontown/building/DistributedBoardingParty.py index 1da48700..c8267316 100755 --- a/toontown/building/DistributedBoardingParty.py +++ b/toontown/building/DistributedBoardingParty.py @@ -198,17 +198,10 @@ class DistributedBoardingParty(DistributedObject.DistributedObject, BoardingPart self.groupInviteePanel = None return - def postInviteNotQualify(self, avId, reason, elevatorId): + def postInviteNotQualify(self, avId, reason): messenger.send('updateGroupStatus') rejectText = '' - minLaff = TTLocalizer.BoardingMore - if elevatorId: - elevator = base.cr.doId2do.get(elevatorId) - if elevator: - minLaff = elevator.minLaff if avId == localAvatar.doId: - if reason == BoardingPartyBase.BOARDCODE_MINLAFF: - rejectText = TTLocalizer.BoardingInviteMinLaffInviter % minLaff if reason == BoardingPartyBase.BOARDCODE_PROMOTION: rejectText = TTLocalizer.BoardingInvitePromotionInviter else: @@ -217,8 +210,6 @@ class DistributedBoardingParty(DistributedObject.DistributedObject, BoardingPart avatarNameText = avatar.name else: avatarNameText = '' - if reason == BoardingPartyBase.BOARDCODE_MINLAFF: - rejectText = TTLocalizer.BoardingInviteMinLaffInvitee % (avatarNameText, minLaff) if reason == BoardingPartyBase.BOARDCODE_PROMOTION: rejectText = TTLocalizer.BoardingInvitePromotionInvitee % avatarNameText if reason == BoardingPartyBase.BOARDCODE_BATTLE: @@ -229,8 +220,8 @@ class DistributedBoardingParty(DistributedObject.DistributedObject, BoardingPart rejectText = TTLocalizer.BoardingInviteePendingIvite % avatarNameText if reason == BoardingPartyBase.BOARDCODE_IN_ELEVATOR: rejectText = TTLocalizer.BoardingInviteeInElevator % avatarNameText - if reason == BoardingPartyBase.BOARDCODE_GROUPS_TO_LARGE: # JBS - rejectText = TTLocalizer.BoardingGroupsToLarge % avatarNameText + if reason == BoardingPartyBase.BOARDCODE_GROUPS_TOO_LARGE: # JBS + rejectText = TTLocalizer.BoardingGroupsTooLarge % avatarNameText if self.inviterPanels.isInvitingPanelIdCorrect(avId) or avId == localAvatar.doId: self.inviterPanels.destroyInvitingPanel() self.showMe(rejectText) @@ -316,23 +307,8 @@ class DistributedBoardingParty(DistributedObject.DistributedObject, BoardingPart avatarText += secondLastName + ' ' + TTLocalizer.And + ' ' + lastName return avatarText - - if reason == BoardingPartyBase.BOARDCODE_MINLAFF: - self.notify.debug("%s 's group cannot board because it does not have enough laff points." % leaderId) - elevator = base.cr.doId2do.get(elevatorId) - if elevator: - minLaffPoints = elevator.minLaff - else: - minLaffPoints = TTLocalizer.BoardingMore - if leaderId in avatarsFailingRequirements: - rejectText = TTLocalizer.BoardcodeMinLaffLeader % minLaffPoints - else: - avatarNameText = getAvatarText(avatarsFailingRequirements) - if len(avatarsFailingRequirements) == 1: - rejectText = TTLocalizer.BoardcodeMinLaffNonLeaderSingular % (avatarNameText, minLaffPoints) - else: - rejectText = TTLocalizer.BoardcodeMinLaffNonLeaderPlural % (avatarNameText, minLaffPoints) - elif reason == BoardingPartyBase.BOARDCODE_PROMOTION: + + if reason == BoardingPartyBase.BOARDCODE_PROMOTION: self.notify.debug("%s 's group cannot board because it does not have enough promotion merits." % leaderId) if leaderId in avatarsFailingRequirements: rejectText = TTLocalizer.BoardcodePromotionLeader diff --git a/toontown/building/DistributedBoardingPartyAI.py b/toontown/building/DistributedBoardingPartyAI.py index 678a162a..8110179d 100755 --- a/toontown/building/DistributedBoardingPartyAI.py +++ b/toontown/building/DistributedBoardingPartyAI.py @@ -105,17 +105,17 @@ class DistributedBoardingPartyAI(DistributedObjectAI.DistributedObjectAI, Boardi merger = False if invitee and invitee.battleId != 0: reason = BoardingPartyBase.BOARDCODE_BATTLE - self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviteeId, reason, 0]) + self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviteeId, reason]) self.sendUpdateToAvatarId(inviteeId, 'postMessageInvitationFailed', [inviterId]) return if self.hasPendingInvite(inviteeId): reason = BoardingPartyBase.BOARDCODE_PENDING_INVITE - self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviteeId, reason, 0]) + self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviteeId, reason]) self.sendUpdateToAvatarId(inviteeId, 'postMessageInvitationFailed', [inviterId]) return if self.__isInElevator(inviteeId): reason = BoardingPartyBase.BOARDCODE_IN_ELEVATOR - self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviteeId, reason, 0]) + self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviteeId, reason]) self.sendUpdateToAvatarId(inviteeId, 'postMessageInvitationFailed', [inviterId]) return if self.hasActiveGroup(inviteeId): @@ -127,7 +127,7 @@ class DistributedBoardingPartyAI(DistributedObjectAI.DistributedObjectAI, Boardi # group merge already requested? if self.hasPendingInvite(inviteeLeaderId): reason = BoardingPartyBase.BOARDCODE_PENDING_INVITE - self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviteeId, reason, 0]) + self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviteeId, reason]) self.sendUpdateToAvatarId(inviteeId, 'postMessageInvitationFailed', [inviterId]) return @@ -137,13 +137,13 @@ class DistributedBoardingPartyAI(DistributedObjectAI.DistributedObjectAI, Boardi inviteeId = inviteeLeaderId merger = True else: - reason = BoardingPartyBase.BOARDCODE_GROUPS_TO_LARGE - self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviteeId, reason, 0]) + reason = BoardingPartyBase.BOARDCODE_GROUPS_TOO_LARGE + self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviteeId, reason]) self.sendUpdateToAvatarId(inviteeId, 'postMessageInvitationFailed', [inviterId]) return else: reason = BoardingPartyBase.BOARDCODE_DIFF_GROUP - self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviteeId, reason, 0]) + self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviteeId, reason]) self.sendUpdateToAvatarId(inviteeId, 'postMessageInvitationFailed', [inviterId]) return # Lets see what the invitee is currently doing @@ -152,20 +152,16 @@ class DistributedBoardingPartyAI(DistributedObjectAI.DistributedObjectAI, Boardi # I know there is an unexpected issue here when we are merging groups... lets think about this really hard.. if len(self.elevatorIdList) == 1: if inviteeOkay: - if inviteeOkay == REJECT_MINLAFF: - reason = BoardingPartyBase.BOARDCODE_MINLAFF - elif inviteeOkay == REJECT_PROMOTION: + if inviteeOkay == REJECT_PROMOTION: reason = BoardingPartyBase.BOARDCODE_PROMOTION - self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviteeId, reason, self.elevatorIdList[0]]) + self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviteeId, reason]) return else: inviterOkay = self.checkBoard(inviterId, self.elevatorIdList[0]) if inviterOkay: - if inviterOkay == REJECT_MINLAFF: - reason = BoardingPartyBase.BOARDCODE_MINLAFF - elif inviterOkay == REJECT_PROMOTION: + if inviterOkay == REJECT_PROMOTION: reason = BoardingPartyBase.BOARDCODE_PROMOTION - self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviterId, reason, self.elevatorIdList[0]]) + self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviterId, reason]) return # Is the inviter already in the avIdDict? It follows they either must be in a group or have a pending invite... if inviterId in self.avIdDict: @@ -277,8 +273,8 @@ class DistributedBoardingPartyAI(DistributedObjectAI.DistributedObjectAI, Boardi return # Lets make sure we still CAN merge them in if ((len(self.getGroupMemberList(leaderId)) + len(self.getGroupMemberList(inviteeId))) > self.maxSize): - reason = BoardingPartyBase.BOARDCODE_GROUPS_TO_LARGE - self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviteeId, reason, 0]) + reason = BoardingPartyBase.BOARDCODE_GROUPS_TOO_LARGE + self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviteeId, reason]) self.sendUpdateToAvatarId(inviteeId, 'postMessageInvitationFailed', [inviterId]) return group = self.groupListDict.get(leaderId) @@ -365,9 +361,7 @@ class DistributedBoardingPartyAI(DistributedObjectAI.DistributedObjectAI, Boardi avatar = simbase.air.doId2do.get(avId) if avatar: if elevator.checkBoard(avatar) != 0: - if elevator.checkBoard(avatar) == REJECT_MINLAFF: - boardOkay = BoardingPartyBase.BOARDCODE_MINLAFF - elif elevator.checkBoard(avatar) == REJECT_PROMOTION: + if elevator.checkBoard(avatar) == REJECT_PROMOTION: boardOkay = BoardingPartyBase.BOARDCODE_PROMOTION avatarsFailingRequirements.append(avId) elif avatar.battleId != 0: @@ -382,8 +376,6 @@ class DistributedBoardingPartyAI(DistributedObjectAI.DistributedObjectAI, Boardi boardOkay = BoardingPartyBase.BOARDCODE_SPACE if boardOkay != BoardingPartyBase.BOARDCODE_OKAY: self.notify.debug('Something is wrong with the group board request') - if boardOkay == BoardingPartyBase.BOARDCODE_MINLAFF: - self.notify.debug('An avatar did not meet the elevator laff requirements') if boardOkay == BoardingPartyBase.BOARDCODE_PROMOTION: self.notify.debug('An avatar did not meet the elevator promotion requirements') elif boardOkay == BoardingPartyBase.BOARDCODE_BATTLE: diff --git a/toontown/building/DistributedBossElevatorAI.py b/toontown/building/DistributedBossElevatorAI.py index 2ec7354f..a020c10d 100755 --- a/toontown/building/DistributedBossElevatorAI.py +++ b/toontown/building/DistributedBossElevatorAI.py @@ -12,8 +12,8 @@ from toontown.suit import DistributedSellbotBossAI class DistributedBossElevatorAI(DistributedElevatorExtAI.DistributedElevatorExtAI): - def __init__(self, air, bldg, zone, antiShuffle = 0, minLaff = 0): - DistributedElevatorExtAI.DistributedElevatorExtAI.__init__(self, air, bldg, numSeats=8, antiShuffle=antiShuffle, minLaff=minLaff) + def __init__(self, air, bldg, zone, antiShuffle = 0): + DistributedElevatorExtAI.DistributedElevatorExtAI.__init__(self, air, bldg, numSeats=8, antiShuffle=antiShuffle) self.zone = zone self.type = ELEVATOR_VP self.countdownTime = ElevatorData[self.type]['countdown'] @@ -53,8 +53,6 @@ class DistributedBossElevatorAI(DistributedElevatorExtAI.DistributedElevatorExtA def checkBoard(self, av): dept = ToontownGlobals.cogHQZoneId2deptIndex(self.zone) - if av.hp < self.minLaff: - return REJECT_MINLAFF if not av.readyForPromotion(dept): return REJECT_PROMOTION return 0 diff --git a/toontown/building/DistributedCFOElevatorAI.py b/toontown/building/DistributedCFOElevatorAI.py index 7a14bda3..4f75cd8d 100755 --- a/toontown/building/DistributedCFOElevatorAI.py +++ b/toontown/building/DistributedCFOElevatorAI.py @@ -3,7 +3,7 @@ import DistributedBossElevatorAI class DistributedCFOElevatorAI(DistributedBossElevatorAI.DistributedBossElevatorAI): - def __init__(self, air, bldg, zone, antiShuffle = 0, minLaff = 0): - DistributedBossElevatorAI.DistributedBossElevatorAI.__init__(self, air, bldg, zone, antiShuffle=antiShuffle, minLaff=minLaff) + def __init__(self, air, bldg, zone, antiShuffle = 0): + DistributedBossElevatorAI.DistributedBossElevatorAI.__init__(self, air, bldg, zone, antiShuffle=antiShuffle) self.type = ELEVATOR_CFO self.countdownTime = ElevatorData[self.type]['countdown'] diff --git a/toontown/building/DistributedCJElevatorAI.py b/toontown/building/DistributedCJElevatorAI.py index 1c63809f..d3821778 100755 --- a/toontown/building/DistributedCJElevatorAI.py +++ b/toontown/building/DistributedCJElevatorAI.py @@ -3,7 +3,7 @@ import DistributedBossElevatorAI class DistributedCJElevatorAI(DistributedBossElevatorAI.DistributedBossElevatorAI): - def __init__(self, air, bldg, zone, antiShuffle = 0, minLaff = 0): - DistributedBossElevatorAI.DistributedBossElevatorAI.__init__(self, air, bldg, zone, antiShuffle=antiShuffle, minLaff=minLaff) + def __init__(self, air, bldg, zone, antiShuffle = 0): + DistributedBossElevatorAI.DistributedBossElevatorAI.__init__(self, air, bldg, zone, antiShuffle=antiShuffle) self.type = ELEVATOR_CJ self.countdownTime = ElevatorData[self.type]['countdown'] diff --git a/toontown/building/DistributedClubElevatorAI.py b/toontown/building/DistributedClubElevatorAI.py index d4366360..9be1de41 100755 --- a/toontown/building/DistributedClubElevatorAI.py +++ b/toontown/building/DistributedClubElevatorAI.py @@ -41,8 +41,8 @@ class DistributedClubElevatorAI(DistributedElevatorFSMAI.DistributedElevatorFSMA id = 0 DoBlockedRoomCheck = simbase.config.GetBool('elevator-blocked-rooms-check', 1) - def __init__(self, air, lawOfficeId, bldg, avIds, markerId = None, numSeats = 4, antiShuffle = 0, minLaff = 0): - DistributedElevatorFSMAI.DistributedElevatorFSMAI.__init__(self, air, bldg, numSeats, antiShuffle = antiShuffle, minLaff = minLaff) + def __init__(self, air, lawOfficeId, bldg, avIds, markerId = None, numSeats = 4, antiShuffle = 0): + DistributedElevatorFSMAI.DistributedElevatorFSMAI.__init__(self, air, bldg, numSeats, antiShuffle = antiShuffle) FSM.__init__(self, 'ElevatorFloor_%s_FSM' % self.id) self.type = ElevatorConstants.ELEVATOR_COUNTRY_CLUB self.countdownTime = ElevatorConstants.ElevatorData[self.type]['countdown'] @@ -291,8 +291,6 @@ class DistributedClubElevatorAI(DistributedElevatorFSMAI.DistributedElevatorFSMA return self.latch def checkBoard(self, av): - if av.hp < self.minLaff: - return ElevatorConstants.REJECT_MINLAFF if self.DoBlockedRoomCheck and self.bldg: if hasattr(self.bldg, 'blockedRooms'): if self.bldg.blockedRooms: diff --git a/toontown/building/DistributedElevator.py b/toontown/building/DistributedElevator.py index 46c4047f..83b244fc 100755 --- a/toontown/building/DistributedElevator.py +++ b/toontown/building/DistributedElevator.py @@ -344,8 +344,6 @@ class DistributedElevator(DistributedObject.DistributedObject): if hasattr(base.localAvatar, 'elevatorNotifier'): if reason == REJECT_SHUFFLE: base.localAvatar.elevatorNotifier.showMe(TTLocalizer.ElevatorHoppedOff) - elif reason == REJECT_MINLAFF: - base.localAvatar.elevatorNotifier.showMe(TTLocalizer.ElevatorMinLaff % self.minLaff) elif reason == REJECT_PROMOTION: base.localAvatar.elevatorNotifier.showMe(TTLocalizer.BossElevatorRejectMessage) doneStatus = {'where': 'reject'} @@ -496,12 +494,6 @@ class DistributedElevator(DistributedObject.DistributedObject): def getAntiShuffle(self): return self.antiShuffle - def setMinLaff(self, minLaff): - self.minLaff = minLaff - - def getMinLaff(self): - return self.minLaff - def storeToonTrack(self, avId, track): self.clearToonTrack(avId) self.__toonTracks[avId] = track diff --git a/toontown/building/DistributedElevatorAI.py b/toontown/building/DistributedElevatorAI.py index 4bbfbc82..93151702 100755 --- a/toontown/building/DistributedElevatorAI.py +++ b/toontown/building/DistributedElevatorAI.py @@ -11,7 +11,7 @@ from direct.directnotify import DirectNotifyGlobal class DistributedElevatorAI(DistributedObjectAI.DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedElevatorAI') - def __init__(self, air, bldg, numSeats = 4, antiShuffle = 0, minLaff = 0): + def __init__(self, air, bldg, numSeats = 4, antiShuffle = 0): DistributedObjectAI.DistributedObjectAI.__init__(self, air) self.type = ELEVATOR_NORMAL self.countdownTime = ElevatorData[self.type]['countdown'] @@ -19,7 +19,6 @@ class DistributedElevatorAI(DistributedObjectAI.DistributedObjectAI): self.bldgDoId = bldg.getDoId() self.seats = [] self.setAntiShuffle(antiShuffle) - self.setMinLaff(minLaff) if self.antiShuffle: if not hasattr(simbase.air, 'elevatorTripId'): simbase.air.elevatorTripId = 1 @@ -145,11 +144,9 @@ class DistributedElevatorAI(DistributedObjectAI.DistributedObjectAI): return self.fsm.getCurrentState().getName() def avIsOKToBoard(self, av): - return av.hp > self.minLaff and self.accepting + return self.accepting def checkBoard(self, av): - if av.hp < self.minLaff: - return REJECT_MINLAFF return 0 def requestBoard(self, *args): @@ -288,10 +285,4 @@ class DistributedElevatorAI(DistributedObjectAI.DistributedObjectAI): self.antiShuffle = antiShuffle def getAntiShuffle(self): - return self.antiShuffle - - def setMinLaff(self, minLaff): - self.minLaff = minLaff - - def getMinLaff(self): - return self.minLaff + return self.antiShuffle \ No newline at end of file diff --git a/toontown/building/DistributedElevatorExtAI.py b/toontown/building/DistributedElevatorExtAI.py index b399545a..58f3b041 100755 --- a/toontown/building/DistributedElevatorExtAI.py +++ b/toontown/building/DistributedElevatorExtAI.py @@ -11,8 +11,8 @@ from direct.directnotify import DirectNotifyGlobal class DistributedElevatorExtAI(DistributedElevatorAI.DistributedElevatorAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedElevatorExtAI') - def __init__(self, air, bldg, numSeats = 4, antiShuffle = 0, minLaff = 0): - DistributedElevatorAI.DistributedElevatorAI.__init__(self, air, bldg, numSeats, antiShuffle=antiShuffle, minLaff=minLaff) + def __init__(self, air, bldg, numSeats = 4, antiShuffle = 0): + DistributedElevatorAI.DistributedElevatorAI.__init__(self, air, bldg, numSeats, antiShuffle=antiShuffle) self.anyToonsBailed = 0 self.boardingParty = None return diff --git a/toontown/building/DistributedElevatorFSM.py b/toontown/building/DistributedElevatorFSM.py index fc272c03..e24c6110 100755 --- a/toontown/building/DistributedElevatorFSM.py +++ b/toontown/building/DistributedElevatorFSM.py @@ -316,8 +316,6 @@ class DistributedElevatorFSM(DistributedObject.DistributedObject, FSM): if hasattr(base.localAvatar, 'elevatorNotifier'): if reason == REJECT_SHUFFLE: base.localAvatar.elevatorNotifier.showMe(TTLocalizer.ElevatorHoppedOff) - elif reason == REJECT_MINLAFF: - base.localAvatar.elevatorNotifier.showMe(TTLocalizer.ElevatorMinLaff % self.minLaff) elif reason == REJECT_PROMOTION: base.localAvatar.elevatorNotifier.showMe(TTLocalizer.BossElevatorRejectMessage) elif reason == REJECT_BLOCKED_ROOM: @@ -475,11 +473,5 @@ class DistributedElevatorFSM(DistributedObject.DistributedObject, FSM): def getAntiShuffle(self): return self.antiShuffle - def setMinLaff(self, minLaff): - self.minLaff = minLaff - - def getMinLaff(self): - return self.minLaff - def getDestName(self): return None diff --git a/toontown/building/DistributedElevatorFSMAI.py b/toontown/building/DistributedElevatorFSMAI.py index 41e3760e..3284a81b 100755 --- a/toontown/building/DistributedElevatorFSMAI.py +++ b/toontown/building/DistributedElevatorFSMAI.py @@ -38,7 +38,7 @@ class DistributedElevatorFSMAI(DistributedObjectAI.DistributedObjectAI, FSM): 'Opening'] } id = 0 - def __init__(self, air, bldg, numSeats = 4, antiShuffle = 0, minLaff = 0): + def __init__(self, air, bldg, numSeats = 4, antiShuffle = 0): DistributedObjectAI.DistributedObjectAI.__init__(self, air) FSM.__init__(self, 'Elevator_%s_FSM' % self.id) self.type = ELEVATOR_NORMAL @@ -50,7 +50,6 @@ class DistributedElevatorFSMAI(DistributedObjectAI.DistributedObjectAI, FSM): self.seats.append(None) self.accepting = 0 self.setAntiShuffle(antiShuffle) - self.setMinLaff(minLaff) if self.antiShuffle: if not hasattr(simbase.air, 'elevatorTripId'): simbase.air.elevatorTripId = 1 @@ -146,13 +145,9 @@ class DistributedElevatorFSMAI(DistributedObjectAI.DistributedObjectAI, FSM): return self.state def avIsOKToBoard(self, av): - if av.hp > self.minLaff: - pass return self.accepting def checkBoard(self, av): - if av.hp < self.minLaff: - return REJECT_MINLAFF return 0 def requestBoard(self, *args): @@ -274,10 +269,4 @@ class DistributedElevatorFSMAI(DistributedObjectAI.DistributedObjectAI, FSM): self.antiShuffle = antiShuffle def getAntiShuffle(self): - return self.antiShuffle - - def setMinLaff(self, minLaff): - self.minLaff = minLaff - - def getMinLaff(self): - return self.minLaff + return self.antiShuffle \ No newline at end of file diff --git a/toontown/building/DistributedElevatorFloorAI.py b/toontown/building/DistributedElevatorFloorAI.py index e039a8db..32b9ea53 100755 --- a/toontown/building/DistributedElevatorFloorAI.py +++ b/toontown/building/DistributedElevatorFloorAI.py @@ -40,8 +40,8 @@ class DistributedElevatorFloorAI(DistributedElevatorFSMAI.DistributedElevatorFSM 'Opening'] } id = 0 - def __init__(self, air, lawOfficeId, bldg, avIds, markerId = None, numSeats = 4, antiShuffle = 0, minLaff = 0): - DistributedElevatorFSMAI.DistributedElevatorFSMAI.__init__(self, air, bldg, numSeats, antiShuffle = antiShuffle, minLaff = minLaff) + def __init__(self, air, lawOfficeId, bldg, avIds, markerId = None, numSeats = 4, antiShuffle = 0): + DistributedElevatorFSMAI.DistributedElevatorFSMAI.__init__(self, air, bldg, numSeats, antiShuffle = antiShuffle) FSM.__init__(self, 'ElevatorFloor_%s_FSM' % self.id) self.type = ELEVATOR_STAGE self.countdownTime = ElevatorData[self.type]['countdown'] diff --git a/toontown/building/DistributedVPElevatorAI.py b/toontown/building/DistributedVPElevatorAI.py index 1cc97feb..d172f705 100755 --- a/toontown/building/DistributedVPElevatorAI.py +++ b/toontown/building/DistributedVPElevatorAI.py @@ -3,7 +3,7 @@ import DistributedBossElevatorAI class DistributedVPElevatorAI(DistributedBossElevatorAI.DistributedBossElevatorAI): - def __init__(self, air, bldg, zone, antiShuffle = 0, minLaff = 0): - DistributedBossElevatorAI.DistributedBossElevatorAI.__init__(self, air, bldg, zone, antiShuffle=antiShuffle, minLaff=minLaff) + def __init__(self, air, bldg, zone, antiShuffle = 0): + DistributedBossElevatorAI.DistributedBossElevatorAI.__init__(self, air, bldg, zone, antiShuffle=antiShuffle) self.type = ELEVATOR_VP self.countdownTime = ElevatorData[self.type]['countdown'] diff --git a/toontown/building/ElevatorConstants.py b/toontown/building/ElevatorConstants.py index cc914bbb..dd483ed1 100755 --- a/toontown/building/ElevatorConstants.py +++ b/toontown/building/ElevatorConstants.py @@ -11,11 +11,10 @@ ELEVATOR_COUNTRY_CLUB = 8 ELEVATOR_FIELD = 9 REJECT_NOREASON = 0 REJECT_SHUFFLE = 1 -REJECT_MINLAFF = 2 -REJECT_NOSEAT = 3 -REJECT_PROMOTION = 4 -REJECT_BLOCKED_ROOM = 5 -REJECT_BOARDINGPARTY = 6 +REJECT_NOSEAT = 2 +REJECT_PROMOTION = 3 +REJECT_BLOCKED_ROOM = 4 +REJECT_BOARDINGPARTY = 5 MAX_GROUP_BOARDING_TIME = 6.0 ElevatorData = {ELEVATOR_NORMAL: {'openTime': 2.0, 'closeTime': 2.0, diff --git a/toontown/coghq/DistributedCogKart.py b/toontown/coghq/DistributedCogKart.py index 25be081f..2384dfa5 100755 --- a/toontown/coghq/DistributedCogKart.py +++ b/toontown/coghq/DistributedCogKart.py @@ -355,8 +355,6 @@ class DistributedCogKart(DistributedElevatorExt.DistributedElevatorExt): if hasattr(base.localAvatar, 'elevatorNotifier'): if reason == ElevatorConstants.REJECT_SHUFFLE: base.localAvatar.elevatorNotifier.showMe(TTLocalizer.ElevatorHoppedOff) - elif reason == ElevatorConstants.REJECT_MINLAFF: - base.localAvatar.elevatorNotifier.showMe(TTLocalizer.KartMinLaff % self.minLaff) elif reason == ElevatorConstants.REJECT_PROMOTION: base.localAvatar.elevatorNotifier.showMe(TTLocalizer.BossElevatorRejectMessage) doneStatus = {'where': 'reject'} diff --git a/toontown/coghq/DistributedCogKartAI.py b/toontown/coghq/DistributedCogKartAI.py index 3026ff45..c0eaa3c7 100755 --- a/toontown/coghq/DistributedCogKartAI.py +++ b/toontown/coghq/DistributedCogKartAI.py @@ -8,9 +8,9 @@ from toontown.toonbase import ToontownGlobals class DistributedCogKartAI(DistributedElevatorExtAI.DistributedElevatorExtAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCogKartAI') - def __init__(self, air, index, x, y, z, h, p, r, bldg, minLaff): + def __init__(self, air, index, x, y, z, h, p, r, bldg): self.posHpr = (x, y, z, h, p, r) - DistributedElevatorExtAI.DistributedElevatorExtAI.__init__(self, air, bldg, minLaff = minLaff) + DistributedElevatorExtAI.DistributedElevatorExtAI.__init__(self, air, bldg) self.type = ElevatorConstants.ELEVATOR_COUNTRY_CLUB self.courseIndex = index if self.courseIndex == 0: diff --git a/toontown/coghq/DistributedFactoryElevatorExtAI.py b/toontown/coghq/DistributedFactoryElevatorExtAI.py index 9a2db1a4..b7207812 100755 --- a/toontown/coghq/DistributedFactoryElevatorExtAI.py +++ b/toontown/coghq/DistributedFactoryElevatorExtAI.py @@ -9,8 +9,8 @@ from direct.task import Task class DistributedFactoryElevatorExtAI(DistributedElevatorExtAI.DistributedElevatorExtAI): - def __init__(self, air, bldg, factoryId, entranceId, antiShuffle = 0, minLaff = 0): - DistributedElevatorExtAI.DistributedElevatorExtAI.__init__(self, air, bldg, antiShuffle=antiShuffle, minLaff=minLaff) + def __init__(self, air, bldg, factoryId, entranceId, antiShuffle = 0): + DistributedElevatorExtAI.DistributedElevatorExtAI.__init__(self, air, bldg, antiShuffle=antiShuffle) self.factoryId = factoryId self.entranceId = entranceId diff --git a/toontown/coghq/DistributedLawOfficeElevatorExtAI.py b/toontown/coghq/DistributedLawOfficeElevatorExtAI.py index 15c25014..41161e7a 100755 --- a/toontown/coghq/DistributedLawOfficeElevatorExtAI.py +++ b/toontown/coghq/DistributedLawOfficeElevatorExtAI.py @@ -9,8 +9,8 @@ from toontown.toonbase import ToontownGlobals class DistributedLawOfficeElevatorExtAI(DistributedElevatorExtAI.DistributedElevatorExtAI): - def __init__(self, air, bldg, lawOfficeId, entranceId, antiShuffle = 0, minLaff = 0): - DistributedElevatorExtAI.DistributedElevatorExtAI.__init__(self, air, bldg, antiShuffle = antiShuffle, minLaff = minLaff) + def __init__(self, air, bldg, lawOfficeId, entranceId, antiShuffle = 0): + DistributedElevatorExtAI.DistributedElevatorExtAI.__init__(self, air, bldg, antiShuffle = antiShuffle) self.lawOfficeId = lawOfficeId self.entranceId = entranceId diff --git a/toontown/coghq/DistributedMintElevatorExtAI.py b/toontown/coghq/DistributedMintElevatorExtAI.py index 7a066b84..d3fd5313 100755 --- a/toontown/coghq/DistributedMintElevatorExtAI.py +++ b/toontown/coghq/DistributedMintElevatorExtAI.py @@ -10,8 +10,8 @@ import CogDisguiseGlobals class DistributedMintElevatorExtAI(DistributedElevatorExtAI.DistributedElevatorExtAI): - def __init__(self, air, bldg, mintId, antiShuffle = 0, minLaff = 0): - DistributedElevatorExtAI.DistributedElevatorExtAI.__init__(self, air, bldg, antiShuffle=antiShuffle, minLaff=minLaff) + def __init__(self, air, bldg, mintId, antiShuffle = 0): + DistributedElevatorExtAI.DistributedElevatorExtAI.__init__(self, air, bldg, antiShuffle=antiShuffle) self.mintId = mintId self.cogDept = ToontownGlobals.cogHQZoneId2deptIndex(self.mintId) self.type = ELEVATOR_MINT diff --git a/toontown/estate/DistributedChair.py b/toontown/estate/DistributedChair.py index b916c0ef..b68847bc 100644 --- a/toontown/estate/DistributedChair.py +++ b/toontown/estate/DistributedChair.py @@ -12,6 +12,7 @@ class DistributedChair(DistributedFurnitureItem): self.dialog = None self.exitButton = None self.avId = ToontownGlobals.CHAIR_NONE + self.accept('exitingStoppedState', self.destroyGui) def loadModel(self): model = DistributedFurnitureItem.loadModel(self) diff --git a/toontown/estate/DistributedRewardCrate.py b/toontown/estate/DistributedRewardCrate.py index 911641a6..cd291bc5 100644 --- a/toontown/estate/DistributedRewardCrate.py +++ b/toontown/estate/DistributedRewardCrate.py @@ -10,6 +10,7 @@ class DistributedRewardCrate(DistributedFurnitureItem): def __init__(self, cr): DistributedFurnitureItem.__init__(self, cr) self.dialog = None + self.accept('exitingStoppedState', self.destroyDialog) def loadModel(self): model = DistributedFurnitureItem.loadModel(self) diff --git a/toontown/estate/DistributedTV.py b/toontown/estate/DistributedTV.py index 576253ec..97d10d71 100644 --- a/toontown/estate/DistributedTV.py +++ b/toontown/estate/DistributedTV.py @@ -13,10 +13,7 @@ class DistributedTV(DistributedFurnitureItem): self.dialog = None self.screen = None self.sound = None - - def announceGenerate(self): self.accept('exitingStoppedState', self.destroyGui) - DistributedFurnitureItem.announceGenerate(self) def loadModel(self, animate=1): model = DistributedFurnitureItem.loadModel(self) @@ -94,7 +91,6 @@ class DistributedTV(DistributedFurnitureItem): self.screen.setColor(1, 1, 1, 1) self.screen.setTexture(movie) self.screen.setTexScale(TextureStage.getDefault(), movie.getTexScale()) - self.sound.setLoop(True) self.sound.setTime(min(self.sound.length(), int(time.time() - startTime))) self.sound.play() diff --git a/toontown/hood/BossbotHQAI.py b/toontown/hood/BossbotHQAI.py index bf9217eb..d734ec9d 100755 --- a/toontown/hood/BossbotHQAI.py +++ b/toontown/hood/BossbotHQAI.py @@ -37,14 +37,13 @@ class BossbotHQAI(CogHQAI.CogHQAI): (-48.44, 15.308, 0) ) hprList = ((110.815, 0, 0), (61.231, 0, 0), (-105.481, 0, 0)) - mins = ToontownGlobals.FactoryLaffMinimums[3] for cogCourse in xrange(len(posList)): pos = posList[cogCourse] hpr = hprList[cogCourse] cogKart = DistributedCogKartAI.DistributedCogKartAI( self.air, cogCourse, pos[0], pos[1], pos[2], hpr[0], hpr[1], hpr[2], - self.air.countryClubMgr, minLaff=mins[cogCourse]) + self.air.countryClubMgr) cogKart.generateWithRequired(self.zoneId) self.cogKarts.append(cogKart) diff --git a/toontown/hood/CashbotHQAI.py b/toontown/hood/CashbotHQAI.py index 24223d28..eb69bd61 100755 --- a/toontown/hood/CashbotHQAI.py +++ b/toontown/hood/CashbotHQAI.py @@ -37,11 +37,10 @@ class CashbotHQAI(CogHQAI.CogHQAI): ToontownGlobals.CashbotMintIntB, ToontownGlobals.CashbotMintIntC ) - mins = ToontownGlobals.FactoryLaffMinimums[1] for i in xrange(len(destZones)): mintElevator = DistributedMintElevatorExtAI( self.air, self.air.mintMgr, destZones[i], - antiShuffle=0, minLaff=mins[i]) + antiShuffle=0) mintElevator.generateWithRequired(self.zoneId) self.mintElevators.append(mintElevator) diff --git a/toontown/hood/LawbotHQAI.py b/toontown/hood/LawbotHQAI.py index 01d1498c..a13eaaa5 100755 --- a/toontown/hood/LawbotHQAI.py +++ b/toontown/hood/LawbotHQAI.py @@ -50,11 +50,10 @@ class LawbotHQAI(CogHQAI.CogHQAI): ToontownGlobals.LawbotStageIntC, ToontownGlobals.LawbotStageIntD ) - mins = ToontownGlobals.FactoryLaffMinimums[2] for i in xrange(len(destZones)): lawOfficeElevator = DistributedLawOfficeElevatorExtAI( self.air, self.air.lawOfficeMgr, destZones[i], i, - antiShuffle=0, minLaff=mins[i]) + antiShuffle=0) lawOfficeElevator.generateWithRequired( ToontownGlobals.LawbotOfficeExt) self.lawOfficeElevators.append(lawOfficeElevator) diff --git a/toontown/makeatoon/ColorShop.py b/toontown/makeatoon/ColorShop.py index b5bbadbb..3f004a6d 100755 --- a/toontown/makeatoon/ColorShop.py +++ b/toontown/makeatoon/ColorShop.py @@ -285,10 +285,10 @@ class ColorShop(StateData.StateData): self.notify.debug('Entering changeColor') colorList = self.getColorList() newChoice = self.shuffleButton.getCurrChoice() - newHeadColorIndex = colorList.index(newChoice[0]) - newArmColorIndex = colorList.index(newChoice[1]) - newGloveColorIndex = colorList.index(newChoice[2]) - newLegColorIndex = colorList.index(newChoice[3]) + newHeadColorIndex = self.indexOf(colorList, newChoice[0], 25) + newArmColorIndex = self.indexOf(colorList, newChoice[1], 25) + newGloveColorIndex = self.indexOf(colorList, newChoice[2], 0) + newLegColorIndex = self.indexOf(colorList, newChoice[3], 25) self.__swapHeadColor(newHeadColorIndex - self.headChoice) if self.colorAll: self.__swapArmColor(newHeadColorIndex - self.armChoice) @@ -298,6 +298,12 @@ class ColorShop(StateData.StateData): self.__swapArmColor(newArmColorIndex - self.armChoice) self.__swapGloveColor(newGloveColorIndex - self.gloveChoice) self.__swapLegColor(newLegColorIndex - self.legChoice) + + def indexOf(self, list, item, default): + try: + return list.index(item) + except: + return default def getCurrToonSetting(self): return [self.dna.headColor, self.dna.armColor, self.dna.gloveColor, self.dna.legColor] diff --git a/toontown/shtiker/ShardPage.py b/toontown/shtiker/ShardPage.py index fe0016ba..876e1beb 100755 --- a/toontown/shtiker/ShardPage.py +++ b/toontown/shtiker/ShardPage.py @@ -87,6 +87,7 @@ class ShardPage(ShtikerPage.ShtikerPage): self.groupDialog = None def load(self): + matchGui = loader.loadModel('phase_3.5/models/gui/matching_game_gui') main_text_scale = 0.06 title_text_scale = 0.12 self.title = DirectLabel(parent=self, relief=None, text=TTLocalizer.ShardPageTitle, text_scale=title_text_scale, textMayChange=0, pos=(0, 0, 0.6)) @@ -96,6 +97,7 @@ class ShardPage(ShtikerPage.ShtikerPage): totalPop_ycoord = shardPop_ycoord - 0.44 self.districtInfo = NodePath('Selected-Shard-Info') self.districtInfo.reparentTo(self) + self.preferredButton = DirectButton(parent=self, relief=None, image=matchGui.find('**/minnieCircle'), pos=(0.1, 0, -0.575), scale=0.35, text=TTLocalizer.ShardPagePreferred, text_scale=0.11, text_pos=(0, -0.2), command=self.setPreferredShard) self.totalPopulationText = DirectLabel(parent=self.districtInfo, relief=None, text=TTLocalizer.ShardPagePopulationTotal % 1, text_scale=main_text_scale, text_wordwrap=8, textMayChange=1, text_align=TextNode.ACenter, pos=(0.4247, 0, totalPop_ycoord)) if self.showTotalPop: self.totalPopulationText.show() @@ -112,6 +114,7 @@ class ShardPage(ShtikerPage.ShtikerPage): self.buttonXstart = self.itemFrameXorigin + 0.293 self.regenerateScrollList() scrollTitle = DirectFrame(parent=self.scrollList, text=TTLocalizer.ShardPageScrollTitle, text_scale=main_text_scale, text_align=TextNode.ACenter, relief=None, pos=(self.buttonXstart, 0, self.itemFrameZorigin + 0.127)) + matchGui.removeNode() def firstLoadShard(self, buttonTuple): curShardTuples = base.cr.listActiveShards() @@ -258,9 +261,9 @@ class ShardPage(ShtikerPage.ShtikerPage): popText = self.getPopText(shardPop) districtInfoNode = self.districtInfo.attachNewNode('district-info') self.districtStatusLabel = DirectLabel(parent=districtInfoNode, relief=None, pos=(0.4247, 0, 0.45), text=popText, text_scale=0.09, text_fg=Vec4(0, 0, 0, 1), textMayChange=1) - pText = '%s Population: %s' % (shardName, str(shardPop)) + pText = TTLocalizer.ShardPageShardTitle % (shardName, str(shardPop)) self.populationStatusLabel = DirectLabel(parent=districtInfoNode, relief=None, pos=(0.4247, 0, 0.38), text=pText, text_scale=0.04, text_fg=Vec4(0, 0, 0, 1), textMayChange=1) - tText = 'Teleport to\n%s' % shardName + tText = TTLocalizer.ShardPageTeleport % shardName tImage = loader.loadModel('phase_4/models/gui/purchase_gui') tImage.setSz(1.35) self.shardTeleportButton = DirectButton(parent=districtInfoNode, relief=None, pos=(0.4247, 0, 0.25), image=(tImage.find('**/PurchScrn_BTN_UP'), tImage.find('**/PurchScrn_BTN_DN'), tImage.find('**/PurchScrn_BTN_RLVR')), text=tText, text_scale=0.065, text_pos=(0.0, 0.015), text_fg=Vec4(0, 0, 0, 1), textMayChange=1, command=self.choseShard, extraArgs=[shardId]) @@ -272,6 +275,7 @@ class ShardPage(ShtikerPage.ShtikerPage): self.currentO = [shardPop, shardName, shardId] self.currentBTL['state'] = DGG.DISABLED self.currentBTR['state'] = DGG.DISABLED + self.preferredButton.setColor((0, 1, 0, 1) if settings.get('preferredShard') == shardName else (1, 0, 0, 1)) if shardId == base.localAvatar.defaultShard: self.shardTeleportButton['state'] = DGG.DISABLED @@ -486,4 +490,12 @@ class ShardPage(ShtikerPage.ShtikerPage): except: place = base.cr.playGame.hood.place - place.requestTeleport(canonicalHoodId, canonicalHoodId, shardId, -1) \ No newline at end of file + place.requestTeleport(canonicalHoodId, canonicalHoodId, shardId, -1) + + def setPreferredShard(self): + if settings.get('preferredShard', '') == self.currentO[1]: + self.preferredButton.setColor(1, 0, 0, 1) + del settings['preferredShard'] + else: + self.preferredButton.setColor(0, 1, 0, 1) + settings['preferredShard'] = self.currentO[1] \ No newline at end of file diff --git a/toontown/toon/DistributedSmartNPC.py b/toontown/toon/DistributedSmartNPC.py deleted file mode 100755 index d557db75..00000000 --- a/toontown/toon/DistributedSmartNPC.py +++ /dev/null @@ -1,53 +0,0 @@ -from panda3d.core import * - -from DistributedNPCToonBase import * -from toontown.hood import ZoneUtil -from otp.nametag.NametagConstants import * -from toontown.quest import QuestChoiceGui -from toontown.quest import QuestParser -from toontown.quest import TrackChoiceGui -from toontown.toonbase import TTLocalizer - - -SPAMMING = 1 -DOUBLE_ENTRY = 2 - -class DistributedSmartNPC(DistributedNPCToonBase): - - def __init__(self, cr): - DistributedNPCToonBase.__init__(self, cr) - self.accept('chatUpdate', self.chatUpdate) - - def disable(self): - self.ignoreAll() - DistributedNPCToonBase.disable(self) - - def delayDelete(self): - DistributedNPCToonBase.delayDelete(self) - self.disable() - - def handleCollisionSphereEnter(self, collEntry): - self.sendUpdate('avatarEnter', []) - - def chatUpdate(self, message, chatFlags): - self.sendUpdate('talkMessage', [base.localAvatar.doId, message]) - - def greet(self, npcId, avId): - if avId in base.cr.doId2do: - avName = base.cr.doId2do.get(avId).getName() - self.setChatAbsolute('Hello, %s' % avName + '!', CFSpeech | CFTimeout) - - def dismiss(self, avId, statusCode): - if avId in base.cr.doId2do: - avName = base.cr.doId2do.get(avId).getName() - if statusCode == SPAMMING: - self.setChatAbsolute('Slow down there, %s' % avName + '. I can\'t even understand you!', CFSpeech | CFTimeout) - elif statusCode == DOUBLE_ENTRY: - self.setChatAbsolute('Well hey there %s' % avName + ', didn\'t we JUST talk?', CFSpeech | CFTimeout) - - def respond(self, npcId, message, avId): - try: - name = base.cr.doId2do.get(avId).getName() - self.setChatAbsolute(message, CFSpeech | CFTimeout) - except: - print 'Responding to non-available character!' diff --git a/toontown/toon/DistributedSmartNPCAI.py b/toontown/toon/DistributedSmartNPCAI.py deleted file mode 100755 index b7c9d366..00000000 --- a/toontown/toon/DistributedSmartNPCAI.py +++ /dev/null @@ -1,76 +0,0 @@ -from otp.ai.AIBaseGlobal import * -from direct.task.Task import Task -from panda3d.core import * -from DistributedNPCToonBaseAI import * -from toontown.quest import Quests -import time -from QuestionMgr import ChatterBotFactory, ChatterBotType -from direct.task import Task - -class DistributedSmartNPCAI(DistributedNPCToonBaseAI): - - def __init__(self, air, npcId, questCallback = None, hq = 0): - DistributedNPCToonBaseAI.__init__(self, air, npcId, questCallback) - self.air = air - self.personOfInterest = 0 - self.stopDouble = 0 - self.nameOfInterest = '' - self.factory = ChatterBotFactory() - self.engine = self.factory.create(ChatterBotType.CLEVERBOT) - self.brain = self.engine.create_session() - self.myTask = taskMgr.doMethodLater(0.5, self.tylerTask, 'tylerTask') - self.index = 0 - - def tylerTask(self, task): - if task.time >= 5: - self.index = 0 - if task.time <= 25: - return task.cont - self.response('I guess you don\'t want to talk anymore %s' % self.nameOfInterest + '...', self.personOfInterest) - self.stopDouble = self.personOfInterest - self.personOfInterest = 0 - self.nameOfInterest = '' - return task.done - - def restartTask(self): - taskMgr.remove(self.myTask) - taskMgr.add(self.myTask) - - def avatarEnter(self): - if not self.personOfInterest: - sender = self.air.getAvatarIdFromSender() - if not sender == self.stopDouble: - name = self.air.doId2do.get(sender).getName() - self.personOfInterest = sender - self.nameOfInterest = name - self.sendUpdate('greet', [self.npcId, sender]) - self.brain = self.engine.create_session() - else: - self.sendUpdate('dismiss', [sender, 2]) - pass - else: - #Tyler is busy! - pass - - def talkMessage(self, sender, message): - if sender == self.personOfInterest: - self.index += 1 - if self.index >= 4: - self.stopDouble = self.personOfInterest - self.personOfInterest = 0 - self.nameOfInterest = '' - taskMgr.remove(self.myTask) - self.index = 0 - self.sendUpdate('dismiss', [sender, 1]) - return - self.restartTask() - self.generateAnswer(message, sender) - - def generateAnswer(self, message, sender): - name = self.air.doId2do.get(sender).getName() - answer = self.brain.think(message) - self.response(answer, sender) - - def response(self, response, sendTo): - self.sendUpdate('respond', [self.npcId, response, sendTo]) - self.restartTask() diff --git a/toontown/toon/DistributedToonAI.py b/toontown/toon/DistributedToonAI.py index ab78b47f..23330411 100755 --- a/toontown/toon/DistributedToonAI.py +++ b/toontown/toon/DistributedToonAI.py @@ -4843,7 +4843,7 @@ def dna(part, value): return 'Bottom texture color index set to: ' + str(dna.botTexColor) if part == 'show': - return dna.asTuple() + return dna.asNpcTuple() if value else dna.asTuple() if part == 'showrandom': return NPCToons.getRandomDNA(time.time(), value) return 'Invalid part: ' + part diff --git a/toontown/toon/NPCToons.py b/toontown/toon/NPCToons.py index 134a814d..c4652bb9 100755 --- a/toontown/toon/NPCToons.py +++ b/toontown/toon/NPCToons.py @@ -67,9 +67,8 @@ NPC_PARTYPERSON = 8 NPC_SPECIALQUESTGIVER = 9 NPC_FLIPPYTOONHALL = 10 NPC_SCIENTIST = 11 -NPC_SMART = 12 -NPC_GLOVE = 13 -NPC_LAFF_RESTOCK = 14 +NPC_GLOVE = 12 +NPC_LAFF_RESTOCK = 13 CLERK_COUNTDOWN_TIME = 120 TAILOR_COUNTDOWN_TIME = 300 @@ -90,7 +89,6 @@ def createNPC(air, npcId, desc, zoneId, posIndex = 0, questCallback = None): import DistributedNPCSpecialQuestGiverAI import DistributedNPCFlippyInToonHallAI import DistributedNPCScientistAI - import DistributedSmartNPCAI import DistributedNPCGloveAI import DistributedNPCLaffRestockAI canonicalZoneId, name, dnaType, gender, protected, type = desc @@ -118,8 +116,6 @@ def createNPC(air, npcId, desc, zoneId, posIndex = 0, questCallback = None): npc = DistributedNPCFlippyInToonHallAI.DistributedNPCFlippyInToonHallAI(air, npcId) elif type == NPC_SCIENTIST: npc = DistributedNPCScientistAI.DistributedNPCScientistAI(air, npcId) - elif type == NPC_SMART: - npc = DistributedSmartNPCAI.DistributedSmartNPCAI(air, npcId) elif type == NPC_GLOVE: npc = DistributedNPCGloveAI.DistributedNPCGloveAI(air, npcId) elif type == NPC_LAFF_RESTOCK: @@ -161,9 +157,6 @@ def createNpcsInZone(air, zoneId): if npcDesc[5] == NPC_PARTYPERSON: if not air.wantParties: continue - if npcDesc[5] == NPC_SMART: - if not config.GetBool('want-talkative-tyler', False): - continue npcs.append(createNPC(air, npcId, npcDesc, zoneId, posIndex=i)) return npcs @@ -225,12 +218,6 @@ NPCToonDict = {20000: (-1, 'm', 1, NPC_SPECIALQUESTGIVER), - 998: (2000, - lnames[998], - 'r', - 'm', - 1, - NPC_SMART), 999: (-1, lnames[999], 'r', @@ -11577,8 +11564,7 @@ NPCToonDict = {20000: (-1, 0, 10, 5, - 27, - 0), + 27), 'm', 0, NPC_REGULAR), @@ -11596,8 +11582,7 @@ NPCToonDict = {20000: (-1, 0, 0, 0, - 15, - 0), + 15), 'm', 0, NPC_REGULAR), diff --git a/toontown/toon/QuestionMgr.py b/toontown/toon/QuestionMgr.py deleted file mode 100755 index a61444ac..00000000 --- a/toontown/toon/QuestionMgr.py +++ /dev/null @@ -1,139 +0,0 @@ -# Embedded file name: /Users/pierredavidbelanger/Dev/chatter-bot-api/python/chatterbotapi.py -import md5 -import urllib -import urllib2 -import uuid -import xml.dom.minidom - -class ChatterBotType: - CLEVERBOT = 1 - JABBERWACKY = 2 - PANDORABOTS = 3 - - -class ChatterBotFactory: - - def create(self, type, arg = None): - if type == ChatterBotType.CLEVERBOT: - return _Cleverbot('http://www.cleverbot.com/webservicemin', 35) - elif type == ChatterBotType.JABBERWACKY: - return _Cleverbot('http://jabberwacky.com/webservicemin', 29) - elif type == ChatterBotType.PANDORABOTS: - if arg == None: - raise Exception('PANDORABOTS needs a botid arg') - return _Pandorabots(arg) - else: - return - - -class ChatterBot: - - def create_session(self): - return None - - -class ChatterBotSession: - - def think_thought(self, thought): - return thought - - def think(self, text): - thought = ChatterBotThought() - thought.text = text - return self.think_thought(thought).text - - -class ChatterBotThought: - pass - - -class _Cleverbot(ChatterBot): - - def __init__(self, url, endIndex): - self.url = url - self.endIndex = endIndex - - def create_session(self): - return _CleverbotSession(self) - - -class _CleverbotSession(ChatterBotSession): - - def __init__(self, bot): - self.bot = bot - self.vars = {} - self.vars['start'] = 'y' - self.vars['icognoid'] = 'wsf' - self.vars['fno'] = '0' - self.vars['sub'] = 'Say' - self.vars['islearning'] = '1' - self.vars['cleanslate'] = 'false' - - def think_thought(self, thought): - self.vars['stimulus'] = thought.text - data = urllib.urlencode(self.vars) - data_to_digest = data[9:self.bot.endIndex] - data_digest = md5.new(data_to_digest).hexdigest() - data = data + '&icognocheck=' + data_digest - url_response = urllib2.urlopen(self.bot.url, data) - response = url_response.read() - response_values = response.split('\r') - self.vars['sessionid'] = _utils_string_at_index(response_values, 1) - self.vars['logurl'] = _utils_string_at_index(response_values, 2) - self.vars['vText8'] = _utils_string_at_index(response_values, 3) - self.vars['vText7'] = _utils_string_at_index(response_values, 4) - self.vars['vText6'] = _utils_string_at_index(response_values, 5) - self.vars['vText5'] = _utils_string_at_index(response_values, 6) - self.vars['vText4'] = _utils_string_at_index(response_values, 7) - self.vars['vText3'] = _utils_string_at_index(response_values, 8) - self.vars['vText2'] = _utils_string_at_index(response_values, 9) - self.vars['prevref'] = _utils_string_at_index(response_values, 10) - self.vars['emotionalhistory'] = _utils_string_at_index(response_values, 12) - self.vars['ttsLocMP3'] = _utils_string_at_index(response_values, 13) - self.vars['ttsLocTXT'] = _utils_string_at_index(response_values, 14) - self.vars['ttsLocTXT3'] = _utils_string_at_index(response_values, 15) - self.vars['ttsText'] = _utils_string_at_index(response_values, 16) - self.vars['lineRef'] = _utils_string_at_index(response_values, 17) - self.vars['lineURL'] = _utils_string_at_index(response_values, 18) - self.vars['linePOST'] = _utils_string_at_index(response_values, 19) - self.vars['lineChoices'] = _utils_string_at_index(response_values, 20) - self.vars['lineChoicesAbbrev'] = _utils_string_at_index(response_values, 21) - self.vars['typingData'] = _utils_string_at_index(response_values, 22) - self.vars['divert'] = _utils_string_at_index(response_values, 23) - response_thought = ChatterBotThought() - response_thought.text = _utils_string_at_index(response_values, 16) - return response_thought - - -class _Pandorabots(ChatterBot): - - def __init__(self, botid): - self.botid = botid - - def create_session(self): - return _PandorabotsSession(self) - - -class _PandorabotsSession(ChatterBotSession): - - def __init__(self, bot): - self.vars = {} - self.vars['botid'] = bot.botid - self.vars['custid'] = uuid.uuid1() - - def think_thought(self, thought): - self.vars['input'] = thought.text - data = urllib.urlencode(self.vars) - url_response = urllib2.urlopen('http://www.pandorabots.com/pandora/talk-xml', data) - response = url_response.read() - response_dom = xml.dom.minidom.parseString(response) - response_thought = ChatterBotThought() - response_thought.text = response_dom.getElementsByTagName('that')[0].childNodes[0].data.strip() - return response_thought - - -def _utils_string_at_index(strings, index): - if len(strings) > index: - return strings[index] - else: - return '' diff --git a/toontown/toon/QuestionMgrCustom.py b/toontown/toon/QuestionMgrCustom.py deleted file mode 100755 index c1c10d30..00000000 --- a/toontown/toon/QuestionMgrCustom.py +++ /dev/null @@ -1,26 +0,0 @@ -import random - - -class QuestionMgr: - - def __init__(self): - self.greetings = ['hi', 'hello', 'hey', 'sup', 'howdy', 'yo'] - self.greetingResp = ['Hello there, ', 'Howdy there, ', 'Hows it hanging, ', 'How do you do, ', 'Whats up, ', 'Woah! You scared me there '] - self.response = '' - self.confused = 1 - - def ask(self, message, sender): - msg = message.lower() - vbls = msg.split() - for i in xrange(0, len(vbls)): - if vbls[i] in self.greetings: - index = random.randint(0, len(self.greetingResp) -1) - helloResp = self.greetingResp[index] - respFinal = helloResp + '%s' % sender + '!' - self.response += helloResp - self.confused = 0 - else: - if self.confused: - self.response += 'Dang, I really don\'t understand you.' - self.confused = 1 - return self.response diff --git a/toontown/toon/ToonDNA.py b/toontown/toon/ToonDNA.py index 25705c47..cdf58fdd 100755 --- a/toontown/toon/ToonDNA.py +++ b/toontown/toon/ToonDNA.py @@ -2451,6 +2451,10 @@ class ToonDNA: dg.addUint8(self.sleeveTexColor) dg.addUint8(self.botTex) dg.addUint8(self.botTexColor) + self.armColor = self.migrateColor(self.armColor) + self.gloveColor = self.migrateColor(self.gloveColor) + self.legColor = self.migrateColor(self.legColor) + self.headColor = self.migrateColor(self.headColor) for colors in (self.armColor, self.gloveColor, self.legColor, self.headColor): for color in colors[:-1]: dg.addFloat64(color) @@ -2699,6 +2703,22 @@ class ToonDNA: self.sleeveTexColor, self.botTex, self.botTexColor) + + def asNpcTuple(self): + return (self.head, + self.torso, + self.legs, + self.gender, + allColorsList.index(self.armColor), + allColorsList.index(self.gloveColor), + allColorsList.index(self.legColor), + allColorsList.index(self.headColor), + self.topTex, + self.topTexColor, + self.sleeveTex, + self.sleeveTexColor, + self.botTex, + self.botTexColor) def getType(self): if self.type == 't': diff --git a/toontown/toonbase/TTLocalizerEnglish.py b/toontown/toonbase/TTLocalizerEnglish.py index b8ab4abd..0e22b7b8 100755 --- a/toontown/toonbase/TTLocalizerEnglish.py +++ b/toontown/toonbase/TTLocalizerEnglish.py @@ -3057,10 +3057,8 @@ ElevatorHopOff = 'Hop off' ElevatorStayOff = "If you hop off, you'll need to wait\nfor the elevator to leave or empty." ElevatorLeaderOff = 'Only your leader can decide when to hop off.' ElevatorHoppedOff = 'You need to wait for the next elevator.' -ElevatorMinLaff = 'You need %s laff points to ride this elevator.' ElevatorHopOK = 'Okay' ElevatorGroupMember = 'Only your group leader can\n decide when to board.' -KartMinLaff = 'You need %s laff points to ride this kart' CogsIncExt = ', Inc.' CogsIncModifier = '%s' + CogsIncExt CogsInc = Cogs.upper() + CogsIncExt @@ -5591,7 +5589,6 @@ CatalogExitButtonText = 'Hang Up' CatalogPastButtonText = 'To Past Items' TutorialHQOfficerName = 'HQ Harry' NPCToonNames = {20000: 'Tutorial Tom', - 998: 'Talkative Tyler', 999: 'Toon Tailor', 1000: lToonHQ, 20001: Flippy, @@ -5607,7 +5604,6 @@ NPCToonNames = {20000: 'Tutorial Tom', 2009: lHQOfficerF, 2010: lHQOfficerF, 2012: 'Fisherman Freddy', - 2018: 'Duff..err..TIP Man', 2013: 'Clerk Poppy', 2014: 'Clerk Peppy', 2015: 'Clerk Pappy', @@ -8080,9 +8076,6 @@ QuitBoardingPartyLeader = 'Disband' QuitBoardingPartyNonLeader = 'Leave' QuitBoardingPartyConfirm = 'Are you sure you want to quit this Boarding Group?' BoardcodeMissing = 'Something went wrong; try again later.' -BoardcodeMinLaffLeader = 'Your group cannot board because you have less than %s laff points.' -BoardcodeMinLaffNonLeaderSingular = 'Your group cannot board because %s has less than %s laff points.' -BoardcodeMinLaffNonLeaderPlural = 'Your group cannot board because %s have less than %s laff points.' BoardcodePromotionLeader = 'Your group cannot board because you do not have enough promotion merits.' BoardcodePromotionNonLeaderSingular = 'Your group cannot board because %s does not have enough promotion merits.' BoardcodePromotionNonLeaderPlural = 'Your group cannot board because %s do not have enough promotion merits.' @@ -8090,8 +8083,6 @@ BoardcodeSpace = 'Your group cannot board because there is not enough space.' BoardcodeBattleLeader = 'Your group cannot board because you are in battle.' BoardcodeBattleNonLeaderSingular = 'Your group cannot board because %s is in battle.' BoardcodeBattleNonLeaderPlural = 'Your group cannot board because %s are in battle.' -BoardingInviteMinLaffInviter = 'You need %s Laff Points before being a member of this Boarding Group.' -BoardingInviteMinLaffInvitee = '%s needs %s Laff Points before being a member of this Boarding Group.' BoardingInvitePromotionInviter = 'You need to earn a promotion before being a member of this Boarding Group.' BoardingInvitePromotionInvitee = '%s needs to earn a promotion before being a member of this Boarding Group.' BoardingInviteeInDiffGroup = '%s is already in a different Boarding Group.' @@ -8099,7 +8090,7 @@ BoardingInviteeInKickOutList = '%s had been removed by your leader. Only the lea BoardingInviteePendingIvite = '%s has a pending invite; try again later.' BoardingInviteeInElevator = '%s is currently busy; try again later.' BoardingInviteGroupFull = 'Your Boarding Group is already full.' -BoardingGroupsToLarge = '%s is already in a different Boarding Group that is too large to merge.' +BoardingGroupsTooLarge = '%s is already in a different Boarding Group that is too large to merge.' BoardingAlreadyInGroup = 'You cannot accept this invitation because you are part of another Boarding Group.' BoardingGroupAlreadyFull = 'You cannot accept this invitation because the group is already full.' BoardingKickOutConfirm = 'Are you sure you want to remove %s?' @@ -8728,6 +8719,10 @@ ColorAdvanced = 'Advanced' ColorBasic = 'Basic' ColorAll = 'All' +ShardPagePreferred = 'Preferred' +ShardPageShardTitle = '%s Population: %s' +ShardPageTeleport = 'Teleport to\n%s' + Blacklist = [ "$1ut", "$h1t", diff --git a/toontown/toonbase/ToontownGlobals.py b/toontown/toonbase/ToontownGlobals.py index c24ce69f..d487e7e0 100755 --- a/toontown/toonbase/ToontownGlobals.py +++ b/toontown/toonbase/ToontownGlobals.py @@ -1425,13 +1425,6 @@ ColorNoChat = (0.8, 0.5, 0.1, 1) -FactoryLaffMinimums = [(0, 31, 0), - (0, 66, 71), - (0, - 81, - 86, - 96), - (0, 101, 106)] PICNIC_COUNTDOWN_TIME = 60 BossbotRTIntroStartPosHpr = (0, -64, diff --git a/toontown/toonbase/ToontownStart.py b/toontown/toonbase/ToontownStart.py index 5687efb5..ba86dacf 100644 --- a/toontown/toonbase/ToontownStart.py +++ b/toontown/toonbase/ToontownStart.py @@ -1,4 +1,8 @@ #!/usr/bin/env python2 +import gc + +gc.disable() + import __builtin__ __builtin__.process = 'client' @@ -193,11 +197,15 @@ del version base.loader = base.loader __builtin__.loader = base.loader autoRun = ConfigVariableBool('toontown-auto-run', 1) + +gc.enable() +gc.collect() + if autoRun: try: base.run() except SystemExit: - raise + pass except: - print describeException() - raise + import traceback + traceback.print_exc() \ No newline at end of file diff --git a/toontown/town/TownBattle.py b/toontown/town/TownBattle.py index 79cb54b6..2f788092 100755 --- a/toontown/town/TownBattle.py +++ b/toontown/town/TownBattle.py @@ -359,9 +359,6 @@ class TownBattle(StateData.StateData): def enterAttack(self): self.attackPanel.enter() self.accept(self.attackPanelDoneEvent, self.__handleAttackPanelDone) - for toonPanel in self.toonPanels: - toonPanel.setValues(0, BattleBase.NO_ATTACK) - return None def exitAttack(self):