hood: get the golf karts generating

This commit is contained in:
John Cote 2020-01-07 21:16:42 -05:00
parent 5036cc9fcf
commit 59bbb8d9c7
2 changed files with 6 additions and 4 deletions

View file

@ -255,6 +255,9 @@ class ToontownAIRepository(ToontownInternalRepository):
else: else:
phase = ToontownGlobals.streetPhaseMap[canonicalHoodId] 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) return 'phase_%s/dna/%s_%s.dna' % (phase, hood, canonicalZoneId)
def lookupDNAFileName(self, dnaFileName): def lookupDNAFileName(self, dnaFileName):

View file

@ -7,7 +7,6 @@ from libtoontown import *
from toontown.racing.RaceGlobals import * from toontown.racing.RaceGlobals import *
from toontown.classicchars import DistributedGoofySpeedwayAI from toontown.classicchars import DistributedGoofySpeedwayAI
from toontown.safezone import DistributedGolfKartAI from toontown.safezone import DistributedGolfKartAI
import string
if __debug__: if __debug__:
import pdb import pdb
@ -109,7 +108,7 @@ class GZHoodDataAI(HoodDataAI.HoodDataAI):
def findAndCreateGolfKarts(self, dnaGroup, zoneId, area, overrideDNAZone = 0, type = 'golf_kart'): def findAndCreateGolfKarts(self, dnaGroup, zoneId, area, overrideDNAZone = 0, type = 'golf_kart'):
golfKarts = [] golfKarts = []
golfKartGroups = [] 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) golfKartGroups.append(dnaGroup)
if type == 'golf_kart': if type == 'golf_kart':
nameInfo = dnaGroup.getName().split('_') nameInfo = dnaGroup.getName().split('_')
@ -118,7 +117,7 @@ class GZHoodDataAI(HoodDataAI.HoodDataAI):
hpr = Point3(0, 0, 0) hpr = Point3(0, 0, 0)
for i in range(dnaGroup.getNumChildren()): for i in range(dnaGroup.getNumChildren()):
childDnaGroup = dnaGroup.at(i) childDnaGroup = dnaGroup.at(i)
if string.find(childDnaGroup.getName(), 'starting_block') >= 0: if childDnaGroup.getName().find('starting_block') >= 0:
padLocation = dnaGroup.getName().split('_')[2] padLocation = dnaGroup.getName().split('_')[2]
pos = childDnaGroup.getPos() pos = childDnaGroup.getPos()
hpr = childDnaGroup.getHpr() hpr = childDnaGroup.getHpr()
@ -163,7 +162,7 @@ class GZHoodDataAI(HoodDataAI.HoodDataAI):
startingBlocks = [] startingBlocks = []
for i in range(dnaRacingPadGroup.getNumChildren()): for i in range(dnaRacingPadGroup.getNumChildren()):
dnaGroup = dnaRacingPadGroup.at(i) dnaGroup = dnaRacingPadGroup.at(i)
if string.find(dnaGroup.getName(), 'starting_block') >= 0: if dnaGroup.getName().find('starting_block') >= 0:
padLocation = dnaGroup.getName().split('_')[2] padLocation = dnaGroup.getName().split('_')[2]
pos = dnaGroup.getPos() pos = dnaGroup.getPos()
hpr = dnaGroup.getHpr() hpr = dnaGroup.getHpr()