mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2025-01-09 17:53:50 +00:00
Holocaust minimum laff for elevators
This commit is contained in:
parent
c00680154d
commit
3093813f06
27 changed files with 64 additions and 159 deletions
4
dependencies/astron/dclass/stride.dc
vendored
4
dependencies/astron/dclass/stride.dc
vendored
|
@ -1836,7 +1836,6 @@ dclass DistributedElevator : DistributedObject {
|
||||||
requestExit() airecv clsend;
|
requestExit() airecv clsend;
|
||||||
setElevatorTripId(uint32) required broadcast ram;
|
setElevatorTripId(uint32) required broadcast ram;
|
||||||
setAntiShuffle(uint8) required broadcast ram;
|
setAntiShuffle(uint8) required broadcast ram;
|
||||||
setMinLaff(uint8) required broadcast ram;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
dclass DistributedElevatorFSM : DistributedObject {
|
dclass DistributedElevatorFSM : DistributedObject {
|
||||||
|
@ -1863,7 +1862,6 @@ dclass DistributedElevatorFSM : DistributedObject {
|
||||||
requestExit() airecv clsend;
|
requestExit() airecv clsend;
|
||||||
setElevatorTripId(uint32) required broadcast ram;
|
setElevatorTripId(uint32) required broadcast ram;
|
||||||
setAntiShuffle(uint8) required broadcast ram;
|
setAntiShuffle(uint8) required broadcast ram;
|
||||||
setMinLaff(uint8) required broadcast ram;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
dclass DistributedElevatorFloor : DistributedElevatorFSM {
|
dclass DistributedElevatorFloor : DistributedElevatorFSM {
|
||||||
|
@ -1939,7 +1937,7 @@ dclass DistributedBoardingParty : DistributedObject {
|
||||||
postSizeReject(uint32, uint32, uint32) broadcast;
|
postSizeReject(uint32, uint32, uint32) broadcast;
|
||||||
postInviteAccepted(uint32) broadcast;
|
postInviteAccepted(uint32) broadcast;
|
||||||
postInviteDelcined(uint32) broadcast;
|
postInviteDelcined(uint32) broadcast;
|
||||||
postInviteNotQualify(uint32, int8, uint32) broadcast;
|
postInviteNotQualify(uint32, int8) broadcast;
|
||||||
postAlreadyInGroup() broadcast;
|
postAlreadyInGroup() broadcast;
|
||||||
postGroupDissolve(uint32, uint32, uint32 [], uint8) broadcast;
|
postGroupDissolve(uint32, uint32, uint32 [], uint8) broadcast;
|
||||||
postMessageAcceptanceFailed(uint32, int8) broadcast;
|
postMessageAcceptanceFailed(uint32, int8) broadcast;
|
||||||
|
|
|
@ -3,14 +3,13 @@ from toontown.toonbase import ToontownGlobals
|
||||||
import copy
|
import copy
|
||||||
BOARDCODE_OKAY = 1
|
BOARDCODE_OKAY = 1
|
||||||
BOARDCODE_MISSING = 0
|
BOARDCODE_MISSING = 0
|
||||||
BOARDCODE_MINLAFF = -1
|
BOARDCODE_PROMOTION = -1
|
||||||
BOARDCODE_PROMOTION = -2
|
BOARDCODE_BATTLE = -2
|
||||||
BOARDCODE_BATTLE = -3
|
BOARDCODE_SPACE = -3
|
||||||
BOARDCODE_SPACE = -4
|
BOARDCODE_DIFF_GROUP = -4
|
||||||
BOARDCODE_DIFF_GROUP = -6
|
BOARDCODE_PENDING_INVITE = -5
|
||||||
BOARDCODE_PENDING_INVITE = -7
|
BOARDCODE_IN_ELEVATOR = -6
|
||||||
BOARDCODE_IN_ELEVATOR = -8
|
BOARDCODE_GROUPS_TOO_LARGE = -7 # JBS
|
||||||
BOARDCODE_GROUPS_TO_LARGE = -9 # JBS
|
|
||||||
INVITE_ACCEPT_FAIL_GROUP_FULL = -1
|
INVITE_ACCEPT_FAIL_GROUP_FULL = -1
|
||||||
|
|
||||||
class BoardingPartyBase:
|
class BoardingPartyBase:
|
||||||
|
|
|
@ -3,7 +3,7 @@ import DistributedBossElevatorAI
|
||||||
|
|
||||||
class DistributedBBElevatorAI(DistributedBossElevatorAI.DistributedBossElevatorAI):
|
class DistributedBBElevatorAI(DistributedBossElevatorAI.DistributedBossElevatorAI):
|
||||||
|
|
||||||
def __init__(self, air, bldg, zone, antiShuffle = 0, minLaff = 0):
|
def __init__(self, air, bldg, zone, antiShuffle = 0):
|
||||||
DistributedBossElevatorAI.DistributedBossElevatorAI.__init__(self, air, bldg, zone, antiShuffle=antiShuffle, minLaff=0)
|
DistributedBossElevatorAI.DistributedBossElevatorAI.__init__(self, air, bldg, zone, antiShuffle=antiShuffle)
|
||||||
self.type = ELEVATOR_BB
|
self.type = ELEVATOR_BB
|
||||||
self.countdownTime = ElevatorData[self.type]['countdown']
|
self.countdownTime = ElevatorData[self.type]['countdown']
|
|
@ -198,17 +198,10 @@ class DistributedBoardingParty(DistributedObject.DistributedObject, BoardingPart
|
||||||
self.groupInviteePanel = None
|
self.groupInviteePanel = None
|
||||||
return
|
return
|
||||||
|
|
||||||
def postInviteNotQualify(self, avId, reason, elevatorId):
|
def postInviteNotQualify(self, avId, reason):
|
||||||
messenger.send('updateGroupStatus')
|
messenger.send('updateGroupStatus')
|
||||||
rejectText = ''
|
rejectText = ''
|
||||||
minLaff = TTLocalizer.BoardingMore
|
|
||||||
if elevatorId:
|
|
||||||
elevator = base.cr.doId2do.get(elevatorId)
|
|
||||||
if elevator:
|
|
||||||
minLaff = elevator.minLaff
|
|
||||||
if avId == localAvatar.doId:
|
if avId == localAvatar.doId:
|
||||||
if reason == BoardingPartyBase.BOARDCODE_MINLAFF:
|
|
||||||
rejectText = TTLocalizer.BoardingInviteMinLaffInviter % minLaff
|
|
||||||
if reason == BoardingPartyBase.BOARDCODE_PROMOTION:
|
if reason == BoardingPartyBase.BOARDCODE_PROMOTION:
|
||||||
rejectText = TTLocalizer.BoardingInvitePromotionInviter
|
rejectText = TTLocalizer.BoardingInvitePromotionInviter
|
||||||
else:
|
else:
|
||||||
|
@ -217,8 +210,6 @@ class DistributedBoardingParty(DistributedObject.DistributedObject, BoardingPart
|
||||||
avatarNameText = avatar.name
|
avatarNameText = avatar.name
|
||||||
else:
|
else:
|
||||||
avatarNameText = ''
|
avatarNameText = ''
|
||||||
if reason == BoardingPartyBase.BOARDCODE_MINLAFF:
|
|
||||||
rejectText = TTLocalizer.BoardingInviteMinLaffInvitee % (avatarNameText, minLaff)
|
|
||||||
if reason == BoardingPartyBase.BOARDCODE_PROMOTION:
|
if reason == BoardingPartyBase.BOARDCODE_PROMOTION:
|
||||||
rejectText = TTLocalizer.BoardingInvitePromotionInvitee % avatarNameText
|
rejectText = TTLocalizer.BoardingInvitePromotionInvitee % avatarNameText
|
||||||
if reason == BoardingPartyBase.BOARDCODE_BATTLE:
|
if reason == BoardingPartyBase.BOARDCODE_BATTLE:
|
||||||
|
@ -229,8 +220,8 @@ class DistributedBoardingParty(DistributedObject.DistributedObject, BoardingPart
|
||||||
rejectText = TTLocalizer.BoardingInviteePendingIvite % avatarNameText
|
rejectText = TTLocalizer.BoardingInviteePendingIvite % avatarNameText
|
||||||
if reason == BoardingPartyBase.BOARDCODE_IN_ELEVATOR:
|
if reason == BoardingPartyBase.BOARDCODE_IN_ELEVATOR:
|
||||||
rejectText = TTLocalizer.BoardingInviteeInElevator % avatarNameText
|
rejectText = TTLocalizer.BoardingInviteeInElevator % avatarNameText
|
||||||
if reason == BoardingPartyBase.BOARDCODE_GROUPS_TO_LARGE: # JBS
|
if reason == BoardingPartyBase.BOARDCODE_GROUPS_TOO_LARGE: # JBS
|
||||||
rejectText = TTLocalizer.BoardingGroupsToLarge % avatarNameText
|
rejectText = TTLocalizer.BoardingGroupsTooLarge % avatarNameText
|
||||||
if self.inviterPanels.isInvitingPanelIdCorrect(avId) or avId == localAvatar.doId:
|
if self.inviterPanels.isInvitingPanelIdCorrect(avId) or avId == localAvatar.doId:
|
||||||
self.inviterPanels.destroyInvitingPanel()
|
self.inviterPanels.destroyInvitingPanel()
|
||||||
self.showMe(rejectText)
|
self.showMe(rejectText)
|
||||||
|
@ -316,23 +307,8 @@ class DistributedBoardingParty(DistributedObject.DistributedObject, BoardingPart
|
||||||
|
|
||||||
avatarText += secondLastName + ' ' + TTLocalizer.And + ' ' + lastName
|
avatarText += secondLastName + ' ' + TTLocalizer.And + ' ' + lastName
|
||||||
return avatarText
|
return avatarText
|
||||||
|
|
||||||
if reason == BoardingPartyBase.BOARDCODE_MINLAFF:
|
if reason == BoardingPartyBase.BOARDCODE_PROMOTION:
|
||||||
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:
|
|
||||||
self.notify.debug("%s 's group cannot board because it does not have enough promotion merits." % leaderId)
|
self.notify.debug("%s 's group cannot board because it does not have enough promotion merits." % leaderId)
|
||||||
if leaderId in avatarsFailingRequirements:
|
if leaderId in avatarsFailingRequirements:
|
||||||
rejectText = TTLocalizer.BoardcodePromotionLeader
|
rejectText = TTLocalizer.BoardcodePromotionLeader
|
||||||
|
|
|
@ -105,17 +105,17 @@ class DistributedBoardingPartyAI(DistributedObjectAI.DistributedObjectAI, Boardi
|
||||||
merger = False
|
merger = False
|
||||||
if invitee and invitee.battleId != 0:
|
if invitee and invitee.battleId != 0:
|
||||||
reason = BoardingPartyBase.BOARDCODE_BATTLE
|
reason = BoardingPartyBase.BOARDCODE_BATTLE
|
||||||
self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviteeId, reason, 0])
|
self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviteeId, reason])
|
||||||
self.sendUpdateToAvatarId(inviteeId, 'postMessageInvitationFailed', [inviterId])
|
self.sendUpdateToAvatarId(inviteeId, 'postMessageInvitationFailed', [inviterId])
|
||||||
return
|
return
|
||||||
if self.hasPendingInvite(inviteeId):
|
if self.hasPendingInvite(inviteeId):
|
||||||
reason = BoardingPartyBase.BOARDCODE_PENDING_INVITE
|
reason = BoardingPartyBase.BOARDCODE_PENDING_INVITE
|
||||||
self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviteeId, reason, 0])
|
self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviteeId, reason])
|
||||||
self.sendUpdateToAvatarId(inviteeId, 'postMessageInvitationFailed', [inviterId])
|
self.sendUpdateToAvatarId(inviteeId, 'postMessageInvitationFailed', [inviterId])
|
||||||
return
|
return
|
||||||
if self.__isInElevator(inviteeId):
|
if self.__isInElevator(inviteeId):
|
||||||
reason = BoardingPartyBase.BOARDCODE_IN_ELEVATOR
|
reason = BoardingPartyBase.BOARDCODE_IN_ELEVATOR
|
||||||
self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviteeId, reason, 0])
|
self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviteeId, reason])
|
||||||
self.sendUpdateToAvatarId(inviteeId, 'postMessageInvitationFailed', [inviterId])
|
self.sendUpdateToAvatarId(inviteeId, 'postMessageInvitationFailed', [inviterId])
|
||||||
return
|
return
|
||||||
if self.hasActiveGroup(inviteeId):
|
if self.hasActiveGroup(inviteeId):
|
||||||
|
@ -127,7 +127,7 @@ class DistributedBoardingPartyAI(DistributedObjectAI.DistributedObjectAI, Boardi
|
||||||
# group merge already requested?
|
# group merge already requested?
|
||||||
if self.hasPendingInvite(inviteeLeaderId):
|
if self.hasPendingInvite(inviteeLeaderId):
|
||||||
reason = BoardingPartyBase.BOARDCODE_PENDING_INVITE
|
reason = BoardingPartyBase.BOARDCODE_PENDING_INVITE
|
||||||
self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviteeId, reason, 0])
|
self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviteeId, reason])
|
||||||
self.sendUpdateToAvatarId(inviteeId, 'postMessageInvitationFailed', [inviterId])
|
self.sendUpdateToAvatarId(inviteeId, 'postMessageInvitationFailed', [inviterId])
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -137,13 +137,13 @@ class DistributedBoardingPartyAI(DistributedObjectAI.DistributedObjectAI, Boardi
|
||||||
inviteeId = inviteeLeaderId
|
inviteeId = inviteeLeaderId
|
||||||
merger = True
|
merger = True
|
||||||
else:
|
else:
|
||||||
reason = BoardingPartyBase.BOARDCODE_GROUPS_TO_LARGE
|
reason = BoardingPartyBase.BOARDCODE_GROUPS_TOO_LARGE
|
||||||
self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviteeId, reason, 0])
|
self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviteeId, reason])
|
||||||
self.sendUpdateToAvatarId(inviteeId, 'postMessageInvitationFailed', [inviterId])
|
self.sendUpdateToAvatarId(inviteeId, 'postMessageInvitationFailed', [inviterId])
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
reason = BoardingPartyBase.BOARDCODE_DIFF_GROUP
|
reason = BoardingPartyBase.BOARDCODE_DIFF_GROUP
|
||||||
self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviteeId, reason, 0])
|
self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviteeId, reason])
|
||||||
self.sendUpdateToAvatarId(inviteeId, 'postMessageInvitationFailed', [inviterId])
|
self.sendUpdateToAvatarId(inviteeId, 'postMessageInvitationFailed', [inviterId])
|
||||||
return
|
return
|
||||||
# Lets see what the invitee is currently doing
|
# 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..
|
# 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 len(self.elevatorIdList) == 1:
|
||||||
if inviteeOkay:
|
if inviteeOkay:
|
||||||
if inviteeOkay == REJECT_MINLAFF:
|
if inviteeOkay == REJECT_PROMOTION:
|
||||||
reason = BoardingPartyBase.BOARDCODE_MINLAFF
|
|
||||||
elif inviteeOkay == REJECT_PROMOTION:
|
|
||||||
reason = BoardingPartyBase.BOARDCODE_PROMOTION
|
reason = BoardingPartyBase.BOARDCODE_PROMOTION
|
||||||
self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviteeId, reason, self.elevatorIdList[0]])
|
self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviteeId, reason])
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
inviterOkay = self.checkBoard(inviterId, self.elevatorIdList[0])
|
inviterOkay = self.checkBoard(inviterId, self.elevatorIdList[0])
|
||||||
if inviterOkay:
|
if inviterOkay:
|
||||||
if inviterOkay == REJECT_MINLAFF:
|
if inviterOkay == REJECT_PROMOTION:
|
||||||
reason = BoardingPartyBase.BOARDCODE_MINLAFF
|
|
||||||
elif inviterOkay == REJECT_PROMOTION:
|
|
||||||
reason = BoardingPartyBase.BOARDCODE_PROMOTION
|
reason = BoardingPartyBase.BOARDCODE_PROMOTION
|
||||||
self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviterId, reason, self.elevatorIdList[0]])
|
self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviterId, reason])
|
||||||
return
|
return
|
||||||
# Is the inviter already in the avIdDict? It follows they either must be in a group or have a pending invite...
|
# 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:
|
if inviterId in self.avIdDict:
|
||||||
|
@ -277,8 +273,8 @@ class DistributedBoardingPartyAI(DistributedObjectAI.DistributedObjectAI, Boardi
|
||||||
return
|
return
|
||||||
# Lets make sure we still CAN merge them in
|
# Lets make sure we still CAN merge them in
|
||||||
if ((len(self.getGroupMemberList(leaderId)) + len(self.getGroupMemberList(inviteeId))) > self.maxSize):
|
if ((len(self.getGroupMemberList(leaderId)) + len(self.getGroupMemberList(inviteeId))) > self.maxSize):
|
||||||
reason = BoardingPartyBase.BOARDCODE_GROUPS_TO_LARGE
|
reason = BoardingPartyBase.BOARDCODE_GROUPS_TOO_LARGE
|
||||||
self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviteeId, reason, 0])
|
self.sendUpdateToAvatarId(inviterId, 'postInviteNotQualify', [inviteeId, reason])
|
||||||
self.sendUpdateToAvatarId(inviteeId, 'postMessageInvitationFailed', [inviterId])
|
self.sendUpdateToAvatarId(inviteeId, 'postMessageInvitationFailed', [inviterId])
|
||||||
return
|
return
|
||||||
group = self.groupListDict.get(leaderId)
|
group = self.groupListDict.get(leaderId)
|
||||||
|
@ -365,9 +361,7 @@ class DistributedBoardingPartyAI(DistributedObjectAI.DistributedObjectAI, Boardi
|
||||||
avatar = simbase.air.doId2do.get(avId)
|
avatar = simbase.air.doId2do.get(avId)
|
||||||
if avatar:
|
if avatar:
|
||||||
if elevator.checkBoard(avatar) != 0:
|
if elevator.checkBoard(avatar) != 0:
|
||||||
if elevator.checkBoard(avatar) == REJECT_MINLAFF:
|
if elevator.checkBoard(avatar) == REJECT_PROMOTION:
|
||||||
boardOkay = BoardingPartyBase.BOARDCODE_MINLAFF
|
|
||||||
elif elevator.checkBoard(avatar) == REJECT_PROMOTION:
|
|
||||||
boardOkay = BoardingPartyBase.BOARDCODE_PROMOTION
|
boardOkay = BoardingPartyBase.BOARDCODE_PROMOTION
|
||||||
avatarsFailingRequirements.append(avId)
|
avatarsFailingRequirements.append(avId)
|
||||||
elif avatar.battleId != 0:
|
elif avatar.battleId != 0:
|
||||||
|
@ -382,8 +376,6 @@ class DistributedBoardingPartyAI(DistributedObjectAI.DistributedObjectAI, Boardi
|
||||||
boardOkay = BoardingPartyBase.BOARDCODE_SPACE
|
boardOkay = BoardingPartyBase.BOARDCODE_SPACE
|
||||||
if boardOkay != BoardingPartyBase.BOARDCODE_OKAY:
|
if boardOkay != BoardingPartyBase.BOARDCODE_OKAY:
|
||||||
self.notify.debug('Something is wrong with the group board request')
|
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:
|
if boardOkay == BoardingPartyBase.BOARDCODE_PROMOTION:
|
||||||
self.notify.debug('An avatar did not meet the elevator promotion requirements')
|
self.notify.debug('An avatar did not meet the elevator promotion requirements')
|
||||||
elif boardOkay == BoardingPartyBase.BOARDCODE_BATTLE:
|
elif boardOkay == BoardingPartyBase.BOARDCODE_BATTLE:
|
||||||
|
|
|
@ -12,8 +12,8 @@ from toontown.suit import DistributedSellbotBossAI
|
||||||
|
|
||||||
class DistributedBossElevatorAI(DistributedElevatorExtAI.DistributedElevatorExtAI):
|
class DistributedBossElevatorAI(DistributedElevatorExtAI.DistributedElevatorExtAI):
|
||||||
|
|
||||||
def __init__(self, air, bldg, zone, antiShuffle = 0, minLaff = 0):
|
def __init__(self, air, bldg, zone, antiShuffle = 0):
|
||||||
DistributedElevatorExtAI.DistributedElevatorExtAI.__init__(self, air, bldg, numSeats=8, antiShuffle=antiShuffle, minLaff=minLaff)
|
DistributedElevatorExtAI.DistributedElevatorExtAI.__init__(self, air, bldg, numSeats=8, antiShuffle=antiShuffle)
|
||||||
self.zone = zone
|
self.zone = zone
|
||||||
self.type = ELEVATOR_VP
|
self.type = ELEVATOR_VP
|
||||||
self.countdownTime = ElevatorData[self.type]['countdown']
|
self.countdownTime = ElevatorData[self.type]['countdown']
|
||||||
|
@ -53,8 +53,6 @@ class DistributedBossElevatorAI(DistributedElevatorExtAI.DistributedElevatorExtA
|
||||||
|
|
||||||
def checkBoard(self, av):
|
def checkBoard(self, av):
|
||||||
dept = ToontownGlobals.cogHQZoneId2deptIndex(self.zone)
|
dept = ToontownGlobals.cogHQZoneId2deptIndex(self.zone)
|
||||||
if av.hp < self.minLaff:
|
|
||||||
return REJECT_MINLAFF
|
|
||||||
if not av.readyForPromotion(dept):
|
if not av.readyForPromotion(dept):
|
||||||
return REJECT_PROMOTION
|
return REJECT_PROMOTION
|
||||||
return 0
|
return 0
|
||||||
|
|
|
@ -3,7 +3,7 @@ import DistributedBossElevatorAI
|
||||||
|
|
||||||
class DistributedCFOElevatorAI(DistributedBossElevatorAI.DistributedBossElevatorAI):
|
class DistributedCFOElevatorAI(DistributedBossElevatorAI.DistributedBossElevatorAI):
|
||||||
|
|
||||||
def __init__(self, air, bldg, zone, antiShuffle = 0, minLaff = 0):
|
def __init__(self, air, bldg, zone, antiShuffle = 0):
|
||||||
DistributedBossElevatorAI.DistributedBossElevatorAI.__init__(self, air, bldg, zone, antiShuffle=antiShuffle, minLaff=minLaff)
|
DistributedBossElevatorAI.DistributedBossElevatorAI.__init__(self, air, bldg, zone, antiShuffle=antiShuffle)
|
||||||
self.type = ELEVATOR_CFO
|
self.type = ELEVATOR_CFO
|
||||||
self.countdownTime = ElevatorData[self.type]['countdown']
|
self.countdownTime = ElevatorData[self.type]['countdown']
|
||||||
|
|
|
@ -3,7 +3,7 @@ import DistributedBossElevatorAI
|
||||||
|
|
||||||
class DistributedCJElevatorAI(DistributedBossElevatorAI.DistributedBossElevatorAI):
|
class DistributedCJElevatorAI(DistributedBossElevatorAI.DistributedBossElevatorAI):
|
||||||
|
|
||||||
def __init__(self, air, bldg, zone, antiShuffle = 0, minLaff = 0):
|
def __init__(self, air, bldg, zone, antiShuffle = 0):
|
||||||
DistributedBossElevatorAI.DistributedBossElevatorAI.__init__(self, air, bldg, zone, antiShuffle=antiShuffle, minLaff=minLaff)
|
DistributedBossElevatorAI.DistributedBossElevatorAI.__init__(self, air, bldg, zone, antiShuffle=antiShuffle)
|
||||||
self.type = ELEVATOR_CJ
|
self.type = ELEVATOR_CJ
|
||||||
self.countdownTime = ElevatorData[self.type]['countdown']
|
self.countdownTime = ElevatorData[self.type]['countdown']
|
||||||
|
|
|
@ -41,8 +41,8 @@ class DistributedClubElevatorAI(DistributedElevatorFSMAI.DistributedElevatorFSMA
|
||||||
id = 0
|
id = 0
|
||||||
DoBlockedRoomCheck = simbase.config.GetBool('elevator-blocked-rooms-check', 1)
|
DoBlockedRoomCheck = simbase.config.GetBool('elevator-blocked-rooms-check', 1)
|
||||||
|
|
||||||
def __init__(self, air, lawOfficeId, bldg, avIds, markerId = None, numSeats = 4, antiShuffle = 0, minLaff = 0):
|
def __init__(self, air, lawOfficeId, bldg, avIds, markerId = None, numSeats = 4, antiShuffle = 0):
|
||||||
DistributedElevatorFSMAI.DistributedElevatorFSMAI.__init__(self, air, bldg, numSeats, antiShuffle = antiShuffle, minLaff = minLaff)
|
DistributedElevatorFSMAI.DistributedElevatorFSMAI.__init__(self, air, bldg, numSeats, antiShuffle = antiShuffle)
|
||||||
FSM.__init__(self, 'ElevatorFloor_%s_FSM' % self.id)
|
FSM.__init__(self, 'ElevatorFloor_%s_FSM' % self.id)
|
||||||
self.type = ElevatorConstants.ELEVATOR_COUNTRY_CLUB
|
self.type = ElevatorConstants.ELEVATOR_COUNTRY_CLUB
|
||||||
self.countdownTime = ElevatorConstants.ElevatorData[self.type]['countdown']
|
self.countdownTime = ElevatorConstants.ElevatorData[self.type]['countdown']
|
||||||
|
@ -291,8 +291,6 @@ class DistributedClubElevatorAI(DistributedElevatorFSMAI.DistributedElevatorFSMA
|
||||||
return self.latch
|
return self.latch
|
||||||
|
|
||||||
def checkBoard(self, av):
|
def checkBoard(self, av):
|
||||||
if av.hp < self.minLaff:
|
|
||||||
return ElevatorConstants.REJECT_MINLAFF
|
|
||||||
if self.DoBlockedRoomCheck and self.bldg:
|
if self.DoBlockedRoomCheck and self.bldg:
|
||||||
if hasattr(self.bldg, 'blockedRooms'):
|
if hasattr(self.bldg, 'blockedRooms'):
|
||||||
if self.bldg.blockedRooms:
|
if self.bldg.blockedRooms:
|
||||||
|
|
|
@ -344,8 +344,6 @@ class DistributedElevator(DistributedObject.DistributedObject):
|
||||||
if hasattr(base.localAvatar, 'elevatorNotifier'):
|
if hasattr(base.localAvatar, 'elevatorNotifier'):
|
||||||
if reason == REJECT_SHUFFLE:
|
if reason == REJECT_SHUFFLE:
|
||||||
base.localAvatar.elevatorNotifier.showMe(TTLocalizer.ElevatorHoppedOff)
|
base.localAvatar.elevatorNotifier.showMe(TTLocalizer.ElevatorHoppedOff)
|
||||||
elif reason == REJECT_MINLAFF:
|
|
||||||
base.localAvatar.elevatorNotifier.showMe(TTLocalizer.ElevatorMinLaff % self.minLaff)
|
|
||||||
elif reason == REJECT_PROMOTION:
|
elif reason == REJECT_PROMOTION:
|
||||||
base.localAvatar.elevatorNotifier.showMe(TTLocalizer.BossElevatorRejectMessage)
|
base.localAvatar.elevatorNotifier.showMe(TTLocalizer.BossElevatorRejectMessage)
|
||||||
doneStatus = {'where': 'reject'}
|
doneStatus = {'where': 'reject'}
|
||||||
|
@ -496,12 +494,6 @@ class DistributedElevator(DistributedObject.DistributedObject):
|
||||||
def getAntiShuffle(self):
|
def getAntiShuffle(self):
|
||||||
return self.antiShuffle
|
return self.antiShuffle
|
||||||
|
|
||||||
def setMinLaff(self, minLaff):
|
|
||||||
self.minLaff = minLaff
|
|
||||||
|
|
||||||
def getMinLaff(self):
|
|
||||||
return self.minLaff
|
|
||||||
|
|
||||||
def storeToonTrack(self, avId, track):
|
def storeToonTrack(self, avId, track):
|
||||||
self.clearToonTrack(avId)
|
self.clearToonTrack(avId)
|
||||||
self.__toonTracks[avId] = track
|
self.__toonTracks[avId] = track
|
||||||
|
|
|
@ -11,7 +11,7 @@ from direct.directnotify import DirectNotifyGlobal
|
||||||
class DistributedElevatorAI(DistributedObjectAI.DistributedObjectAI):
|
class DistributedElevatorAI(DistributedObjectAI.DistributedObjectAI):
|
||||||
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedElevatorAI')
|
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)
|
DistributedObjectAI.DistributedObjectAI.__init__(self, air)
|
||||||
self.type = ELEVATOR_NORMAL
|
self.type = ELEVATOR_NORMAL
|
||||||
self.countdownTime = ElevatorData[self.type]['countdown']
|
self.countdownTime = ElevatorData[self.type]['countdown']
|
||||||
|
@ -19,7 +19,6 @@ class DistributedElevatorAI(DistributedObjectAI.DistributedObjectAI):
|
||||||
self.bldgDoId = bldg.getDoId()
|
self.bldgDoId = bldg.getDoId()
|
||||||
self.seats = []
|
self.seats = []
|
||||||
self.setAntiShuffle(antiShuffle)
|
self.setAntiShuffle(antiShuffle)
|
||||||
self.setMinLaff(minLaff)
|
|
||||||
if self.antiShuffle:
|
if self.antiShuffle:
|
||||||
if not hasattr(simbase.air, 'elevatorTripId'):
|
if not hasattr(simbase.air, 'elevatorTripId'):
|
||||||
simbase.air.elevatorTripId = 1
|
simbase.air.elevatorTripId = 1
|
||||||
|
@ -145,11 +144,9 @@ class DistributedElevatorAI(DistributedObjectAI.DistributedObjectAI):
|
||||||
return self.fsm.getCurrentState().getName()
|
return self.fsm.getCurrentState().getName()
|
||||||
|
|
||||||
def avIsOKToBoard(self, av):
|
def avIsOKToBoard(self, av):
|
||||||
return av.hp > self.minLaff and self.accepting
|
return self.accepting
|
||||||
|
|
||||||
def checkBoard(self, av):
|
def checkBoard(self, av):
|
||||||
if av.hp < self.minLaff:
|
|
||||||
return REJECT_MINLAFF
|
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
def requestBoard(self, *args):
|
def requestBoard(self, *args):
|
||||||
|
@ -288,10 +285,4 @@ class DistributedElevatorAI(DistributedObjectAI.DistributedObjectAI):
|
||||||
self.antiShuffle = antiShuffle
|
self.antiShuffle = antiShuffle
|
||||||
|
|
||||||
def getAntiShuffle(self):
|
def getAntiShuffle(self):
|
||||||
return self.antiShuffle
|
return self.antiShuffle
|
||||||
|
|
||||||
def setMinLaff(self, minLaff):
|
|
||||||
self.minLaff = minLaff
|
|
||||||
|
|
||||||
def getMinLaff(self):
|
|
||||||
return self.minLaff
|
|
|
@ -11,8 +11,8 @@ from direct.directnotify import DirectNotifyGlobal
|
||||||
class DistributedElevatorExtAI(DistributedElevatorAI.DistributedElevatorAI):
|
class DistributedElevatorExtAI(DistributedElevatorAI.DistributedElevatorAI):
|
||||||
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedElevatorExtAI')
|
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedElevatorExtAI')
|
||||||
|
|
||||||
def __init__(self, air, bldg, numSeats = 4, antiShuffle = 0, minLaff = 0):
|
def __init__(self, air, bldg, numSeats = 4, antiShuffle = 0):
|
||||||
DistributedElevatorAI.DistributedElevatorAI.__init__(self, air, bldg, numSeats, antiShuffle=antiShuffle, minLaff=minLaff)
|
DistributedElevatorAI.DistributedElevatorAI.__init__(self, air, bldg, numSeats, antiShuffle=antiShuffle)
|
||||||
self.anyToonsBailed = 0
|
self.anyToonsBailed = 0
|
||||||
self.boardingParty = None
|
self.boardingParty = None
|
||||||
return
|
return
|
||||||
|
|
|
@ -316,8 +316,6 @@ class DistributedElevatorFSM(DistributedObject.DistributedObject, FSM):
|
||||||
if hasattr(base.localAvatar, 'elevatorNotifier'):
|
if hasattr(base.localAvatar, 'elevatorNotifier'):
|
||||||
if reason == REJECT_SHUFFLE:
|
if reason == REJECT_SHUFFLE:
|
||||||
base.localAvatar.elevatorNotifier.showMe(TTLocalizer.ElevatorHoppedOff)
|
base.localAvatar.elevatorNotifier.showMe(TTLocalizer.ElevatorHoppedOff)
|
||||||
elif reason == REJECT_MINLAFF:
|
|
||||||
base.localAvatar.elevatorNotifier.showMe(TTLocalizer.ElevatorMinLaff % self.minLaff)
|
|
||||||
elif reason == REJECT_PROMOTION:
|
elif reason == REJECT_PROMOTION:
|
||||||
base.localAvatar.elevatorNotifier.showMe(TTLocalizer.BossElevatorRejectMessage)
|
base.localAvatar.elevatorNotifier.showMe(TTLocalizer.BossElevatorRejectMessage)
|
||||||
elif reason == REJECT_BLOCKED_ROOM:
|
elif reason == REJECT_BLOCKED_ROOM:
|
||||||
|
@ -475,11 +473,5 @@ class DistributedElevatorFSM(DistributedObject.DistributedObject, FSM):
|
||||||
def getAntiShuffle(self):
|
def getAntiShuffle(self):
|
||||||
return self.antiShuffle
|
return self.antiShuffle
|
||||||
|
|
||||||
def setMinLaff(self, minLaff):
|
|
||||||
self.minLaff = minLaff
|
|
||||||
|
|
||||||
def getMinLaff(self):
|
|
||||||
return self.minLaff
|
|
||||||
|
|
||||||
def getDestName(self):
|
def getDestName(self):
|
||||||
return None
|
return None
|
||||||
|
|
|
@ -38,7 +38,7 @@ class DistributedElevatorFSMAI(DistributedObjectAI.DistributedObjectAI, FSM):
|
||||||
'Opening'] }
|
'Opening'] }
|
||||||
id = 0
|
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)
|
DistributedObjectAI.DistributedObjectAI.__init__(self, air)
|
||||||
FSM.__init__(self, 'Elevator_%s_FSM' % self.id)
|
FSM.__init__(self, 'Elevator_%s_FSM' % self.id)
|
||||||
self.type = ELEVATOR_NORMAL
|
self.type = ELEVATOR_NORMAL
|
||||||
|
@ -50,7 +50,6 @@ class DistributedElevatorFSMAI(DistributedObjectAI.DistributedObjectAI, FSM):
|
||||||
self.seats.append(None)
|
self.seats.append(None)
|
||||||
self.accepting = 0
|
self.accepting = 0
|
||||||
self.setAntiShuffle(antiShuffle)
|
self.setAntiShuffle(antiShuffle)
|
||||||
self.setMinLaff(minLaff)
|
|
||||||
if self.antiShuffle:
|
if self.antiShuffle:
|
||||||
if not hasattr(simbase.air, 'elevatorTripId'):
|
if not hasattr(simbase.air, 'elevatorTripId'):
|
||||||
simbase.air.elevatorTripId = 1
|
simbase.air.elevatorTripId = 1
|
||||||
|
@ -146,13 +145,9 @@ class DistributedElevatorFSMAI(DistributedObjectAI.DistributedObjectAI, FSM):
|
||||||
return self.state
|
return self.state
|
||||||
|
|
||||||
def avIsOKToBoard(self, av):
|
def avIsOKToBoard(self, av):
|
||||||
if av.hp > self.minLaff:
|
|
||||||
pass
|
|
||||||
return self.accepting
|
return self.accepting
|
||||||
|
|
||||||
def checkBoard(self, av):
|
def checkBoard(self, av):
|
||||||
if av.hp < self.minLaff:
|
|
||||||
return REJECT_MINLAFF
|
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
def requestBoard(self, *args):
|
def requestBoard(self, *args):
|
||||||
|
@ -274,10 +269,4 @@ class DistributedElevatorFSMAI(DistributedObjectAI.DistributedObjectAI, FSM):
|
||||||
self.antiShuffle = antiShuffle
|
self.antiShuffle = antiShuffle
|
||||||
|
|
||||||
def getAntiShuffle(self):
|
def getAntiShuffle(self):
|
||||||
return self.antiShuffle
|
return self.antiShuffle
|
||||||
|
|
||||||
def setMinLaff(self, minLaff):
|
|
||||||
self.minLaff = minLaff
|
|
||||||
|
|
||||||
def getMinLaff(self):
|
|
||||||
return self.minLaff
|
|
|
@ -40,8 +40,8 @@ class DistributedElevatorFloorAI(DistributedElevatorFSMAI.DistributedElevatorFSM
|
||||||
'Opening'] }
|
'Opening'] }
|
||||||
id = 0
|
id = 0
|
||||||
|
|
||||||
def __init__(self, air, lawOfficeId, bldg, avIds, markerId = None, numSeats = 4, antiShuffle = 0, minLaff = 0):
|
def __init__(self, air, lawOfficeId, bldg, avIds, markerId = None, numSeats = 4, antiShuffle = 0):
|
||||||
DistributedElevatorFSMAI.DistributedElevatorFSMAI.__init__(self, air, bldg, numSeats, antiShuffle = antiShuffle, minLaff = minLaff)
|
DistributedElevatorFSMAI.DistributedElevatorFSMAI.__init__(self, air, bldg, numSeats, antiShuffle = antiShuffle)
|
||||||
FSM.__init__(self, 'ElevatorFloor_%s_FSM' % self.id)
|
FSM.__init__(self, 'ElevatorFloor_%s_FSM' % self.id)
|
||||||
self.type = ELEVATOR_STAGE
|
self.type = ELEVATOR_STAGE
|
||||||
self.countdownTime = ElevatorData[self.type]['countdown']
|
self.countdownTime = ElevatorData[self.type]['countdown']
|
||||||
|
|
|
@ -3,7 +3,7 @@ import DistributedBossElevatorAI
|
||||||
|
|
||||||
class DistributedVPElevatorAI(DistributedBossElevatorAI.DistributedBossElevatorAI):
|
class DistributedVPElevatorAI(DistributedBossElevatorAI.DistributedBossElevatorAI):
|
||||||
|
|
||||||
def __init__(self, air, bldg, zone, antiShuffle = 0, minLaff = 0):
|
def __init__(self, air, bldg, zone, antiShuffle = 0):
|
||||||
DistributedBossElevatorAI.DistributedBossElevatorAI.__init__(self, air, bldg, zone, antiShuffle=antiShuffle, minLaff=minLaff)
|
DistributedBossElevatorAI.DistributedBossElevatorAI.__init__(self, air, bldg, zone, antiShuffle=antiShuffle)
|
||||||
self.type = ELEVATOR_VP
|
self.type = ELEVATOR_VP
|
||||||
self.countdownTime = ElevatorData[self.type]['countdown']
|
self.countdownTime = ElevatorData[self.type]['countdown']
|
||||||
|
|
|
@ -11,11 +11,10 @@ ELEVATOR_COUNTRY_CLUB = 8
|
||||||
ELEVATOR_FIELD = 9
|
ELEVATOR_FIELD = 9
|
||||||
REJECT_NOREASON = 0
|
REJECT_NOREASON = 0
|
||||||
REJECT_SHUFFLE = 1
|
REJECT_SHUFFLE = 1
|
||||||
REJECT_MINLAFF = 2
|
REJECT_NOSEAT = 2
|
||||||
REJECT_NOSEAT = 3
|
REJECT_PROMOTION = 3
|
||||||
REJECT_PROMOTION = 4
|
REJECT_BLOCKED_ROOM = 4
|
||||||
REJECT_BLOCKED_ROOM = 5
|
REJECT_BOARDINGPARTY = 5
|
||||||
REJECT_BOARDINGPARTY = 6
|
|
||||||
MAX_GROUP_BOARDING_TIME = 6.0
|
MAX_GROUP_BOARDING_TIME = 6.0
|
||||||
ElevatorData = {ELEVATOR_NORMAL: {'openTime': 2.0,
|
ElevatorData = {ELEVATOR_NORMAL: {'openTime': 2.0,
|
||||||
'closeTime': 2.0,
|
'closeTime': 2.0,
|
||||||
|
|
|
@ -355,8 +355,6 @@ class DistributedCogKart(DistributedElevatorExt.DistributedElevatorExt):
|
||||||
if hasattr(base.localAvatar, 'elevatorNotifier'):
|
if hasattr(base.localAvatar, 'elevatorNotifier'):
|
||||||
if reason == ElevatorConstants.REJECT_SHUFFLE:
|
if reason == ElevatorConstants.REJECT_SHUFFLE:
|
||||||
base.localAvatar.elevatorNotifier.showMe(TTLocalizer.ElevatorHoppedOff)
|
base.localAvatar.elevatorNotifier.showMe(TTLocalizer.ElevatorHoppedOff)
|
||||||
elif reason == ElevatorConstants.REJECT_MINLAFF:
|
|
||||||
base.localAvatar.elevatorNotifier.showMe(TTLocalizer.KartMinLaff % self.minLaff)
|
|
||||||
elif reason == ElevatorConstants.REJECT_PROMOTION:
|
elif reason == ElevatorConstants.REJECT_PROMOTION:
|
||||||
base.localAvatar.elevatorNotifier.showMe(TTLocalizer.BossElevatorRejectMessage)
|
base.localAvatar.elevatorNotifier.showMe(TTLocalizer.BossElevatorRejectMessage)
|
||||||
doneStatus = {'where': 'reject'}
|
doneStatus = {'where': 'reject'}
|
||||||
|
|
|
@ -8,9 +8,9 @@ from toontown.toonbase import ToontownGlobals
|
||||||
class DistributedCogKartAI(DistributedElevatorExtAI.DistributedElevatorExtAI):
|
class DistributedCogKartAI(DistributedElevatorExtAI.DistributedElevatorExtAI):
|
||||||
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCogKartAI')
|
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)
|
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.type = ElevatorConstants.ELEVATOR_COUNTRY_CLUB
|
||||||
self.courseIndex = index
|
self.courseIndex = index
|
||||||
if self.courseIndex == 0:
|
if self.courseIndex == 0:
|
||||||
|
|
|
@ -9,8 +9,8 @@ from direct.task import Task
|
||||||
|
|
||||||
class DistributedFactoryElevatorExtAI(DistributedElevatorExtAI.DistributedElevatorExtAI):
|
class DistributedFactoryElevatorExtAI(DistributedElevatorExtAI.DistributedElevatorExtAI):
|
||||||
|
|
||||||
def __init__(self, air, bldg, factoryId, entranceId, antiShuffle = 0, minLaff = 0):
|
def __init__(self, air, bldg, factoryId, entranceId, antiShuffle = 0):
|
||||||
DistributedElevatorExtAI.DistributedElevatorExtAI.__init__(self, air, bldg, antiShuffle=antiShuffle, minLaff=minLaff)
|
DistributedElevatorExtAI.DistributedElevatorExtAI.__init__(self, air, bldg, antiShuffle=antiShuffle)
|
||||||
self.factoryId = factoryId
|
self.factoryId = factoryId
|
||||||
self.entranceId = entranceId
|
self.entranceId = entranceId
|
||||||
|
|
||||||
|
|
|
@ -9,8 +9,8 @@ from toontown.toonbase import ToontownGlobals
|
||||||
|
|
||||||
|
|
||||||
class DistributedLawOfficeElevatorExtAI(DistributedElevatorExtAI.DistributedElevatorExtAI):
|
class DistributedLawOfficeElevatorExtAI(DistributedElevatorExtAI.DistributedElevatorExtAI):
|
||||||
def __init__(self, air, bldg, lawOfficeId, entranceId, antiShuffle = 0, minLaff = 0):
|
def __init__(self, air, bldg, lawOfficeId, entranceId, antiShuffle = 0):
|
||||||
DistributedElevatorExtAI.DistributedElevatorExtAI.__init__(self, air, bldg, antiShuffle = antiShuffle, minLaff = minLaff)
|
DistributedElevatorExtAI.DistributedElevatorExtAI.__init__(self, air, bldg, antiShuffle = antiShuffle)
|
||||||
self.lawOfficeId = lawOfficeId
|
self.lawOfficeId = lawOfficeId
|
||||||
self.entranceId = entranceId
|
self.entranceId = entranceId
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,8 @@ import CogDisguiseGlobals
|
||||||
|
|
||||||
class DistributedMintElevatorExtAI(DistributedElevatorExtAI.DistributedElevatorExtAI):
|
class DistributedMintElevatorExtAI(DistributedElevatorExtAI.DistributedElevatorExtAI):
|
||||||
|
|
||||||
def __init__(self, air, bldg, mintId, antiShuffle = 0, minLaff = 0):
|
def __init__(self, air, bldg, mintId, antiShuffle = 0):
|
||||||
DistributedElevatorExtAI.DistributedElevatorExtAI.__init__(self, air, bldg, antiShuffle=antiShuffle, minLaff=minLaff)
|
DistributedElevatorExtAI.DistributedElevatorExtAI.__init__(self, air, bldg, antiShuffle=antiShuffle)
|
||||||
self.mintId = mintId
|
self.mintId = mintId
|
||||||
self.cogDept = ToontownGlobals.cogHQZoneId2deptIndex(self.mintId)
|
self.cogDept = ToontownGlobals.cogHQZoneId2deptIndex(self.mintId)
|
||||||
self.type = ELEVATOR_MINT
|
self.type = ELEVATOR_MINT
|
||||||
|
|
|
@ -37,14 +37,13 @@ class BossbotHQAI(CogHQAI.CogHQAI):
|
||||||
(-48.44, 15.308, 0)
|
(-48.44, 15.308, 0)
|
||||||
)
|
)
|
||||||
hprList = ((110.815, 0, 0), (61.231, 0, 0), (-105.481, 0, 0))
|
hprList = ((110.815, 0, 0), (61.231, 0, 0), (-105.481, 0, 0))
|
||||||
mins = ToontownGlobals.FactoryLaffMinimums[3]
|
|
||||||
for cogCourse in xrange(len(posList)):
|
for cogCourse in xrange(len(posList)):
|
||||||
pos = posList[cogCourse]
|
pos = posList[cogCourse]
|
||||||
hpr = hprList[cogCourse]
|
hpr = hprList[cogCourse]
|
||||||
cogKart = DistributedCogKartAI.DistributedCogKartAI(
|
cogKart = DistributedCogKartAI.DistributedCogKartAI(
|
||||||
self.air, cogCourse,
|
self.air, cogCourse,
|
||||||
pos[0], pos[1], pos[2], hpr[0], hpr[1], hpr[2],
|
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)
|
cogKart.generateWithRequired(self.zoneId)
|
||||||
self.cogKarts.append(cogKart)
|
self.cogKarts.append(cogKart)
|
||||||
|
|
||||||
|
|
|
@ -37,11 +37,10 @@ class CashbotHQAI(CogHQAI.CogHQAI):
|
||||||
ToontownGlobals.CashbotMintIntB,
|
ToontownGlobals.CashbotMintIntB,
|
||||||
ToontownGlobals.CashbotMintIntC
|
ToontownGlobals.CashbotMintIntC
|
||||||
)
|
)
|
||||||
mins = ToontownGlobals.FactoryLaffMinimums[1]
|
|
||||||
for i in xrange(len(destZones)):
|
for i in xrange(len(destZones)):
|
||||||
mintElevator = DistributedMintElevatorExtAI(
|
mintElevator = DistributedMintElevatorExtAI(
|
||||||
self.air, self.air.mintMgr, destZones[i],
|
self.air, self.air.mintMgr, destZones[i],
|
||||||
antiShuffle=0, minLaff=mins[i])
|
antiShuffle=0)
|
||||||
mintElevator.generateWithRequired(self.zoneId)
|
mintElevator.generateWithRequired(self.zoneId)
|
||||||
self.mintElevators.append(mintElevator)
|
self.mintElevators.append(mintElevator)
|
||||||
|
|
||||||
|
|
|
@ -50,11 +50,10 @@ class LawbotHQAI(CogHQAI.CogHQAI):
|
||||||
ToontownGlobals.LawbotStageIntC,
|
ToontownGlobals.LawbotStageIntC,
|
||||||
ToontownGlobals.LawbotStageIntD
|
ToontownGlobals.LawbotStageIntD
|
||||||
)
|
)
|
||||||
mins = ToontownGlobals.FactoryLaffMinimums[2]
|
|
||||||
for i in xrange(len(destZones)):
|
for i in xrange(len(destZones)):
|
||||||
lawOfficeElevator = DistributedLawOfficeElevatorExtAI(
|
lawOfficeElevator = DistributedLawOfficeElevatorExtAI(
|
||||||
self.air, self.air.lawOfficeMgr, destZones[i], i,
|
self.air, self.air.lawOfficeMgr, destZones[i], i,
|
||||||
antiShuffle=0, minLaff=mins[i])
|
antiShuffle=0)
|
||||||
lawOfficeElevator.generateWithRequired(
|
lawOfficeElevator.generateWithRequired(
|
||||||
ToontownGlobals.LawbotOfficeExt)
|
ToontownGlobals.LawbotOfficeExt)
|
||||||
self.lawOfficeElevators.append(lawOfficeElevator)
|
self.lawOfficeElevators.append(lawOfficeElevator)
|
||||||
|
|
|
@ -3057,10 +3057,8 @@ ElevatorHopOff = 'Hop off'
|
||||||
ElevatorStayOff = "If you hop off, you'll need to wait\nfor the elevator to leave or empty."
|
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.'
|
ElevatorLeaderOff = 'Only your leader can decide when to hop off.'
|
||||||
ElevatorHoppedOff = 'You need to wait for the next elevator.'
|
ElevatorHoppedOff = 'You need to wait for the next elevator.'
|
||||||
ElevatorMinLaff = 'You need %s laff points to ride this elevator.'
|
|
||||||
ElevatorHopOK = 'Okay'
|
ElevatorHopOK = 'Okay'
|
||||||
ElevatorGroupMember = 'Only your group leader can\n decide when to board.'
|
ElevatorGroupMember = 'Only your group leader can\n decide when to board.'
|
||||||
KartMinLaff = 'You need %s laff points to ride this kart'
|
|
||||||
CogsIncExt = ', Inc.'
|
CogsIncExt = ', Inc.'
|
||||||
CogsIncModifier = '%s' + CogsIncExt
|
CogsIncModifier = '%s' + CogsIncExt
|
||||||
CogsInc = Cogs.upper() + CogsIncExt
|
CogsInc = Cogs.upper() + CogsIncExt
|
||||||
|
@ -8078,9 +8076,6 @@ QuitBoardingPartyLeader = 'Disband'
|
||||||
QuitBoardingPartyNonLeader = 'Leave'
|
QuitBoardingPartyNonLeader = 'Leave'
|
||||||
QuitBoardingPartyConfirm = 'Are you sure you want to quit this Boarding Group?'
|
QuitBoardingPartyConfirm = 'Are you sure you want to quit this Boarding Group?'
|
||||||
BoardcodeMissing = 'Something went wrong; try again later.'
|
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.'
|
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.'
|
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.'
|
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.'
|
BoardcodeBattleLeader = 'Your group cannot board because you are in battle.'
|
||||||
BoardcodeBattleNonLeaderSingular = 'Your group cannot board because %s is in battle.'
|
BoardcodeBattleNonLeaderSingular = 'Your group cannot board because %s is in battle.'
|
||||||
BoardcodeBattleNonLeaderPlural = 'Your group cannot board because %s are 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.'
|
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.'
|
BoardingInvitePromotionInvitee = '%s needs to earn a promotion before being a member of this Boarding Group.'
|
||||||
BoardingInviteeInDiffGroup = '%s is already in a different 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.'
|
BoardingInviteePendingIvite = '%s has a pending invite; try again later.'
|
||||||
BoardingInviteeInElevator = '%s is currently busy; try again later.'
|
BoardingInviteeInElevator = '%s is currently busy; try again later.'
|
||||||
BoardingInviteGroupFull = 'Your Boarding Group is already full.'
|
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.'
|
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.'
|
BoardingGroupAlreadyFull = 'You cannot accept this invitation because the group is already full.'
|
||||||
BoardingKickOutConfirm = 'Are you sure you want to remove %s?'
|
BoardingKickOutConfirm = 'Are you sure you want to remove %s?'
|
||||||
|
|
|
@ -1425,13 +1425,6 @@ ColorNoChat = (0.8,
|
||||||
0.5,
|
0.5,
|
||||||
0.1,
|
0.1,
|
||||||
1)
|
1)
|
||||||
FactoryLaffMinimums = [(0, 31, 0),
|
|
||||||
(0, 66, 71),
|
|
||||||
(0,
|
|
||||||
81,
|
|
||||||
86,
|
|
||||||
96),
|
|
||||||
(0, 101, 106)]
|
|
||||||
PICNIC_COUNTDOWN_TIME = 60
|
PICNIC_COUNTDOWN_TIME = 60
|
||||||
BossbotRTIntroStartPosHpr = (0,
|
BossbotRTIntroStartPosHpr = (0,
|
||||||
-64,
|
-64,
|
||||||
|
|
Loading…
Reference in a new issue