def startup(self): self.notify.info('Creating zone... Sellbot HQ') HoodDataAI.HoodDataAI.startup(self) mins = ToontownGlobals.FactoryLaffMinimums[0] self.testElev0 = DistributedFactoryElevatorExtAI.DistributedFactoryElevatorExtAI(self.air, self.air.factoryMgr, ToontownGlobals.SellbotFactoryInt, 0, antiShuffle=0, minLaff=mins[0]) self.testElev0.generateWithRequired(ToontownGlobals.SellbotFactoryExt) self.addDistObj(self.testElev0) self.testElev1 = DistributedFactoryElevatorExtAI.DistributedFactoryElevatorExtAI(self.air, self.air.factoryMgr, ToontownGlobals.SellbotFactoryInt, 1, antiShuffle=0, minLaff=mins[1]) self.testElev1.generateWithRequired(ToontownGlobals.SellbotFactoryExt) self.addDistObj(self.testElev1) self.swagElev = DistributedFactoryElevatorExtAI.DistributedFactoryElevatorExtAI(self.air, self.air.factoryMgr, ToontownGlobals.SellbotFactoryInt, 2, antiShuffle=0, minLaff=mins[0], isSwagtory=True) self.swagElev.generateWithRequired(ToontownGlobals.SellbotWestWing) self.addDistObj(self.testElev1) self.lobbyMgr = LobbyManagerAI.LobbyManagerAI(self.air, DistributedSellbotBossAI.DistributedSellbotBossAI) self.lobbyMgr.generateWithRequired(ToontownGlobals.SellbotLobby) self.addDistObj(self.lobbyMgr) self.lobbyElevator = DistributedBossElevatorAI.DistributedBossElevatorAI(self.air, self.lobbyMgr, ToontownGlobals.SellbotLobby, antiShuffle=1) self.lobbyElevator.generateWithRequired(ToontownGlobals.SellbotLobby) self.addDistObj(self.lobbyElevator) if simbase.config.GetBool('want-boarding-groups', 1): self.boardingParty = DistributedBoardingPartyAI.DistributedBoardingPartyAI(self.air, [self.lobbyElevator.doId], 8) self.boardingParty.generateWithRequired(ToontownGlobals.SellbotLobby) factoryIdList = [ self.testElev0.doId, self.testElev1.doId] if simbase.config.GetBool('want-boarding-groups', 1): self.factoryBoardingParty = DistributedBoardingPartyAI.DistributedBoardingPartyAI(self.air, factoryIdList, 4) self.factoryBoardingParty.generateWithRequired(ToontownGlobals.SellbotFactoryExt) destinationZone = ToontownGlobals.SellbotLobby extDoor0 = DistributedCogHQDoorAI.DistributedCogHQDoorAI(self.air, 0, DoorTypes.EXT_COGHQ, destinationZone, doorIndex=0) extDoor1 = DistributedCogHQDoorAI.DistributedCogHQDoorAI(self.air, 1, DoorTypes.EXT_COGHQ, destinationZone, doorIndex=1) extDoor2 = DistributedCogHQDoorAI.DistributedCogHQDoorAI(self.air, 2, DoorTypes.EXT_COGHQ, destinationZone, doorIndex=2) extDoor3 = DistributedCogHQDoorAI.DistributedCogHQDoorAI(self.air, 3, DoorTypes.EXT_COGHQ, destinationZone, doorIndex=3) extDoorList = [extDoor0, extDoor1, extDoor2, extDoor3] for sp in self.suitPlanners: if sp.zoneId == ToontownGlobals.SellbotHQ: sp.cogHQDoors = extDoorList intDoor0 = DistributedCogHQDoorAI.DistributedCogHQDoorAI(self.air, 0, DoorTypes.INT_COGHQ, ToontownGlobals.SellbotHQ, doorIndex=0) intDoor0.setOtherDoor(extDoor0) intDoor0.zoneId = ToontownGlobals.SellbotLobby for extDoor in extDoorList: extDoor.setOtherDoor(intDoor0) extDoor.zoneId = ToontownGlobals.SellbotHQ extDoor.generateWithRequired(ToontownGlobals.SellbotHQ) extDoor.sendUpdate('setDoorIndex', [extDoor.getDoorIndex()]) self.addDistObj(extDoor) intDoor0.generateWithRequired(ToontownGlobals.SellbotLobby) intDoor0.sendUpdate('setDoorIndex', [intDoor0.getDoorIndex()]) self.addDistObj(intDoor0) cogKart = DistributedSwagKartAI.DistributedSwagKartAI(self.air, 0, -93.84, -122.69, 0.32, 270, 0, 0, 0) cogKart.generateWithRequired(self.zoneId) if simbase.config.GetBool('want-suit-planners', 1): self.createPlanner(ToontownGlobals.SellbotHQ, extDoorList) self.createPlanner(ToontownGlobals.SellbotFactoryExt)
def startup(self): HoodDataAI.HoodDataAI.startup(self) self.lobbyMgr = LobbyManagerAI.LobbyManagerAI( self.air, DistributedBossbotBossAI.DistributedBossbotBossAI) self.lobbyMgr.generateWithRequired(ToontownGlobals.BossbotLobby) self.addDistObj(self.lobbyMgr) self.lobbyElevator = DistributedBBElevatorAI.DistributedBBElevatorAI( self.air, self.lobbyMgr, ToontownGlobals.BossbotLobby, antiShuffle=1) self.lobbyElevator.generateWithRequired(ToontownGlobals.BossbotLobby) self.addDistObj(self.lobbyElevator) if simbase.config.GetBool('want-boarding-groups', 1): self.boardingParty = DistributedBoardingPartyAI.DistributedBoardingPartyAI( self.air, [self.lobbyElevator.doId], 8) self.boardingParty.generateWithRequired( ToontownGlobals.BossbotLobby) def makeDoor(destinationZone, intDoorIndex, extDoorIndex, lock=0): intDoor = DistributedCogHQDoorAI.DistributedCogHQDoorAI( self.air, 0, DoorTypes.INT_COGHQ, self.canonicalHoodId, doorIndex=intDoorIndex, lockValue=lock) intDoor.zoneId = destinationZone extDoor = DistributedCogHQDoorAI.DistributedCogHQDoorAI( self.air, 0, DoorTypes.EXT_COGHQ, destinationZone, doorIndex=extDoorIndex, lockValue=lock) extDoor.setOtherDoor(intDoor) intDoor.setOtherDoor(extDoor) intDoor.generateWithRequired(destinationZone) intDoor.sendUpdate('setDoorIndex', [intDoor.getDoorIndex()]) self.addDistObj(intDoor) extDoor.generateWithRequired(self.canonicalHoodId) extDoor.sendUpdate('setDoorIndex', [extDoor.getDoorIndex()]) self.addDistObj(extDoor) makeDoor(ToontownGlobals.BossbotLobby, 0, 0, FADoorCodes.BB_DISGUISE_INCOMPLETE) kartIdList = self.createCogKarts() if simbase.config.GetBool('want-boarding-groups', 1): self.courseBoardingParty = DistributedBoardingPartyAI.DistributedBoardingPartyAI( self.air, kartIdList, 4) self.courseBoardingParty.generateWithRequired(self.zoneId) self.moleField = DistributedCourtyardMoleFieldAI.DistributedCourtyardMoleFieldAI( self.air) self.moleField.generateWithRequired(self.zoneId) self.moleField.restartGame()
def startup(self): HoodDataAI.HoodDataAI.startup(self) def makeOfficeElevator(index, antiShuffle=0, minLaff=0): destZone = (ToontownGlobals.LawbotStageIntA, ToontownGlobals.LawbotStageIntB, ToontownGlobals.LawbotStageIntC, ToontownGlobals.LawbotStageIntD)[index] elev = DistributedLawOfficeElevatorExtAI.DistributedLawOfficeElevatorExtAI(self.air, self.air.lawMgr, destZone, index, antiShuffle=0, minLaff=minLaff) elev.generateWithRequired(ToontownGlobals.LawbotOfficeExt) self.addDistObj(elev) return elev.doId mins = ToontownGlobals.FactoryLaffMinimums[2] officeId0 = makeOfficeElevator(0, 0, mins[0]) officeId1 = makeOfficeElevator(1, 0, mins[1]) officeId2 = makeOfficeElevator(2, 0, mins[2]) officeId3 = makeOfficeElevator(3, 0, mins[3]) self.lobbyMgr = LobbyManagerAI.LobbyManagerAI(self.air, DistributedLawbotBossAI.DistributedLawbotBossAI) self.lobbyMgr.generateWithRequired(ToontownGlobals.LawbotLobby) self.addDistObj(self.lobbyMgr) self.lobbyElevator = DistributedCJElevatorAI.DistributedCJElevatorAI(self.air, self.lobbyMgr, ToontownGlobals.LawbotLobby, antiShuffle=1) self.lobbyElevator.generateWithRequired(ToontownGlobals.LawbotLobby) self.addDistObj(self.lobbyElevator) if simbase.config.GetBool('want-boarding-groups', 1): self.boardingParty = DistributedBoardingPartyAI.DistributedBoardingPartyAI(self.air, [self.lobbyElevator.doId], 8) self.boardingParty.generateWithRequired(ToontownGlobals.LawbotLobby) def makeDoor(destinationZone, intDoorIndex, extDoorIndex, lock=0): intDoor = DistributedCogHQDoorAI.DistributedCogHQDoorAI(self.air, 0, DoorTypes.INT_COGHQ, self.canonicalHoodId, doorIndex=intDoorIndex, lockValue=lock) intDoor.zoneId = destinationZone extDoor = DistributedCogHQDoorAI.DistributedCogHQDoorAI(self.air, 0, DoorTypes.EXT_COGHQ, destinationZone, doorIndex=extDoorIndex, lockValue=lock) extDoor.setOtherDoor(intDoor) intDoor.setOtherDoor(extDoor) intDoor.generateWithRequired(destinationZone) intDoor.sendUpdate('setDoorIndex', [intDoor.getDoorIndex()]) self.addDistObj(intDoor) extDoor.generateWithRequired(self.canonicalHoodId) extDoor.sendUpdate('setDoorIndex', [extDoor.getDoorIndex()]) self.addDistObj(extDoor) makeDoor(ToontownGlobals.LawbotLobby, 0, 1, FADoorCodes.LB_DISGUISE_INCOMPLETE) makeDoor(ToontownGlobals.LawbotOfficeExt, 0, 0) officeIdList = [ officeId0, officeId1, officeId2, officeId3] if simbase.config.GetBool('want-boarding-parties', 1): self.officeBoardingParty = DistributedBoardingPartyAI.DistributedBoardingPartyAI(self.air, officeIdList, 4) self.officeBoardingParty.generateWithRequired(ToontownGlobals.LawbotOfficeExt)
def createSafeZone(self): self.lobbyMgr = LobbyManagerAI.LobbyManagerAI( self.air, DistributedLawbotBossAI.DistributedLawbotBossAI) self.lobbyMgr.generateWithRequired(ToontownGlobals.LawbotLobby) self.lobbyElevator = DistributedCJElevatorAI.DistributedCJElevatorAI( self.air, self.lobbyMgr, ToontownGlobals.LawbotLobby, antiShuffle=1) self.lobbyElevator.generateWithRequired(ToontownGlobals.LawbotLobby) if simbase.config.GetBool('want-boarding-groups', 1): self.boardingParty = DistributedBoardingPartyAI.DistributedBoardingPartyAI( self.air, [self.lobbyElevator.doId], 8) self.boardingParty.generateWithRequired( ToontownGlobals.LawbotLobby) destinationZone = ToontownGlobals.LawbotLobby extDoor0 = DistributedCogHQDoorAI.DistributedCogHQDoorAI( self.air, 0, DoorTypes.EXT_COGHQ, destinationZone, doorIndex=1, lockValue=FADoorCodes.CB_DISGUISE_INCOMPLETE) extDoorList = [extDoor0] intDoor0 = DistributedCogHQDoorAI.DistributedCogHQDoorAI( self.air, 0, DoorTypes.INT_COGHQ, ToontownGlobals.LawbotHQ, doorIndex=0) intDoor0.setOtherDoor(extDoor0) intDoor0.zoneId = ToontownGlobals.LawbotLobby for extDoor in extDoorList: extDoor.setOtherDoor(intDoor0) extDoor.zoneId = ToontownGlobals.LawbotHQ extDoor.generateWithRequired(ToontownGlobals.LawbotHQ) extDoor.sendUpdate('setDoorIndex', [extDoor.getDoorIndex()]) intDoor0.generateWithRequired(ToontownGlobals.LawbotLobby) intDoor0.sendUpdate('setDoorIndex', [intDoor0.getDoorIndex()])
def startup(self): HoodDataAI.HoodDataAI.startup(self) mins = ToontownGlobals.FactoryLaffMinimums[1] self.testElev0 = DistributedMintElevatorExtAI.DistributedMintElevatorExtAI(self.air, self.air.mintMgr, ToontownGlobals.CashbotMintIntA, antiShuffle=0, minLaff=mins[0]) self.testElev0.generateWithRequired(ToontownGlobals.CashbotHQ) self.addDistObj(self.testElev0) self.testElev1 = DistributedMintElevatorExtAI.DistributedMintElevatorExtAI(self.air, self.air.mintMgr, ToontownGlobals.CashbotMintIntB, antiShuffle=0, minLaff=mins[1]) self.testElev1.generateWithRequired(ToontownGlobals.CashbotHQ) self.addDistObj(self.testElev1) self.testElev2 = DistributedMintElevatorExtAI.DistributedMintElevatorExtAI(self.air, self.air.mintMgr, ToontownGlobals.CashbotMintIntC, antiShuffle=0, minLaff=mins[2]) self.testElev2.generateWithRequired(ToontownGlobals.CashbotHQ) self.addDistObj(self.testElev2) self.lobbyMgr = LobbyManagerAI.LobbyManagerAI(self.air, DistributedCashbotBossAI.DistributedCashbotBossAI) self.lobbyMgr.generateWithRequired(ToontownGlobals.CashbotLobby) self.addDistObj(self.lobbyMgr) self.lobbyElevator = DistributedCFOElevatorAI.DistributedCFOElevatorAI(self.air, self.lobbyMgr, ToontownGlobals.CashbotLobby, antiShuffle=1) self.lobbyElevator.generateWithRequired(ToontownGlobals.CashbotLobby) self.addDistObj(self.lobbyElevator) if simbase.config.GetBool('want-boarding-groups', 1): self.boardingParty = DistributedBoardingPartyAI.DistributedBoardingPartyAI(self.air, [self.lobbyElevator.doId], 8) self.boardingParty.generateWithRequired(ToontownGlobals.CashbotLobby) destinationZone = ToontownGlobals.CashbotLobby extDoor0 = DistributedCogHQDoorAI.DistributedCogHQDoorAI(self.air, 0, DoorTypes.EXT_COGHQ, destinationZone, doorIndex=0, lockValue=FADoorCodes.CB_DISGUISE_INCOMPLETE) extDoorList = [ extDoor0] intDoor0 = DistributedCogHQDoorAI.DistributedCogHQDoorAI(self.air, 0, DoorTypes.INT_COGHQ, ToontownGlobals.CashbotHQ, doorIndex=0) intDoor0.setOtherDoor(extDoor0) intDoor0.zoneId = ToontownGlobals.CashbotLobby mintIdList = [ self.testElev0.doId, self.testElev1.doId, self.testElev2.doId] if simbase.config.GetBool('want-boarding-groups', 1): self.mintBoardingParty = DistributedBoardingPartyAI.DistributedBoardingPartyAI(self.air, mintIdList, 4) self.mintBoardingParty.generateWithRequired(self.zoneId) for extDoor in extDoorList: extDoor.setOtherDoor(intDoor0) extDoor.zoneId = ToontownGlobals.CashbotHQ extDoor.generateWithRequired(ToontownGlobals.CashbotHQ) extDoor.sendUpdate('setDoorIndex', [extDoor.getDoorIndex()]) self.addDistObj(extDoor) intDoor0.generateWithRequired(ToontownGlobals.CashbotLobby) intDoor0.sendUpdate('setDoorIndex', [intDoor0.getDoorIndex()]) self.addDistObj(intDoor0)
def startup(self): self.notify.info('Creating zone... Bossbot HQ') HoodDataAI.HoodDataAI.startup(self) def makeOfficeElevator(index, antiShuffle=0, minLaff=0): destZone = (ToontownGlobals.LawbotStageIntA, ToontownGlobals.LawbotStageIntB, ToontownGlobals.LawbotStageIntC, ToontownGlobals.LawbotStageIntD)[index] elev = DistributedLawOfficeElevatorExtAI.DistributedLawOfficeElevatorExtAI(self.air, self.air.lawMgr, destZone, index, antiShuffle=0, minLaff=minLaff) elev.generateWithRequired(ToontownGlobals.LawbotOfficeExt) self.addDistObj(elev) self.lobbyMgr = LobbyManagerAI.LobbyManagerAI(self.air, DistributedBossbotBossAI.DistributedBossbotBossAI) self.lobbyMgr.generateWithRequired(ToontownGlobals.BossbotLobby) self.addDistObj(self.lobbyMgr) self.lobbyElevator = DistributedBBElevatorAI.DistributedBBElevatorAI(self.air, self.lobbyMgr, ToontownGlobals.BossbotLobby, antiShuffle=1) self.lobbyElevator.generateWithRequired(ToontownGlobals.BossbotLobby) self.addDistObj(self.lobbyElevator) if simbase.config.GetBool('want-boarding-groups', 1): self.boardingParty = DistributedBoardingPartyAI.DistributedBoardingPartyAI(self.air, [self.lobbyElevator.doId], 8) self.boardingParty.generateWithRequired(ToontownGlobals.BossbotLobby) def makeDoor(destinationZone, intDoorIndex, extDoorIndex, zoneId, lock=0): intDoor = DistributedCogHQDoorAI.DistributedCogHQDoorAI(self.air, 0, DoorTypes.INT_COGHQ, zoneId, doorIndex=intDoorIndex, lockValue=lock) intDoor.zoneId = destinationZone extDoor = DistributedCogHQDoorAI.DistributedCogHQDoorAI(self.air, 0, DoorTypes.EXT_COGHQ, destinationZone, doorIndex=extDoorIndex, lockValue=lock) extDoor.setOtherDoor(intDoor) intDoor.setOtherDoor(extDoor) intDoor.generateWithRequired(destinationZone) intDoor.sendUpdate('setDoorIndex', [intDoor.getDoorIndex()]) self.addDistObj(intDoor) extDoor.generateWithRequired(zoneId) extDoor.sendUpdate('setDoorIndex', [extDoor.getDoorIndex()]) self.addDistObj(extDoor) return extDoor makeDoor(ToontownGlobals.BossbotLobby, 0, 0, ToontownGlobals.BossbotHQ, FADoorCodes.BB_DISGUISE_INCOMPLETE) kartIdList = self.createCogKarts() if simbase.config.GetBool('want-boarding-groups', 1): self.courseBoardingParty = DistributedBoardingPartyAI.DistributedBoardingPartyAI(self.air, kartIdList, 4) self.courseBoardingParty.generateWithRequired(self.zoneId)
def createSafeZone(self): self.lobbyMgr = LobbyManagerAI.LobbyManagerAI(self.air, DistributedCashbotBossAI.DistributedCashbotBossAI) self.lobbyMgr.generateWithRequired(ToontownGlobals.CashbotLobby) self.lobbyElevator = DistributedCFOElevatorAI.DistributedCFOElevatorAI(self.air, self.lobbyMgr, ToontownGlobals.CashbotLobby, antiShuffle=1) self.lobbyElevator.generateWithRequired(ToontownGlobals.CashbotLobby) if simbase.config.GetBool('want-boarding-groups', 1): self.boardingParty = DistributedBoardingPartyAI.DistributedBoardingPartyAI(self.air, [self.lobbyElevator.doId], 8) self.boardingParty.generateWithRequired(ToontownGlobals.CashbotLobby) destinationZone = ToontownGlobals.CashbotLobby extDoor0 = DistributedCogHQDoorAI.DistributedCogHQDoorAI(self.air, 0, DoorTypes.EXT_COGHQ, destinationZone, doorIndex=0, lockValue=FADoorCodes.CB_DISGUISE_INCOMPLETE) extDoorList = [extDoor0] intDoor0 = DistributedCogHQDoorAI.DistributedCogHQDoorAI(self.air, 0, DoorTypes.INT_COGHQ, ToontownGlobals.CashbotHQ, doorIndex=0) intDoor0.setOtherDoor(extDoor0) intDoor0.zoneId = ToontownGlobals.CashbotLobby for extDoor in extDoorList: extDoor.setOtherDoor(intDoor0) extDoor.zoneId = ToontownGlobals.CashbotHQ extDoor.generateWithRequired(ToontownGlobals.CashbotHQ) extDoor.sendUpdate('setDoorIndex', [extDoor.getDoorIndex()]) intDoor0.generateWithRequired(ToontownGlobals.CashbotLobby) intDoor0.sendUpdate('setDoorIndex', [intDoor0.getDoorIndex()]) # Create mints mintTypes = [ ToontownGlobals.CashbotMintIntA, ToontownGlobals.CashbotMintIntB, ToontownGlobals.CashbotMintIntC, ] mins = ToontownGlobals.FactoryLaffMinimums[1] self.elevators = [] for index, mintType in enumerate(mintTypes): elevator = DistributedMintElevatorExtAI(self.air, self.air.mintMgr, mintType, antiShuffle=0, minLaff=mins[index]) elevator.generateWithRequired(self.HOOD) self.elevators.append(elevator)
def startup(self): """Start the BossbotHQ zone.""" HoodDataAI.HoodDataAI.startup(self) # TODO: define these in a more modular way def makeOfficeElevator(index, antiShuffle=0, minLaff=0): destZone = ( ToontownGlobals.LawbotStageIntA, ToontownGlobals.LawbotStageIntB, ToontownGlobals.LawbotStageIntC, ToontownGlobals.LawbotStageIntD, )[index] elev = DistributedLawOfficeElevatorExtAI.DistributedLawOfficeElevatorExtAI( self.air, self.air.lawMgr, destZone, index, antiShuffle=0, minLaff=minLaff) #antiShufflePOI elev.generateWithRequired(ToontownGlobals.LawbotOfficeExt) self.addDistObj(elev) # Lobby elevator self.lobbyMgr = LobbyManagerAI.LobbyManagerAI( self.air, DistributedBossbotBossAI.DistributedBossbotBossAI) self.lobbyMgr.generateWithRequired(ToontownGlobals.BossbotLobby) self.addDistObj(self.lobbyMgr) self.lobbyElevator = DistributedBBElevatorAI.DistributedBBElevatorAI( self.air, self.lobbyMgr, ToontownGlobals.BossbotLobby, antiShuffle=1) # antiShufflePOI self.lobbyElevator.generateWithRequired(ToontownGlobals.BossbotLobby) self.addDistObj(self.lobbyElevator) if simbase.config.GetBool('want-boarding-groups', 1): self.boardingParty = DistributedBoardingPartyAI.DistributedBoardingPartyAI( self.air, [self.lobbyElevator.doId], 8) self.boardingParty.generateWithRequired( ToontownGlobals.BossbotLobby) #self.addDistObj(self.boardingParty) def makeDoor(destinationZone, intDoorIndex, extDoorIndex, lock=0): #set up both doors intDoor = DistributedCogHQDoorAI.DistributedCogHQDoorAI( self.air, 0, DoorTypes.INT_COGHQ, self.canonicalHoodId, doorIndex=intDoorIndex, lockValue=lock) intDoor.zoneId = destinationZone extDoor = DistributedCogHQDoorAI.DistributedCogHQDoorAI( self.air, 0, DoorTypes.EXT_COGHQ, destinationZone, doorIndex=extDoorIndex, lockValue=lock) #point them to each other extDoor.setOtherDoor(intDoor) intDoor.setOtherDoor(extDoor) #generate them intDoor.generateWithRequired(destinationZone) intDoor.sendUpdate("setDoorIndex", [intDoor.getDoorIndex()]) self.addDistObj(intDoor) extDoor.generateWithRequired(self.canonicalHoodId) extDoor.sendUpdate("setDoorIndex", [extDoor.getDoorIndex()]) self.addDistObj(extDoor) # CogHQ Main building -> Lobby doors makeDoor(ToontownGlobals.BossbotLobby, 0, 0, FADoorCodes.BB_DISGUISE_INCOMPLETE) # Plaza -> Office #makeDoor(ToontownGlobals.LawbotOfficeExt, 0, 0) kartIdList = self.createCogKarts() if simbase.config.GetBool('want-boarding-groups', 1): self.courseBoardingParty = DistributedBoardingPartyAI.DistributedBoardingPartyAI( self.air, kartIdList, 4) self.courseBoardingParty.generateWithRequired(self.zoneId)
def createLobbyManager(self): self.lobbyMgr = LobbyManagerAI.LobbyManagerAI(self.air, self.bossCtor) self.lobbyMgr.generateWithRequired(self.lobbyZoneId)
def startup(self): self.lobbyMgr = LobbyManagerAI.LobbyManagerAI( self.air, DistributedSellbotBossAI.DistributedSellbotBossAI) self.lobbyMgr.generateWithRequired(ToontownGlobals.SellbotLobby) self.lobbyElevator = DistributedVPElevatorAI.DistributedVPElevatorAI( self.air, self.lobbyMgr, ToontownGlobals.SellbotLobby, antiShuffle=1) self.lobbyElevator.generateWithRequired(ToontownGlobals.SellbotLobby) if simbase.config.GetBool('want-boarding-groups', 1): self.boardingParty = DistributedBoardingPartyAI.DistributedBoardingPartyAI( self.air, [self.lobbyElevator.doId], 8) self.boardingParty.generateWithRequired( ToontownGlobals.SellbotLobby) destinationZone = ToontownGlobals.SellbotLobby extDoor0 = DistributedCogHQDoorAI.DistributedCogHQDoorAI( self.air, 0, DoorTypes.EXT_COGHQ, destinationZone, doorIndex=0, lockValue=FADoorCodes.CB_DISGUISE_INCOMPLETE) extDoor1 = DistributedCogHQDoorAI.DistributedCogHQDoorAI( self.air, 0, DoorTypes.EXT_COGHQ, destinationZone, doorIndex=1, lockValue=FADoorCodes.CB_DISGUISE_INCOMPLETE) extDoor2 = DistributedCogHQDoorAI.DistributedCogHQDoorAI( self.air, 0, DoorTypes.EXT_COGHQ, destinationZone, doorIndex=2, lockValue=FADoorCodes.CB_DISGUISE_INCOMPLETE) extDoor3 = DistributedCogHQDoorAI.DistributedCogHQDoorAI( self.air, 0, DoorTypes.EXT_COGHQ, destinationZone, doorIndex=3, lockValue=FADoorCodes.CB_DISGUISE_INCOMPLETE) extDoorList = [extDoor0, extDoor1, extDoor2, extDoor3] intDoor0 = DistributedCogHQDoorAI.DistributedCogHQDoorAI( self.air, 0, DoorTypes.INT_COGHQ, ToontownGlobals.SellbotHQ, doorIndex=0) intDoor0.setOtherDoor(extDoor0) intDoor0.zoneId = ToontownGlobals.SellbotLobby for extDoor in extDoorList: extDoor.setOtherDoor(intDoor0) extDoor.zoneId = ToontownGlobals.SellbotHQ extDoor.generateWithRequired(ToontownGlobals.SellbotHQ) extDoor.sendUpdate('setDoorIndex', [extDoor.getDoorIndex()]) intDoor0.generateWithRequired(ToontownGlobals.SellbotLobby) intDoor0.sendUpdate('setDoorIndex', [intDoor0.getDoorIndex()]) mins = ToontownGlobals.FactoryLaffMinimums[0] self.factoryFrontElevator = DistributedFactoryElevatorExtAI( self.air, self.air.factoryMgr, ToontownGlobals.SellbotFactoryInt, 0, antiShuffle=0, minLaff=mins[0]) self.factoryFrontElevator.generateWithRequired( ToontownGlobals.SellbotFactoryExt) self.factorySideElevator = DistributedFactoryElevatorExtAI( self.air, self.air.factoryMgr, ToontownGlobals.SellbotFactoryInt, 1, antiShuffle=0, minLaff=mins[1]) self.factorySideElevator.generateWithRequired( ToontownGlobals.SellbotFactoryExt) factoryIdList = [ self.factoryFrontElevator.doId, self.factorySideElevator.doId ] if simbase.config.GetBool('want-boarding-groups', 1): self.factoryBoardingParty = DistributedBoardingPartyAI.DistributedBoardingPartyAI( self.air, factoryIdList, 4) self.factoryBoardingParty.generateWithRequired( ToontownGlobals.SellbotFactoryExt) self.createPlanner(ToontownGlobals.SellbotHQ, extDoorList) self.createPlanner(ToontownGlobals.SellbotFactoryExt, extDoorList)
def startup(self): HoodDataAI.HoodDataAI.startup(self) mins = ToontownGlobals.FactoryLaffMinimums[1] # TODO: define these in a more modular way self.testElev0 = DistributedMintElevatorExtAI.DistributedMintElevatorExtAI( self.air, self.air.mintMgr, ToontownGlobals.CashbotMintIntA, antiShuffle=0, minLaff=mins[0]) # antiShufflePOI self.testElev0.generateWithRequired(ToontownGlobals.CashbotHQ) self.addDistObj(self.testElev0) self.testElev1 = DistributedMintElevatorExtAI.DistributedMintElevatorExtAI( self.air, self.air.mintMgr, ToontownGlobals.CashbotMintIntB, antiShuffle=0, minLaff=mins[1]) # antiShufflePOI self.testElev1.generateWithRequired(ToontownGlobals.CashbotHQ) self.addDistObj(self.testElev1) self.testElev2 = DistributedMintElevatorExtAI.DistributedMintElevatorExtAI( self.air, self.air.mintMgr, ToontownGlobals.CashbotMintIntC, antiShuffle=0, minLaff=mins[2]) # antiShufflePOI self.testElev2.generateWithRequired(ToontownGlobals.CashbotHQ) self.addDistObj(self.testElev2) # Lobby elevator self.lobbyMgr = LobbyManagerAI.LobbyManagerAI( self.air, DistributedCashbotBossAI.DistributedCashbotBossAI) self.lobbyMgr.generateWithRequired(ToontownGlobals.CashbotLobby) self.addDistObj(self.lobbyMgr) self.lobbyElevator = DistributedCFOElevatorAI.DistributedCFOElevatorAI( self.air, self.lobbyMgr, ToontownGlobals.CashbotLobby, antiShuffle=1) #antiShufflePOI self.lobbyElevator.generateWithRequired(ToontownGlobals.CashbotLobby) self.addDistObj(self.lobbyElevator) if simbase.config.GetBool('want-boarding-groups', 1): self.boardingParty = DistributedBoardingPartyAI.DistributedBoardingPartyAI( self.air, [self.lobbyElevator.doId], 8) self.boardingParty.generateWithRequired( ToontownGlobals.CashbotLobby) # CogHQ Main building -> Lobby doors destinationZone = ToontownGlobals.CashbotLobby extDoor0 = DistributedCogHQDoorAI.DistributedCogHQDoorAI( self.air, 0, DoorTypes.EXT_COGHQ, destinationZone, doorIndex=0, lockValue=FADoorCodes.CB_DISGUISE_INCOMPLETE) extDoorList = [extDoor0] # Inside doors intDoor0 = DistributedCogHQDoorAI.DistributedCogHQDoorAI( self.air, 0, DoorTypes.INT_COGHQ, ToontownGlobals.CashbotHQ, doorIndex=0) intDoor0.setOtherDoor(extDoor0) intDoor0.zoneId = ToontownGlobals.CashbotLobby mintIdList = [ self.testElev0.doId, self.testElev1.doId, self.testElev2.doId ] if simbase.config.GetBool('want-boarding-groups', 1): self.mintBoardingParty = DistributedBoardingPartyAI.DistributedBoardingPartyAI( self.air, mintIdList, 4) self.mintBoardingParty.generateWithRequired(self.zoneId) # Setup the doors and generate them for extDoor in extDoorList: # Tell them about each other extDoor.setOtherDoor(intDoor0) # Put them in the right zones extDoor.zoneId = ToontownGlobals.CashbotHQ # Now that they both now about each other, generate them: extDoor.generateWithRequired(ToontownGlobals.CashbotHQ) extDoor.sendUpdate("setDoorIndex", [extDoor.getDoorIndex()]) self.addDistObj(extDoor) intDoor0.generateWithRequired(ToontownGlobals.CashbotLobby) intDoor0.sendUpdate("setDoorIndex", [intDoor0.getDoorIndex()]) self.addDistObj(intDoor0)
def startup(self): HoodDataAI.HoodDataAI.startup(self) mins = ToontownGlobals.FactoryLaffMinimums[0] # TODO: define these in a more modular way self.testElev0 = DistributedFactoryElevatorExtAI.DistributedFactoryElevatorExtAI( self.air, self.air.factoryMgr, ToontownGlobals.SellbotFactoryInt, 0, antiShuffle=0, minLaff=mins[0]) # antiShufflePOI self.testElev0.generateWithRequired(ToontownGlobals.SellbotFactoryExt) self.addDistObj(self.testElev0) self.testElev1 = DistributedFactoryElevatorExtAI.DistributedFactoryElevatorExtAI( self.air, self.air.factoryMgr, ToontownGlobals.SellbotFactoryInt, 1, antiShuffle=0, minLaff=mins[1]) # antiShufflePOI self.testElev1.generateWithRequired(ToontownGlobals.SellbotFactoryExt) self.addDistObj(self.testElev1) # Lobby elevator self.lobbyMgr = LobbyManagerAI.LobbyManagerAI( self.air, DistributedSellbotBossAI.DistributedSellbotBossAI) self.lobbyMgr.generateWithRequired(ToontownGlobals.SellbotLobby) self.addDistObj(self.lobbyMgr) self.lobbyElevator = DistributedBossElevatorAI.DistributedBossElevatorAI( self.air, self.lobbyMgr, ToontownGlobals.SellbotLobby, antiShuffle=1) #antiShufflePOI self.lobbyElevator.generateWithRequired(ToontownGlobals.SellbotLobby) self.addDistObj(self.lobbyElevator) if simbase.config.GetBool('want-boarding-groups', 1): self.boardingParty = DistributedBoardingPartyAI.DistributedBoardingPartyAI( self.air, [self.lobbyElevator.doId], 8) self.boardingParty.generateWithRequired( ToontownGlobals.SellbotLobby) factoryIdList = [self.testElev0.doId, self.testElev1.doId] if simbase.config.GetBool('want-boarding-groups', 1): self.factoryBoardingParty = DistributedBoardingPartyAI.DistributedBoardingPartyAI( self.air, factoryIdList, 4) self.factoryBoardingParty.generateWithRequired( ToontownGlobals.SellbotFactoryExt) # CogHQ Main building -> Lobby doors destinationZone = ToontownGlobals.SellbotLobby extDoor0 = DistributedCogHQDoorAI.DistributedCogHQDoorAI( self.air, 0, DoorTypes.EXT_COGHQ, destinationZone, doorIndex=0) extDoor1 = DistributedCogHQDoorAI.DistributedCogHQDoorAI( self.air, 1, DoorTypes.EXT_COGHQ, destinationZone, doorIndex=1) extDoor2 = DistributedCogHQDoorAI.DistributedCogHQDoorAI( self.air, 2, DoorTypes.EXT_COGHQ, destinationZone, doorIndex=2) extDoor3 = DistributedCogHQDoorAI.DistributedCogHQDoorAI( self.air, 3, DoorTypes.EXT_COGHQ, destinationZone, doorIndex=3) extDoorList = [extDoor0, extDoor1, extDoor2, extDoor3] # Store the lobby door list with the suit planner, so the # suits can open the doors as they walk through them. for sp in self.suitPlanners: if sp.zoneId == ToontownGlobals.SellbotHQ: sp.cogHQDoors = extDoorList # Inside doors intDoor0 = DistributedCogHQDoorAI.DistributedCogHQDoorAI( self.air, 0, DoorTypes.INT_COGHQ, ToontownGlobals.SellbotHQ, doorIndex=0) intDoor0.setOtherDoor(extDoor0) intDoor0.zoneId = ToontownGlobals.SellbotLobby # Setup the doors and generate them for extDoor in extDoorList: # Tell them about each other extDoor.setOtherDoor(intDoor0) # Put them in the right zones extDoor.zoneId = ToontownGlobals.SellbotHQ # Now that they both now about each other, generate them: extDoor.generateWithRequired(ToontownGlobals.SellbotHQ) extDoor.sendUpdate("setDoorIndex", [extDoor.getDoorIndex()]) self.addDistObj(extDoor) intDoor0.generateWithRequired(ToontownGlobals.SellbotLobby) intDoor0.sendUpdate("setDoorIndex", [intDoor0.getDoorIndex()]) self.addDistObj(intDoor0)
def startup(self): self.notify.info('Creating zone... Cashbot HQ') HoodDataAI.HoodDataAI.startup(self) mins = ToontownGlobals.FactoryLaffMinimums[1] self.testElev0 = DistributedMintElevatorExtAI.DistributedMintElevatorExtAI( self.air, self.air.mintMgr, ToontownGlobals.CashbotMintIntA, self.zoneId, antiShuffle=0, minLaff=mins[0]) self.testElev0.generateWithRequired(ToontownGlobals.CashbotHQ) self.addDistObj(self.testElev0) self.testElev1 = DistributedMintElevatorExtAI.DistributedMintElevatorExtAI( self.air, self.air.mintMgr, ToontownGlobals.CashbotMintIntB, self.zoneId, antiShuffle=0, minLaff=mins[1]) self.testElev1.generateWithRequired(ToontownGlobals.CashbotHQ) self.addDistObj(self.testElev1) self.testElev2 = DistributedMintElevatorExtAI.DistributedMintElevatorExtAI( self.air, self.air.mintMgr, ToontownGlobals.CashbotMintIntC, self.zoneId, antiShuffle=0, minLaff=mins[2]) self.testElev2.generateWithRequired(ToontownGlobals.CashbotHQ) self.addDistObj(self.testElev2) self.lobbyMgr = LobbyManagerAI.LobbyManagerAI( self.air, DistributedCashbotBossAI.DistributedCashbotBossAI) self.lobbyMgr.generateWithRequired(ToontownGlobals.CashbotLobby) self.addDistObj(self.lobbyMgr) self.lobbyElevator = DistributedCFOElevatorAI.DistributedCFOElevatorAI( self.air, self.lobbyMgr, ToontownGlobals.CashbotLobby, antiShuffle=1) self.lobbyElevator.generateWithRequired(ToontownGlobals.CashbotLobby) self.addDistObj(self.lobbyElevator) if simbase.config.GetBool('want-boarding-groups', 1): self.boardingParty = DistributedBoardingPartyAI.DistributedBoardingPartyAI( self.air, [self.lobbyElevator.doId], 8) self.boardingParty.generateWithRequired( ToontownGlobals.CashbotLobby) if simbase.config.GetBool('want-suit-planners', 1): sp = DistributedSuitPlannerAI.DistributedSuitPlannerAI( self.air, ToontownGlobals.CashbotHQ) sp.generateWithRequired(ToontownGlobals.CashbotHQ) sp.d_setZoneId(ToontownGlobals.CashbotHQ) sp.initTasks() self.air.suitPlanners[ToontownGlobals.CashbotHQ] = sp self.notify.debug('Created new SuitPlanner at %s' % self.zoneId) destinationZone = ToontownGlobals.CashbotLobby extDoor0 = DistributedCogHQDoorAI.DistributedCogHQDoorAI( self.air, 0, DoorTypes.EXT_COGHQ, destinationZone, doorIndex=0, lockValue=FADoorCodes.CB_DISGUISE_INCOMPLETE) extDoorList = [extDoor0] intDoor0 = DistributedCogHQDoorAI.DistributedCogHQDoorAI( self.air, 0, DoorTypes.INT_COGHQ, ToontownGlobals.CashbotHQ, doorIndex=0) intDoor0.setOtherDoor(extDoor0) intDoor0.zoneId = ToontownGlobals.CashbotLobby episodeElevator = DistributedShortChangeElevatorAI.DistributedShortChangeElevatorAI( self.air, 0, 0, -65, 0, 180, 0, 0, 0) episodeElevator.generateWithRequired( ToontownGlobals.CashbotShortChangeOffice) episodeElevator2 = DistributedShortChangeOfficeElevatorAI.DistributedShortChangeOfficeElevatorAI( self.air, 0, 0, -65, 0, 180, 0, 0, 0) episodeElevator2.generateWithRequired( ToontownGlobals.CashbotHighriseHallway) episodeElevator3 = DistributedShortChangeOfficeToBarElevatorAI.DistributedShortChangeOfficeToBarElevatorAI( self.air, 0, 0, -65, 0, 180, 0, 0, 0) episodeElevator3.generateWithRequired( ToontownGlobals.CashbotHighriseHallway) episodeElevator4 = DistributedShortChangeBarElevatorAI.DistributedShortChangeBarElevatorAI( self.air, 0, 0, -65, 0, 180, 0, 0, 0) episodeElevator4.generateWithRequired(ToontownGlobals.CashbotBar) mintIdList = [ self.testElev0.doId, self.testElev1.doId, self.testElev2.doId ] if simbase.config.GetBool('want-boarding-groups', 1): self.mintBoardingParty = DistributedBoardingPartyAI.DistributedBoardingPartyAI( self.air, mintIdList, 4) self.mintBoardingParty.generateWithRequired(self.zoneId) for extDoor in extDoorList: extDoor.setOtherDoor(intDoor0) extDoor.zoneId = ToontownGlobals.CashbotHQ extDoor.generateWithRequired(ToontownGlobals.CashbotHQ) extDoor.sendUpdate('setDoorIndex', [extDoor.getDoorIndex()]) self.addDistObj(extDoor) intDoor0.generateWithRequired(ToontownGlobals.CashbotLobby) intDoor0.sendUpdate('setDoorIndex', [intDoor0.getDoorIndex()]) self.addDistObj(intDoor0)
def startup(self): HoodDataAI.HoodDataAI.startup(self) # TODO: define these in a more modular way def makeOfficeElevator(index, antiShuffle=0, minLaff=0): destZone = ( ToontownGlobals.LawbotStageIntA, ToontownGlobals.LawbotStageIntB, ToontownGlobals.LawbotStageIntC, ToontownGlobals.LawbotStageIntD, )[index] elev = DistributedLawOfficeElevatorExtAI.DistributedLawOfficeElevatorExtAI( self.air, self.air.lawMgr, destZone, index, antiShuffle=0, minLaff=minLaff) #antiShufflePOI elev.generateWithRequired(ToontownGlobals.LawbotOfficeExt) self.addDistObj(elev) return elev.doId mins = ToontownGlobals.FactoryLaffMinimums[2] officeId0 = makeOfficeElevator(0, 0, mins[0]) officeId1 = makeOfficeElevator(1, 0, mins[1]) officeId2 = makeOfficeElevator(2, 0, mins[2]) officeId3 = makeOfficeElevator(3, 0, mins[3]) # Lobby elevator self.lobbyMgr = LobbyManagerAI.LobbyManagerAI( self.air, DistributedLawbotBossAI.DistributedLawbotBossAI) self.lobbyMgr.generateWithRequired(ToontownGlobals.LawbotLobby) self.addDistObj(self.lobbyMgr) self.lobbyElevator = DistributedCJElevatorAI.DistributedCJElevatorAI( self.air, self.lobbyMgr, ToontownGlobals.LawbotLobby, antiShuffle=1) # antiShufflePOI self.lobbyElevator.generateWithRequired(ToontownGlobals.LawbotLobby) self.addDistObj(self.lobbyElevator) if ConfigVariableBool('want-boarding-groups', 1).getValue(): self.boardingParty = DistributedBoardingPartyAI.DistributedBoardingPartyAI( self.air, [self.lobbyElevator.doId], 8) self.boardingParty.generateWithRequired( ToontownGlobals.LawbotLobby) def makeDoor(destinationZone, intDoorIndex, extDoorIndex, lock=0): #set up both doors intDoor = DistributedCogHQDoorAI.DistributedCogHQDoorAI( self.air, 0, DoorTypes.INT_COGHQ, self.canonicalHoodId, doorIndex=intDoorIndex, lockValue=lock) intDoor.zoneId = destinationZone extDoor = DistributedCogHQDoorAI.DistributedCogHQDoorAI( self.air, 0, DoorTypes.EXT_COGHQ, destinationZone, doorIndex=extDoorIndex, lockValue=lock) #point them to each other extDoor.setOtherDoor(intDoor) intDoor.setOtherDoor(extDoor) #generate them intDoor.generateWithRequired(destinationZone) intDoor.sendUpdate("setDoorIndex", [intDoor.getDoorIndex()]) self.addDistObj(intDoor) extDoor.generateWithRequired(self.canonicalHoodId) extDoor.sendUpdate("setDoorIndex", [extDoor.getDoorIndex()]) self.addDistObj(extDoor) # CogHQ Main building -> Lobby doors makeDoor(ToontownGlobals.LawbotLobby, 0, 1, FADoorCodes.LB_DISGUISE_INCOMPLETE) # Plaza -> Office makeDoor(ToontownGlobals.LawbotOfficeExt, 0, 0) officeIdList = [officeId0, officeId1, officeId2, officeId3] if ConfigVariableBool('want-boarding-parties', 1).getValue(): self.officeBoardingParty = DistributedBoardingPartyAI.DistributedBoardingPartyAI( self.air, officeIdList, 4) self.officeBoardingParty.generateWithRequired( ToontownGlobals.LawbotOfficeExt) """
def createSafeZone(self): self.lobbyMgr = LobbyManagerAI.LobbyManagerAI( self.air, DistributedSellbotBossAI.DistributedSellbotBossAI) self.lobbyMgr.generateWithRequired(ToontownGlobals.SellbotLobby) self.lobbyElevator = DistributedVPElevatorAI.DistributedVPElevatorAI( self.air, self.lobbyMgr, ToontownGlobals.SellbotLobby, antiShuffle=1) self.lobbyElevator.generateWithRequired(ToontownGlobals.SellbotLobby) if simbase.config.GetBool('want-boarding-groups', 1): self.boardingParty = DistributedBoardingPartyAI.DistributedBoardingPartyAI( self.air, [self.lobbyElevator.doId], 8) self.boardingParty.generateWithRequired( ToontownGlobals.SellbotLobby) destinationZone = ToontownGlobals.SellbotLobby extDoor0 = DistributedCogHQDoorAI.DistributedCogHQDoorAI( self.air, 0, DoorTypes.EXT_COGHQ, destinationZone, doorIndex=0, lockValue=FADoorCodes.CB_DISGUISE_INCOMPLETE) extDoor1 = DistributedCogHQDoorAI.DistributedCogHQDoorAI( self.air, 0, DoorTypes.EXT_COGHQ, destinationZone, doorIndex=1, lockValue=FADoorCodes.CB_DISGUISE_INCOMPLETE) extDoor2 = DistributedCogHQDoorAI.DistributedCogHQDoorAI( self.air, 0, DoorTypes.EXT_COGHQ, destinationZone, doorIndex=2, lockValue=FADoorCodes.CB_DISGUISE_INCOMPLETE) extDoor3 = DistributedCogHQDoorAI.DistributedCogHQDoorAI( self.air, 0, DoorTypes.EXT_COGHQ, destinationZone, doorIndex=3, lockValue=FADoorCodes.CB_DISGUISE_INCOMPLETE) extDoorList = [extDoor0, extDoor1, extDoor2, extDoor3] intDoor0 = DistributedCogHQDoorAI.DistributedCogHQDoorAI( self.air, 0, DoorTypes.INT_COGHQ, ToontownGlobals.SellbotHQ, doorIndex=0) intDoor0.setOtherDoor(extDoor0) intDoor0.zoneId = ToontownGlobals.SellbotLobby for extDoor in extDoorList: extDoor.setOtherDoor(intDoor0) extDoor.zoneId = ToontownGlobals.SellbotHQ extDoor.generateWithRequired(ToontownGlobals.SellbotHQ) extDoor.sendUpdate('setDoorIndex', [extDoor.getDoorIndex()]) intDoor0.generateWithRequired(ToontownGlobals.SellbotLobby) intDoor0.sendUpdate('setDoorIndex', [intDoor0.getDoorIndex()]) # Create factories! # Front entrance: self.factoryFrontElevator = DistributedFactoryElevatorExtAI( self.air, self.air.factoryMgr, ToontownGlobals.SellbotFactoryInt, 0) self.factoryFrontElevator.generateWithRequired( ToontownGlobals.SellbotFactoryExt) # Side entrance: self.factoryFrontElevator = DistributedFactoryElevatorExtAI( self.air, self.air.factoryMgr, ToontownGlobals.SellbotFactoryInt, 1) self.factoryFrontElevator.generateWithRequired( ToontownGlobals.SellbotFactoryExt)