Exemplo n.º 1
0
    def __init__(self):
        """ Initializes the command. """

        super(Commands, self).__init__()

        self.commands = {
            'ge'         : self.give,

            'i'          : self.inventory,
            'inventarier': self.inventory,

            'lägg'       : self.drop,
            'släng'      : self.drop,

            'ta'         : self.take,
        }

        self.on_message('actor_drop', self.__actor_drop,
            filter=messages.for_entities_of_class(Actor))

        self.on_message('actor_give', self.__actor_give,
            filter=messages.for_entities_of_class(Actor))

        self.on_message('actor_take', self.__actor_take,
            filter=messages.for_entities_of_class(Actor))
Exemplo n.º 2
0
    def __init__(self):
        """ Initializes the command. """

        super(Commands, self).__init__()

        self.commands = {
            'ge': self.give,
            'i': self.inventory,
            'inventarier': self.inventory,
            'lägg': self.drop,
            'släng': self.drop,
            'ta': self.take,
        }

        self.on_message('actor_drop',
                        self.__actor_drop,
                        filter=messages.for_entities_of_class(Actor))

        self.on_message('actor_give',
                        self.__actor_give,
                        filter=messages.for_entities_of_class(Actor))

        self.on_message('actor_take',
                        self.__actor_take,
                        filter=messages.for_entities_of_class(Actor))
Exemplo n.º 3
0
    def __init__(self):
        super(LockCommands, self).__init__()

        self.on_message('actor_lock', self.__actor_lock,
            filter=messages.for_entities_of_class(Actor))

        self.on_message('actor_unlock', self.__actor_unlock,
            filter=messages.for_entities_of_class(Actor))

        self.on_message('player_command', self.__player_command,
            filter=messages.for_actors_with_item_of_class(Key))
Exemplo n.º 4
0
    def __init__(self):
        """ Initializes the command. """

        super(Command, self).__init__()

        self.on_message('actor_say',
                        self.__actor_say,
                        filter=messages.for_entities_of_class(Actor))

        self.on_message('player_command',
                        self.__player_command,
                        filter=messages.for_entities_of_class(Player))
Exemplo n.º 5
0
    def __init__(self):
        """ Initializes the command. """

        super(Command, self).__init__()

        self.on_message('actor_enter', self.__actor_enter,
            filter=messages.for_entities_of_class(Actor))

        self.on_message('actor_leave', self.__actor_leave,
            filter=messages.for_entities_of_class(Actor))

        self.on_message('player_command', self.__player_command,
            filter=messages.for_entities_of_class(Player))
Exemplo n.º 6
0
    def __init__(self):
        """ Initializes the command. """

        super(Commands, self).__init__()

        self.commands = {'ta av': self.remove, 'ta på': self.wear}

        self.on_message('actor_remove',
                        self.__actor_remove,
                        filter=messages.for_entities_of_class(Actor))

        self.on_message('actor_wear',
                        self.__actor_wear,
                        filter=messages.for_entities_of_class(Actor))
Exemplo n.º 7
0
    def __init__(self):
        super(LockCommands, self).__init__()

        self.on_message('actor_lock',
                        self.__actor_lock,
                        filter=messages.for_entities_of_class(Actor))

        self.on_message('actor_unlock',
                        self.__actor_unlock,
                        filter=messages.for_entities_of_class(Actor))

        self.on_message('player_command',
                        self.__player_command,
                        filter=messages.for_actors_with_item_of_class(Key))
Exemplo n.º 8
0
    def __init__(self):
        """ Initializes the command. """

        super(Commands, self).__init__()

        self.commands = {
            'ta av': self.remove,
            'ta på': self.wear
        }

        self.on_message('actor_remove', self.__actor_remove,
            filter=messages.for_entities_of_class(Actor))

        self.on_message('actor_wear', self.__actor_wear,
            filter=messages.for_entities_of_class(Actor))
Exemplo n.º 9
0
    def __init__(self):
        super(Command, self).__init__()

        self.commands = {}

        self.on_message('player_command', self.__player_command,
            filter=messages.for_entities_of_class(Player))
Exemplo n.º 10
0
    def __init__(self):
        """ Initializes the command. """

        super(Commands, self).__init__()

        self.commands = {
            'stäng': self.close,
            't'    : self.look,
            'titta': self.look,
            'öppna': self.open
        }

        self.on_message('actor_close', self.__actor_close,
            filter=messages.for_entities_of_class(Actor))

        self.on_message('actor_open', self.__actor_open,
            filter=messages.for_entities_of_class(Actor))
Exemplo n.º 11
0
    def __init__(self):
        """ Initializes the command. """

        super(Commands, self).__init__()

        self.commands = {
            'stäng': self.close,
            't': self.look,
            'titta': self.look,
            'öppna': self.open
        }

        self.on_message('actor_close',
                        self.__actor_close,
                        filter=messages.for_entities_of_class(Actor))

        self.on_message('actor_open',
                        self.__actor_open,
                        filter=messages.for_entities_of_class(Actor))
Exemplo n.º 12
0
    def __init__(self):
        """ Initializes the emote handler. """

        super(Commands, self).__init__()

        self.commands = {
            "peka": self.point,
            "pussa": self.kiss,
            "vinka": self.wave,
            "dansa": self.dance,
            "smiska": self.spank,
        }

        self.on_message("actor_emote", self.__actor_emote, filter=messages.for_entities_of_class(Actor))
Exemplo n.º 13
0
    def __init__(self):
        """ Initializes the emote handler. """

        super(Commands, self).__init__()

        self.commands = {
            'peka'  : self.point,
            'pussa' : self.kiss,
            'vinka' : self.wave,
            'dansa' : self.dance,
            'smiska': self.spank
        }

        self.on_message('actor_emote', self.__actor_emote,
            filter=messages.for_entities_of_class(Actor))