diff --git a/toontown/suit/SuitDNA.py b/toontown/suit/SuitDNA.py index 86cbeb41..b3ad661d 100644 --- a/toontown/suit/SuitDNA.py +++ b/toontown/suit/SuitDNA.py @@ -1,7 +1,7 @@ import random from pandac.PandaModules import * from direct.directnotify.DirectNotifyGlobal import * -from toontown.toonbase import TTLocalizer +from toontown.toonbase import TTLocalizer, ToontownGlobals import random from direct.distributed.PyDatagram import PyDatagram from direct.distributed.PyDatagramIterator import PyDatagramIterator @@ -75,6 +75,10 @@ suitDepts = ['c', 'l', 'm', 's'] +suitDeptZones = [ToontownGlobals.BossbotHQ, + ToontownGlobals.LawbotHQ, + ToontownGlobals.CashbotHQ, + ToontownGlobals.SellbotHQ] suitDeptFullnames = {'c': TTLocalizer.Bossbot, 'l': TTLocalizer.Lawbot, 'm': TTLocalizer.Cashbot, diff --git a/toontown/toon/DistributedToonAI.py b/toontown/toon/DistributedToonAI.py index b43e883b..2180939c 100644 --- a/toontown/toon/DistributedToonAI.py +++ b/toontown/toon/DistributedToonAI.py @@ -1223,6 +1223,14 @@ class DistributedToonAI(DistributedPlayerAI.DistributedPlayerAI, DistributedSmoo 0, 0] else: + for i in xrange(len(types)): + if types[i] == SuitDNA.suitsPerDept - 1: + zoneId = SuitDNA.suitDeptZones[i] + tpAccess = self.getTeleportAccess() + + if zoneId not in tpAccess: + tpAccess.append(zoneId) + self.b_setTeleportAccess(tpAccess) self.cogTypes = types def d_setCogTypes(self, types):