Beispiel #1
0
    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)
Beispiel #2
0
 def monitorHealth(self, task):
     ret = DistributedSuitAI.monitorHealth(self, task)
     if self.isDead():
         try:
             self.vp.suitDie()
         except:
             pass
         return task.done
     return ret
Beispiel #3
0
    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)
Beispiel #4
0
 def monitorHealth(self, task):
     ret = DistributedSuitAI.monitorHealth(self, task)
     if self.isDead():
         self.dispatchOutput("OnDie")
         return task.done
     return ret