Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class CmdPortal(Command):
- """
- Opens or closes a portal.
- Usage:
- portal <mark>
- portal close
- Open a portal to the destination mark for up to 5 minutes.
- Use the close argument to instead close the portal.
- """
- key = "portal"
- def func(self):
- from evennia.utils import dbref_to_obj
- from evennia import DefaultExit
- from evennia.utils import search
- from evennia.commands.default.building import CmdOpen
- destination = self.caller.db.mark[self.args]
- destination = search(destination)
- destination = dbref_to_obj(destination, 'typeclasses.rooms.Room', raise_errors=True)
- #create(cls, key, account, source, dest, **kwargs)
- DefaultExit.create("portal", self.caller.account, self.caller.location, destination)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement