# Path: twistedbot/plugins/base.py
# class PluginChatBase(PluginBase):
# 
#     def send_chat_message(self, msg):
#         self.world.chat.send_chat_message(msg)
# 
#     @abc.abstractproperty
#     def command_verb(self):
#         pass
# 
#     @property
#     def aliases(self):
#         return []
# 
#     @abc.abstractproperty
#     def help(self):
#         pass
# 
#     @abc.abstractmethod
#     def command(self, sender, command, args):
#         pass
# 
# Path: twistedbot/behavior_tree.py
# class GoToSign(BTGoal):
#     def __init__(self, sign_name=None, **kwargs):
#         super(GoToSign, self).__init__(**kwargs)
#         self.sign_name = sign_name
#         self.name = 'go to %s' % self.sign_name
# 
#     @property
#     def goal_reached(self):
#         return self.signpoint.coords == self.blackboard.bot_object.position_grid
# 
#     def is_valid(self):
#         self.signpoint = self.blackboard.sign_waypoints_get_namepoint(self.sign_name)
#         if self.signpoint is None:
#             self.signpoint = self.blackboard.sign_waypoints_get_name_from_group(self.sign_name)
#         if self.signpoint is None:
#             self.blackboard.send_chat_message("cannot idetify sign with name %s" % self.sign_name)
#             return False
#         if not self.blackboard.sign_waypoints_check_sign(self.signpoint):
#             return False
#         return True
# 
#     def choices(self):
#         while self.is_valid():
#             yield self.make_behavior(TravelTo, coords=self.signpoint.coords)


from twistedbot.plugins.base import PluginChatBase
from twistedbot.behavior_tree import GoToSign



class Go(PluginChatBase):
    @property
    def command_verb(self):
        return "go"

    @property
    def help(self):
        return "go to specific sign, can be group name and order separated with space"

    def command(self, sender, command, args):
        if subject:

# Path: twistedbot/plugins/base.py
# class PluginChatBase(PluginBase):
# 
#     def send_chat_message(self, msg):
#         self.world.chat.send_chat_message(msg)
# 
#     @abc.abstractproperty
#     def command_verb(self):
#         pass
# 
#     @property
#     def aliases(self):
#         return []
# 
#     @abc.abstractproperty
#     def help(self):
#         pass
# 
#     @abc.abstractmethod
#     def command(self, sender, command, args):
#         pass
# 
# Path: twistedbot/behavior_tree.py
# class GoToSign(BTGoal):
#     def __init__(self, sign_name=None, **kwargs):
#         super(GoToSign, self).__init__(**kwargs)
#         self.sign_name = sign_name
#         self.name = 'go to %s' % self.sign_name
# 
#     @property
#     def goal_reached(self):
#         return self.signpoint.coords == self.blackboard.bot_object.position_grid
# 
#     def is_valid(self):
#         self.signpoint = self.blackboard.sign_waypoints_get_namepoint(self.sign_name)
#         if self.signpoint is None:
#             self.signpoint = self.blackboard.sign_waypoints_get_name_from_group(self.sign_name)
#         if self.signpoint is None:
#             self.blackboard.send_chat_message("cannot idetify sign with name %s" % self.sign_name)
#             return False
#         if not self.blackboard.sign_waypoints_check_sign(self.signpoint):
#             return False
#         return True
# 
#     def choices(self):
#         while self.is_valid():
#             yield self.make_behavior(TravelTo, coords=self.signpoint.coords)


# Path: twistedbot/plugins/core/chat_go.py
from twistedbot.plugins.base import PluginChatBase
from twistedbot.behavior_tree import GoToSign




class Go(PluginChatBase):
    @property
    def command_verb(self):
        return "go"

    @property
    def help(self):
        return "go to specific sign, can be group name and order separated with space"

    def command(self, sender, command, args):
        if subject:

            self.world.bot.behavior_tree.new_command(GoToSign, sign_name=" ".join(subject))