

def func(self):
    '\n        This is where the processing starts.\n        Uses the ObjManipCommand.parser() for pre-processing\n        as well as the self.create_exit() method.\n        '
    caller = self.caller
    if ((not self.args) or (not self.rhs)):
        string = 'Usage: @open <new exit>[;alias...][:typeclass][,<return exit>[;alias..][:typeclass]]] '
        string += '= <destination>'
        caller.msg(string)
        return
    location = caller.location
    if (not location):
        caller.msg('You cannot create an exit from a None-location.')
        return
    exit_name = self.lhs_objs[0]['name']
    exit_aliases = self.lhs_objs[0]['aliases']
    exit_typeclass = self.lhs_objs[0]['option']
    dest_name = self.rhs
    destination = caller.search(dest_name, global_search=True)
    if (not destination):
        return
    ok = self.create_exit(exit_name, location, destination, exit_aliases, exit_typeclass)
    if (not ok):
        return
    if (len(self.lhs_objs) > 1):
        back_exit_name = self.lhs_objs[1]['name']
        back_exit_aliases = self.lhs_objs[1]['aliases']
        back_exit_typeclass = self.lhs_objs[1]['option']
        ok = self.create_exit(back_exit_name, destination, location, back_exit_aliases, back_exit_typeclass)

dataset/ETHPy150Open evennia/evennia/evennia/commands/default/building.py CmdOpen.func/original