예제 #1
0
    def func(self):
        "Implement the command"
        caller = self.caller

        try:
            import_all()
            build_all(caller)
        except Exception, e:
            ostring = "Can't build world: %s" % e
            caller.msg(ostring)
            logger.log_tracemsg(ostring)
예제 #2
0
    def func(self):
        "Implement the command"
        caller = self.caller

        try:
            import_all()
            build_all(caller)
        except Exception, e:
            ostring = "Can't build world: %s" % e
            caller.msg(ostring)
            logger.log_errmsg(ostring)
            logger.log_errmsg(traceback.format_exc())
예제 #3
0
def at_initial_setup():
    """
    Build up the default world and set default locations.
    """

    try:
        # load world data
        importer.import_all()

        # reload skill modules
        MudderySkill.load_skill_modules()

        # build world
        builder.build_all()
        
        # set limbo's desc
        limbo_obj = search.search_object("#2", exact=True)
        if limbo_obj:
            limbo_obj[0].db.desc = LIMBO_DESC

        # set default locations
        builder.reset_default_locations()

        superuser = search.search_object("#1", exact=True)
        if superuser:
            superuser = superuser[0]

            # move the superuser to the start location
            start_location = search.search_object(settings.START_LOCATION, exact=True)
            if start_location:
                start_location = start_location[0]
                superuser.move_to(start_location, quiet=True)

            # set superuser's data
            superuser.set_data_key(settings.DEFAULT_PLAYER_CHARACTER_KEY)
            superuser.set_level(1)
            superuser.set_nickname("superuser")

    except Exception, e:
        ostring = "Can't build world: %s" % e
        print(ostring)
        print(traceback.format_exc())
예제 #4
0
def at_initial_setup():
    """
    Build up the default world and set default locations.
    """

    try:
        # load world data
        importer.import_all()

        # build world
        builder.build_all()

        # set limbo's desc
        limbo_obj = search.search_object("#2", exact=True)
        if limbo_obj:
            limbo_obj[0].db.desc = LIMBO_DESC

        # set default locations
        builder.reset_default_locations()

        superuser = search.search_object("#1", exact=True)
        if superuser:
            superuser = superuser[0]

            # move the superuser to the start location
            start_location = search.search_object(settings.START_LOCATION,
                                                  exact=True)
            if start_location:
                start_location = start_location[0]
                superuser.move_to(start_location)

            # set superuser's data
            superuser.set_data_info(settings.DEFAULT_PLAYER_CHARACTER_KEY)
            superuser.set_level(1)

    except Exception, e:
        ostring = "Can't build world: %s" % e
        print ostring
        print traceback.format_exc()