classes/World.js
function(config) {
		var required = ['world_path', 'start_room'];
		required.each(function(key) {
			if (!config[key]) {
				sys.puts("Required config option \""+key+"\" not supplied.");
				process.exit();
			}
		});
		this.set('name', config.world_name);
		this.config      = config;
		this.worldPath   = require('path').join(config.world_path);
		this.defaultRoom = config.start_room;
		this.players     = this.players;
		this.rooms       = this.rooms;
		this.items       = this.items;

		this.initializeRooms();
	}
function(config) {
		var required = ['world_path', 'start_room'];
		required.each(function(key) {
			if (!config[key]) {
				sys.puts("Required config option \""+key+"\" not supplied.");
				process.exit();
			}
		});
		this.set('name', config.world_name);
		this.config      = config;
		this.worldPath   = require('path').join(config.world_path);
		this.defaultRoom = config.start_room;
		this.players     = this.players;
		this.rooms       = this.rooms;
		this.items       = this.items;

		this.initializeRooms();
	}
function ( config ) { var required = [ 'world_path' , 'start_room' ] ; required . each ( function ( key ) { if ( ! config [ key ] ) { sys . puts ( "Required config option \"" + key + "\" not supplied." ) ; process . exit ( ) ; } } ) ; this . set ( 'name' , config . world_name ) ; this . config = config ; this . worldPath = require ( 'path' ) . join ( config . world_path ) ; this . defaultRoom = config . start_room ; this . players = this . players ; this . rooms = this . rooms ; this . items = this . items ; this . initializeRooms ( ) ; }
The name of the world will determine the path to the world's room and
object files.
The name of the world will determine the path to the world s room and object files .