def __genSuitObject(self, suitDict, reserve): suit = self.cogCtor(simbase.air, self) dna = SuitDNA.SuitDNA() dna.newSuitRandom(level=SuitDNA.getRandomSuitType(suitDict['level']), dept=suitDict['track']) suit.dna = dna suit.setLevel(suitDict['level']) suit.setSkeleRevives(suitDict.get('revives')) suit.setLevelDoId(self.level.doId) suit.setCogId(suitDict['cogId']) suit.setReserve(reserve) if suitDict['skeleton']: suit.setSkelecog(1) suit.generateWithRequired(suitDict['zoneId']) suit.boss = suitDict['boss'] return suit
def __genSuitObject(self, suitDict, reserve): suit = self.cogCtor(simbase.air, self) dna = SuitDNA.SuitDNA() dna.newSuitRandom(level=SuitDNA.getRandomSuitType(suitDict["level"]), dept=suitDict["track"]) suit.dna = dna suit.setLevel(suitDict["level"]) suit.setSkeleRevives(suitDict.get("revives")) suit.setLevelDoId(self.level.doId) suit.setCogId(suitDict["cogId"]) suit.setReserve(reserve) if suitDict["skeleton"]: suit.setSkelecog(1) suit.generateWithRequired(suitDict["zoneId"]) suit.boss = suitDict["boss"] return suit
def __genSuitObject(self, suitDict, reserve): suit = self.cogCtor(simbase.air, self) dna = SuitDNA.SuitDNA() # Will want to be more specific here? dna.newSuitRandom(level=SuitDNA.getRandomSuitType(suitDict['level']), dept=suitDict['track']) suit.dna = dna suit.setLevel(suitDict['level']) suit.setSkeleRevives(suitDict.get('revives')) suit.setLevelDoId(self.level.doId) suit.setCogId(suitDict['cogId']) suit.setReserve(reserve) if suitDict['skeleton']: # 'skelecog' is a required attribute, it will be sent to clients # on generate suit.setSkelecog(1) suit.generateWithRequired(suitDict['zoneId']) suit.boss = suitDict['boss'] return suit
def __genNormalSuitType( self, lvl ): """ // Function: generate info for a normal suit that we might find // in this particular building // Parameters: none // Changes: // Returns: list containing the suit level, type, and track """ # there is a similar formula in DistributedSuitPlannerAI used for # picking suit types for the streets, based on the suit level we # need to make sure we pick a valid suit type that can actually # be this level (each suit type can be 1 of 5 levels) # # TODO: track this formula down and make it use # SuitDNA.getRandomSuitType if (self.dbg_defaultSuitType != None): return self.dbg_defaultSuitType return SuitDNA.getRandomSuitType(lvl)
def __genNormalSuitType(self, lvl): if self.dbg_defaultSuitType != None: return self.dbg_defaultSuitType return SuitDNA.getRandomSuitType(lvl)
def __genNormalSuitType(self, lvl): return SuitDNA.getRandomSuitType(lvl)
def _SuitPlannerInteriorAI__genNormalSuitType(self, lvl): if self.dbg_defaultSuitType != None: return self.dbg_defaultSuitType return SuitDNA.getRandomSuitType(lvl)