Give people teleport access to the HQ when they get their last suit

This commit is contained in:
DenialMC 2015-04-10 14:45:08 +03:00
parent fa78289835
commit f8d82e356d
2 changed files with 13 additions and 1 deletions

View file

@ -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,

View file

@ -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):