mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-24 04:02:40 -06:00
DANIEL: GSHoodAI cleanup
This commit is contained in:
parent
887fa8abda
commit
4b2e373e45
1 changed files with 2 additions and 9 deletions
|
@ -27,17 +27,14 @@ class GSHoodAI(HoodAI.HoodAI):
|
||||||
HoodAI.HoodAI.startup(self)
|
HoodAI.HoodAI.startup(self)
|
||||||
|
|
||||||
self.createStartingBlocks()
|
self.createStartingBlocks()
|
||||||
self.cycleDuration = 10
|
|
||||||
self.createLeaderBoards()
|
self.createLeaderBoards()
|
||||||
self.__cycleLeaderBoards()
|
|
||||||
|
|
||||||
def shutdown(self):
|
def shutdown(self):
|
||||||
HoodAI.HoodAI.shutdown(self)
|
HoodAI.HoodAI.shutdown(self)
|
||||||
|
|
||||||
taskMgr.removeTasksMatching(str(self) + '_leaderBoardSwitch')
|
taskMgr.removeTasksMatching('leaderBoardSwitch')
|
||||||
for board in self.leaderBoards:
|
for board in self.leaderBoards:
|
||||||
board.delete()
|
board.delete()
|
||||||
|
|
||||||
del self.leaderBoards
|
del self.leaderBoards
|
||||||
|
|
||||||
def findRacingPads(self, dnaGroup, zoneId, area, padType='racing_pad'):
|
def findRacingPads(self, dnaGroup, zoneId, area, padType='racing_pad'):
|
||||||
|
@ -154,8 +151,4 @@ class GSHoodAI(HoodAI.HoodAI):
|
||||||
self.leaderBoards = []
|
self.leaderBoards = []
|
||||||
dnaData = self.air.dnaDataMap[self.zoneId]
|
dnaData = self.air.dnaDataMap[self.zoneId]
|
||||||
if dnaData.getName() == 'root':
|
if dnaData.getName() == 'root':
|
||||||
self.leaderBoards = self.findLeaderBoards(dnaData, self.zoneId)
|
self.leaderBoards = self.findLeaderBoards(dnaData, self.zoneId)
|
||||||
|
|
||||||
def __cycleLeaderBoards(self, task = None):
|
|
||||||
messenger.send('GS_LeaderBoardSwap' + str(self.zoneId))
|
|
||||||
taskMgr.doMethodLater(self.cycleDuration, self.__cycleLeaderBoards, str(self) + '_leaderBoardSwitch')
|
|
Loading…
Reference in a new issue