

def func(self):
    '\n        Creates the object.\n        '
    caller = self.caller
    if (not self.args):
        string = 'Usage: @create[/drop] <newname>[;alias;alias...] [:typeclass_path]'
        caller.msg(string)
        return
    for objdef in self.lhs_objs:
        string = ''
        name = objdef['name']
        aliases = objdef['aliases']
        typeclass = objdef['option']
        lockstring = ('control:id(%s);delete:id(%s) or perm(Wizards)' % (caller.id, caller.id))
        obj = create.create_object(typeclass, name, caller, home=caller, aliases=aliases, locks=lockstring, report_to=caller)
        if (not obj):
            continue
        if aliases:
            string = 'You create a new %s: %s (aliases: %s).'
            string = (string % (obj.typename, obj.name, ', '.join(aliases)))
        else:
            string = 'You create a new %s: %s.'
            string = (string % (obj.typename, obj.name))
        if (not obj.db.desc):
            obj.db.desc = 'You see nothing special.'
        if ('drop' in self.switches):
            if caller.location:
                obj.home = caller.location
                obj.move_to(caller.location, quiet=True)
    if string:
        caller.msg(string)

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