Holocaust minimum laff for elevators

This commit is contained in:
John 2015-08-06 12:29:26 +03:00
parent c00680154d
commit 3093813f06
27 changed files with 64 additions and 159 deletions

View file

@ -1836,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 {
@ -1863,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 {
@ -1939,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;

View file

@ -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:

View file

@ -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']

View file

@ -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

View file

@ -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:

View file

@ -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

View file

@ -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']

View file

@ -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']

View file

@ -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:

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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']

View file

@ -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']

View file

@ -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,

View file

@ -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'}

View file

@ -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:

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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
@ -8078,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.'
@ -8088,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.'
@ -8097,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?'

View file

@ -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,