chainsol

Untitled

Sep 18th, 2017
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.65 KB | None | 0 0
  1. # characters.py
  2. from evennia import DefaultCharacter
  3.  
  4. class Character(DefaultCharacter):
  5.     def at_after_move(self, source):
  6.         if self.access(self.location, 'view'):
  7.             self.msg( self.location.return_short_appearance(self) )
  8.         else:
  9.             return("Unable to view {}".format(self.location.key))
  10.  
  11. # rooms.py
  12. from evennia import DefaultRoom
  13.  
  14. class Room(DefaultRoom):
  15.     def return_short_appearance(self, looker):
  16.         desc = self.key + "\n"
  17.         desc += str(self.short_desc) # I'm lazy - this will convert the possible
  18.                                      # None value to a string - literally "None"
  19.         return desc
Advertisement
Add Comment
Please, Sign In to add comment