def enterLoadHouse(self): dna = ToonDNA() dna.makeFromNetString(self.toon['setDNAString'][0]) gender = 1 if dna.getGender() == 'm' else 0 self.mgr.air.sendActivate(self.houseId, self.mgr.air.districtId, self.estate.zoneId, self.mgr.air.dclassesByName['DistributedHouseAI'], {'setHousePos': [self.houseIndex], 'setColor': [self.houseIndex], 'setName': [self.toon['setName'][0]], 'setAvatarId': [self.toon['ID']], 'setGender': [gender]}) self.acceptOnce('generate-%d' % self.houseId, self.__gotHouse)
def enterLoadHouse(self): # Quickly parse DNA and get gender. dna = ToonDNA() dna.makeFromNetString(self.toon['setDNAString'][0]) gender = 1 if dna.getGender() == 'm' else 0 # Activate the house: self.mgr.air.sendActivate(self.houseId, self.mgr.air.districtId, self.estate.zoneId, self.mgr.air.dclassesByName['DistributedHouseAI'], {'setHousePos': [self.houseIndex], 'setColor': [self.houseIndex], 'setName': [self.toon['setName'][0]], 'setAvatarId': [self.toon['ID']], 'setGender': [gender]}) # Now we wait for the house to show up... We do this by hanging a messenger # hook which the DistributedHouseAI throws once it spawns. self.acceptOnce('generate-%d' % self.houseId, self.__gotHouse)
def enterLoadHouse(self): # Quickly parse DNA and get gender. dna = ToonDNA() dna.makeFromNetString(self.toon['setDNAString'][0]) gender = 1 if dna.getGender() == 'm' else 0 # Activate the house: self.mgr.air.sendActivate( self.houseId, self.mgr.air.districtId, self.estate.zoneId, self.mgr.air.dclassesByName['DistributedHouseAI'], { 'setHousePos': [self.houseIndex], 'setColor': [self.houseIndex], 'setName': [self.toon['setName'][0]], 'setAvatarId': [self.toon['ID']], 'setGender': [gender] }) # Now we wait for the house to show up... We do this by hanging a messenger # hook which the DistributedHouseAI throws once it spawns. self.acceptOnce('generate-%d' % self.houseId, self.__gotHouse)