def monitorHealth(self, task): if not hasattr(self, 'battle') or hasattr( self, 'battle') and self.battle is None: return task.done if self.isDead(): self.battle.suitHPAtZero(self.doId) return DistributedSuitAI.monitorHealth(self, task)
def monitorHealth(self, task): ret = DistributedSuitAI.monitorHealth(self, task) if self.isDead(): try: self.vp.suitDie() except: pass return task.done return ret
def monitorHealth(self, task): if self.isDead(): # No! I'm dead! I lost my building! self.bldg.takenBySuit = False self.sendUpdate('interruptTakeOver') if self.takeOverTrack: self.takeOverTrack.pause() self.takeOverTrack = None return DistributedSuitAI.monitorHealth(self, task)
def monitorHealth(self, task): ret = DistributedSuitAI.monitorHealth(self, task) if self.isDead(): self.dispatchOutput("OnDie") return task.done return ret