def getSuitName(self): if self.suitDeptIndex is not None: if self.suitTypeIndex is not None: return SuitDNA.getSuitName(self.suitDeptIndex, self.suitTypeIndex) else: return SuitDNA.suitDepts[self.suitDeptIndex] else: return SuitDNA.suitHeadTypes[0]
def __setupSuitInfo(self, suit, bldgTrack, suitLevel, suitType): suitDeptIndex, suitTypeIndex, flags = simbase.air.suitInvasionManager.getInvadingCog() if self.respectInvasions: if suitDeptIndex is not None: bldgTrack = SuitDNA.suitDepts[suitDeptIndex] if suitTypeIndex is not None: suitName = SuitDNA.getSuitName(suitDeptIndex, suitTypeIndex) suitType = SuitDNA.getSuitType(suitName) suitLevel = min(max(suitLevel, suitType), suitType + 4) dna = SuitDNA.SuitDNA() dna.newSuitRandom(suitType, bldgTrack) suit.dna = dna suit.setLevel(suitLevel) return flags
def __setupSuitInfo(self, suit, bldgTrack, suitLevel, suitType): suitDeptIndex, suitTypeIndex, flags = simbase.air.suitInvasionManager.getInvadingCog() if self.respectInvasions: if suitDeptIndex is not None: bldgTrack = SuitDNA.suitDepts[suitDeptIndex] if suitTypeIndex is not None: suitName = SuitDNA.getSuitName(suitDeptIndex, suitTypeIndex) suitType = SuitDNA.getSuitType(suitName) suitLevel = min(max(suitLevel, suitType), suitType + 4) dna = SuitDNA.SuitDNA() dna.newSuitRandom(suitType, bldgTrack) suit.dna = dna self.notify.debug('Creating suit type ' + suit.dna.name + ' of level ' + str(suitLevel) + ' from type ' + str(suitType) + ' and track ' + str(bldgTrack)) suit.setLevel(suitLevel) return flags
def __setupSuitInfo(self, suit, bldgTrack, suitLevel, suitType): suitDeptIndex, suitTypeIndex, flags = simbase.air.suitInvasionManager.getInvadingCog( ) if self.respectInvasions: if suitDeptIndex is not None: bldgTrack = SuitDNA.suitDepts[suitDeptIndex] if suitTypeIndex is not None: suitName = SuitDNA.getSuitName(suitDeptIndex, suitTypeIndex) suitType = SuitDNA.getSuitType(suitName) suitLevel = min(max(suitLevel, suitType), suitType + 4) dna = SuitDNA.SuitDNA() dna.newSuitRandom(suitType, bldgTrack) suit.dna = dna self.notify.debug('Creating suit type ' + suit.dna.name + ' of level ' + str(suitLevel) + ' from type ' + str(suitType) + ' and track ' + str(bldgTrack)) suit.setLevel(suitLevel) return flags