Explanation:
 
This routine just keeps trying to repair Torque until either an enemy is scanned on the perimeter, or an incoming missile or grenade is detected. When either of these is detected, then Torque will self-destruct.