Example #1
0
 def run(self):
     self.running = True
     try:
         while 1:
             yield utils.reactor_break()
             self.check_new_command()
             g = self.current_behaviour
             if g.status == Status.running:
                 yield g.tick()
             self.bot.bot_object.hold_position_flag = g.hold_position_flag
             if g.cancelled:
                 break
             elif g.status == Status.running:
                 break
             elif g.status == Status.suspended:
                 continue
             else:
                 self.leaf_to_parent()
     except:
         logbot.exit_on_error()
     self.running = False
Example #2
0
 def tick(self):
     self.running = True
     try:
         while 1:
             self.check_new_command()
             g = self.current_behaviour
             if g.cancelled:
                 break
             if g.status == Status.running:
                 ignore = yield g.tick()
             self.bot.bot_object.floating_flag = g.floating_flag
             if g.status == Status.running:
                 break
             elif g.status == Status.suspended:
                 ignore = yield tools.reactor_break()
                 continue
             else:
                 ignore = yield tools.reactor_break()
                 g.return_to_parent()
     except:
         logbot.exit_on_error()
     self.running = False
Example #3
0
 def run(self):
     self.running = True
     try:
         while True:
             yield utils.reactor_break()
             self.check_new_command()
             b = self.current_behavior
             self.bot.bot_object.hold_position_flag = b.hold_position_flag
             if b.sleep_until > self.blackboard.world_current_tick:
                 break
             if b.status == Status.running:
                 yield b.tick()
             if b.cancelled:
                 break
             elif b.status == Status.running:
                 break
             elif b.status == Status.suspended:
                 continue
             else:
                 self.child_to_parent()
     except:
         logbot.exit_on_error()
     self.running = False
Example #4
0
 def dataReceived(self, bytestream):
     try:
         self.parse_stream(bytestream)
     except:
         logbot.exit_on_error()
Example #5
0
 def dataReceived(self, bytestream):
     try:
         self.parse_stream(bytestream)
     except:
         logbot.exit_on_error()