Ejemplo n.º 1
0
    def destroy(self):
        'Get rid of this player and remove it from the indexes.'

        room = self.room
        if room is not None:
            room.rmplayer(self)
        remove(self)
        Character.destroy(self)
Ejemplo n.º 2
0
    def _follow(self, leaver, x):
        'Override Character._follow to show room name when arriving.'

        if leaver not in self.room:
            self.message('You follow', leaver, '.')
            Character._follow(self, leaver, x)
            self.message(self.room)
        else:
            self.message('You started to follow, but', leaver, 'came right back.')
Ejemplo n.º 3
0
    def destroy(self):
        'Get rid of this mob and remove it from the mob index.'

        room = self.room
        if room is not None:
            room.rmmob(self)
            room.action(dict(act='destroy_mob', actor=None, mob=self))

        remove(self)
        Character.destroy(self)
Ejemplo n.º 4
0
    def __init__(self, name, short='', long=''):
        Character.__init__(self, name, short, long)
        add(self)

        self.pwhash = None
        self.user_settings = TZDict()

        self.logged_in = False
        self.created = time.time()
        self.last = None
        self.active = None
Ejemplo n.º 5
0
    def __init__(self, name='', short='', long=''):
        Character.__init__(self, name, short, long)

        self._last_act = 0
        self.nudge()

        add(self)

        self._action_weights = PersistentDict()
        self.set_default_action_weights()
        self.set_action_weights(action_awake=500,
                                action_move=0)
Ejemplo n.º 6
0
    def __str__(self):
        'Return the colorized name of this player.'

        try:
            name = self.extra_settings['recap']
        except: 
            name = blue(Character.__str__(self))
        return name
Ejemplo n.º 7
0
    def __str__(self):
        'Return the colorized name of this player.'

        name = Character.__str__(self)
        return blue(name)
Ejemplo n.º 8
0
    def __str__(self):
        'Return the colorized name of this mob.'

        name = Character.__str__(self)
        return magenta(name)