coghq: another one

This commit is contained in:
Little Cat 2023-01-10 20:00:56 -04:00
parent ca58c8130a
commit e5d8290317
No known key found for this signature in database
GPG key ID: 96455BD9C4399BE8

View file

@ -74,8 +74,6 @@ class FactoryExterior(BattlePlace.BattlePlace):
self.tunnelOriginList = base.cr.hoodMgr.addLinkTunnelHooks(self, self.nodeList, self.zoneId)
how = requestStatus['how']
self.fsm.request(how, [requestStatus])
if __astron__ and self.zoneId != ToontownGlobals.LawbotOfficeExt:
self.handleInterests()
def exit(self):
self._telemLimiter.destroy()
@ -157,31 +155,3 @@ class FactoryExterior(BattlePlace.BattlePlace):
messenger.send(self.doneEvent)
else:
self.notify.error('Unknown mode: ' + where + ' in handleElevatorDone')
if __astron__:
def handleInterests(self):
# First, we need to load the DNA file for this Cog HQ.
dnaStore = DNAStorage()
dnaFileName = self.genDNAFileName(self.zoneId)
loadDNAFileAI(dnaStore, dnaFileName)
# Next, we need to collect all of the visgroup zone IDs.
self.zoneVisDict = {}
for i in range(dnaStore.getNumDNAVisGroupsAI()):
visGroup = dnaStore.getDNAVisGroupAI(i)
groupFullName = visGroup.getName()
visZoneId = int(base.cr.hoodMgr.extractGroupName(groupFullName))
visZoneId = ZoneUtil.getTrueZoneId(visZoneId, self.zoneId)
visibles = []
for i in range(visGroup.getNumVisibles()):
visibles.append(int(visGroup.getVisibleName(i)))
visibles.append(ZoneUtil.getBranchZone(visZoneId))
self.zoneVisDict[visZoneId] = visibles
# Finally, we want interest in all visgroups due to this being a Cog HQ.
visList = list(self.zoneVisDict.values())[0]
if self.zoneId not in visList:
visList.append(self.zoneId)
base.cr.sendSetZoneMsg(self.zoneId, visList)