mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-23 11:42:39 -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)
|
||||
|
||||
self.createStartingBlocks()
|
||||
self.cycleDuration = 10
|
||||
self.createLeaderBoards()
|
||||
self.__cycleLeaderBoards()
|
||||
|
||||
def shutdown(self):
|
||||
HoodAI.HoodAI.shutdown(self)
|
||||
|
||||
taskMgr.removeTasksMatching(str(self) + '_leaderBoardSwitch')
|
||||
taskMgr.removeTasksMatching('leaderBoardSwitch')
|
||||
for board in self.leaderBoards:
|
||||
board.delete()
|
||||
|
||||
del self.leaderBoards
|
||||
|
||||
def findRacingPads(self, dnaGroup, zoneId, area, padType='racing_pad'):
|
||||
|
@ -154,8 +151,4 @@ class GSHoodAI(HoodAI.HoodAI):
|
|||
self.leaderBoards = []
|
||||
dnaData = self.air.dnaDataMap[self.zoneId]
|
||||
if dnaData.getName() == 'root':
|
||||
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')
|
||||
self.leaderBoards = self.findLeaderBoards(dnaData, self.zoneId)
|
Loading…
Reference in a new issue