# characters.py
from evennia import DefaultCharacter
class Character(DefaultCharacter):
def at_after_move(self, source):
if self.access(self.location, 'view'):
self.msg( self.location.return_short_appearance(self) )
else:
return("Unable to view {}".format(self.location.key))
# rooms.py
from evennia import DefaultRoom
class Room(DefaultRoom):
def return_short_appearance(self, looker):
desc = self.key + "\n"
desc += str(self.short_desc) # I'm lazy - this will convert the possible
# None value to a string - literally "None"
return desc
Comments