coghqs: Moved the config getBool to CogHoodAI

This commit is contained in:
Anthony Castelli 2014-05-10 16:32:48 -07:00 committed by Aidan
parent c06d0c486a
commit e7a8cec601
5 changed files with 28 additions and 31 deletions

View file

@ -58,11 +58,10 @@ class BossbotHQAI(CogHoodAI):
h, p, r = hprList[i]
self.createKart(i, x, y, z, h, p, r, mins[i])
# Enable boarding groups
if simbase.config.GetBool('want-boarding-groups', True):
# CEO Boarding Group
self.createBoardingGroup(self.air, [self.ceoElevator.doId], ToontownGlobals.BossbotLobby, 8)
# Create boarding groups
# CEO Boarding Group
self.createBoardingGroup(self.air, [self.ceoElevator.doId], ToontownGlobals.BossbotLobby, 8)
# Cog Golf Boarding Group's
kartIds = [kart.getDoId() for kart in self.karts]
self.createBoardingGroup(self.air, kartIds, ToontownGlobals.BossbotHQ)
# Cog Golf Boarding Group's
kartIds = [kart.getDoId() for kart in self.karts]
self.createBoardingGroup(self.air, kartIds, ToontownGlobals.BossbotHQ)

View file

@ -50,11 +50,10 @@ class CashbotHQAI(CogHoodAI):
self.dollarMint = self.createElevator(DistributedMintElevatorExtAI, self.air.mintMgr, self.HOOD, ToontownGlobals.CashbotMintIntB, 1, minLaff=mins[1])
self.bullionMint = self.createElevator(DistributedMintElevatorExtAI, self.air.mintMgr, self.HOOD, ToontownGlobals.CashbotMintIntC, 2, minLaff=mins[2])
# Enable boarding groups
if simbase.config.GetBool('want-boarding-groups', True):
# CFO Boarding Group
self.createBoardingGroup(self.air, [self.cfoElevator.doId], ToontownGlobals.CashbotLobby, 8)
# Create boarding groups
# CFO Boarding Group
self.createBoardingGroup(self.air, [self.cfoElevator.doId], ToontownGlobals.CashbotLobby, 8)
# Mint Boarding Group's
self.mints = [self.cointMint.doId, self.dollarMint.doId, self.bullionMint.doId]
self.createBoardingGroup(self.air, self.mints, ToontownGlobals.CashbotHQ)
# Mint Boarding Group's
self.mints = [self.cointMint.doId, self.dollarMint.doId, self.bullionMint.doId]
self.createBoardingGroup(self.air, self.mints, ToontownGlobals.CashbotHQ)

View file

@ -37,8 +37,9 @@ class CogHoodAI(HoodAI):
pass
def createBoardingGroup(self, air, elevators, zone, maxSize=4):
boardingGroup = DistributedBoardingPartyAI.DistributedBoardingPartyAI(air, elevators, maxSize)
boardingGroup.generateWithRequired(zone)
if simbase.config.GetBool('want-boarding-groups', True):
boardingGroup = DistributedBoardingPartyAI.DistributedBoardingPartyAI(air, elevators, maxSize)
boardingGroup.generateWithRequired(zone)
def createSuitPlanner(self, zone):
sp = DistributedSuitPlannerAI(self.air, zone)

View file

@ -70,11 +70,10 @@ class LawbotHQAI(CogHoodAI):
self.officeC = self.createElevator(DistributedLawOfficeElevatorExtAI, self.air.lawOfficeMgr, ToontownGlobals.LawbotOfficeExt, ToontownGlobals.LawbotOfficeInt, 2, minLaff=mins[2])
self.officeD = self.createElevator(DistributedLawOfficeElevatorExtAI, self.air.lawOfficeMgr, ToontownGlobals.LawbotOfficeExt, ToontownGlobals.LawbotOfficeInt, 3, minLaff=mins[3])
# Enable boarding groups
if simbase.config.GetBool('want-boarding-groups', True):
# CJ Boarding Group
self.createBoardingGroup(self.air, [self.cjElevator.doId], ToontownGlobals.LawbotLobby, 8)
# Create boarding groups
# CJ Boarding Group
self.createBoardingGroup(self.air, [self.cjElevator.doId], ToontownGlobals.LawbotLobby, 8)
# DA Office Boarding Group's
self.offices = [self.officeA.doId, self.officeB.doId, self.officeC.doId, self.officeD.doId]
self.createBoardingGroup(self.air, self.offices, ToontownGlobals.LawbotOfficeExt)
# DA Office Boarding Group's
self.offices = [self.officeA.doId, self.officeB.doId, self.officeC.doId, self.officeD.doId]
self.createBoardingGroup(self.air, self.offices, ToontownGlobals.LawbotOfficeExt)

View file

@ -39,7 +39,7 @@ class SellbotHQAI(CogHoodAI):
# Create VP elevator.
self.vpElevator = self.createElevator(DistributedVPElevatorAI, self.lobbyMgr, ToontownGlobals.SellbotLobby, ToontownGlobals.SellbotLobby, boss=True)
# Make our doors.
self.createDoor()
@ -52,11 +52,10 @@ class SellbotHQAI(CogHoodAI):
self.frontEntrance = self.createElevator(DistributedFactoryElevatorExtAI, self.air.factoryMgr, ToontownGlobals.SellbotFactoryExt, ToontownGlobals.SellbotFactoryInt, 0, minLaff=mins[0])
self.sideEntrance = self.createElevator(DistributedFactoryElevatorExtAI, self.air.factoryMgr, ToontownGlobals.SellbotFactoryExt, ToontownGlobals.SellbotFactoryInt, 1, minLaff=mins[1])
# Enable boarding groups
if simbase.config.GetBool('want-boarding-groups', True):
# VP Boarding Group
self.createBoardingGroup(self.air, [self.vpElevator.doId], ToontownGlobals.SellbotLobby, 8)
# Create boarding groups
# VP Boarding Group
self.createBoardingGroup(self.air, [self.vpElevator.doId], ToontownGlobals.SellbotLobby, 8)
# Factory Boarding Group's
self.factories = [self.frontEntrance.doId, self.sideEntrance.doId]
self.createBoardingGroup(self.air, self.factories, ToontownGlobals.SellbotFactoryExt)
# Factory Boarding Group's
self.factories = [self.frontEntrance.doId, self.sideEntrance.doId]
self.createBoardingGroup(self.air, self.factories, ToontownGlobals.SellbotFactoryExt)