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)
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.')
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)
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
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)
def __str__(self): 'Return the colorized name of this player.' try: name = self.extra_settings['recap'] except: name = blue(Character.__str__(self)) return name
def __str__(self): 'Return the colorized name of this player.' name = Character.__str__(self) return blue(name)
def __str__(self): 'Return the colorized name of this mob.' name = Character.__str__(self) return magenta(name)