def privGotSpec(self, levelSpec): Level.Level.initializeLevel(self, self.doId, levelSpec, self.scenarioIndex) modelZoneNums = self.zoneNums specZoneNums = self.zoneNum2zoneId.keys() if not sameElements(modelZoneNums, specZoneNums): self.reportModelSpecSyncError('model zone nums (%s) do not match spec zone nums (%s)' % (modelZoneNums, specZoneNums)) self.initVisibility() self.placeLocalToon()
def privGotSpec(self, levelSpec): Level.Level.initializeLevel(self, self.doId, levelSpec, self.scenarioIndex) # all of the local entities have been created now. # TODO: have any of the distributed entities been created at this point? # there should not be any pending reparents left at this point # TODO: is it possible for a local entity to be parented to a # distributed entity? I think so! # Yes, it is. Don't do this check. #assert len(self.parent2pendingChildren) == 0 # make sure the zoneNums from the model match the zoneNums from # the zone entities modelZoneNums = self.zoneNums specZoneNums = self.zoneNum2zoneId.keys() if not sameElements(modelZoneNums, specZoneNums): self.reportModelSpecSyncError( 'model zone nums (%s) do not match spec zone nums (%s)' % (modelZoneNums, specZoneNums)) # load stuff self.initVisibility() self.placeLocalToon()