hood: get the golf karts generating
This commit is contained in:
parent
5036cc9fcf
commit
59bbb8d9c7
2 changed files with 6 additions and 4 deletions
|
@ -255,6 +255,9 @@ class ToontownAIRepository(ToontownInternalRepository):
|
|||
else:
|
||||
phase = ToontownGlobals.streetPhaseMap[canonicalHoodId]
|
||||
|
||||
if 'outdoor_zone' in hood or 'golf_zone' in hood:
|
||||
phase = '6'
|
||||
|
||||
return 'phase_%s/dna/%s_%s.dna' % (phase, hood, canonicalZoneId)
|
||||
|
||||
def lookupDNAFileName(self, dnaFileName):
|
||||
|
|
|
@ -7,7 +7,6 @@ from libtoontown import *
|
|||
from toontown.racing.RaceGlobals import *
|
||||
from toontown.classicchars import DistributedGoofySpeedwayAI
|
||||
from toontown.safezone import DistributedGolfKartAI
|
||||
import string
|
||||
if __debug__:
|
||||
import pdb
|
||||
|
||||
|
@ -109,7 +108,7 @@ class GZHoodDataAI(HoodDataAI.HoodDataAI):
|
|||
def findAndCreateGolfKarts(self, dnaGroup, zoneId, area, overrideDNAZone = 0, type = 'golf_kart'):
|
||||
golfKarts = []
|
||||
golfKartGroups = []
|
||||
if isinstance(dnaGroup, DNAGroup) and string.find(dnaGroup.getName(), type) >= 0:
|
||||
if isinstance(dnaGroup, DNAGroup) and dnaGroup.getName().find(type) >= 0:
|
||||
golfKartGroups.append(dnaGroup)
|
||||
if type == 'golf_kart':
|
||||
nameInfo = dnaGroup.getName().split('_')
|
||||
|
@ -118,7 +117,7 @@ class GZHoodDataAI(HoodDataAI.HoodDataAI):
|
|||
hpr = Point3(0, 0, 0)
|
||||
for i in range(dnaGroup.getNumChildren()):
|
||||
childDnaGroup = dnaGroup.at(i)
|
||||
if string.find(childDnaGroup.getName(), 'starting_block') >= 0:
|
||||
if childDnaGroup.getName().find('starting_block') >= 0:
|
||||
padLocation = dnaGroup.getName().split('_')[2]
|
||||
pos = childDnaGroup.getPos()
|
||||
hpr = childDnaGroup.getHpr()
|
||||
|
@ -163,7 +162,7 @@ class GZHoodDataAI(HoodDataAI.HoodDataAI):
|
|||
startingBlocks = []
|
||||
for i in range(dnaRacingPadGroup.getNumChildren()):
|
||||
dnaGroup = dnaRacingPadGroup.at(i)
|
||||
if string.find(dnaGroup.getName(), 'starting_block') >= 0:
|
||||
if dnaGroup.getName().find('starting_block') >= 0:
|
||||
padLocation = dnaGroup.getName().split('_')[2]
|
||||
pos = dnaGroup.getPos()
|
||||
hpr = dnaGroup.getHpr()
|
||||
|
|
Loading…
Reference in a new issue