rem: if(!this.traits.id) 
add: if(!id) 
context: function entityInitQuasi(){	// Initialization function for quasi-entities like trees, rocks, etc; only sets up resources    startXTimer(6);	if (this.traits.supply)	{		// If entity has supply, set current to same.		if (this.traits.supply.max)			this.traits.supply.curr = this.traits.supply.max;		// If entity has type of supply and no subtype, set subtype to same		// (so we don't have to say type="wood", subtype="wood"		if (this.traits.supply.type && !this.traits.supply.subtype)			this.traits.supply.subtype = this.traits.supply.type;					// The "dropsitecount" array holds the number of units with gather aura in range of the object;		// this is important so that if you have two mills near something and one of them is destroyed,		// you can still gather from the thing. Initialize it to 0 (ungatherable) for every player unless		// the entity is forageable (e.g. for huntable animals).		this.traits.supply.dropsitecount = new Array();		initialCount = this.traits.supply.subtype.meat ? 1 : 0;		for( i=0; i<=8; i++ )		{			this.traits.supply.dropsitecount[i] = initialCount;		}	}		stopXTimer(6);	startXTimer(7);		// Generate civ code (1st four characters of civ name, in lower case eg "Carthaginians" => "cart").	var id = this.traits.id; 	if (id && id.civ)	{		id.civ_code = id.civ.toString().substring (0, 4);		id.civ_code = id.civ_code.toString().toLowerCase();		// Exception to make the Romans into rome.		if (id.civ_code == "roma") id.civ_code = "rome";		// Exception to make the Hellenes into hele.		if (id.civ_code == "hell") id.civ_code = "hele";	}		stopXTimer(7);	startXTimer(8);		if(!this.traits.id)	{		this.traits.id = new Object();	}		if(!this.traits.promotion)	{		this.traits.promotion = new Object();	}		stopXTimer(8);		var ob = new Object();	ob.traits = new Object();		for(var i=0; i<100; i++) {		ob["temp"+i] = "blah";	}	for(var i=0; i<100; i++) {		ob.traits["temp"+i] = "blah";	}		ob.traits.id = new Object();	ob.traits.id.civ = "hellenes";		startXTimer(9);		if (ob.traits.id && ob.traits.id.civ)	{	    var id = ob.traits.id; 		id.civ_code = id.civ.toString().substring (0, 4);		id.civ_code = id.civ_code.toString().toLowerCase();		// Exception to make the Romans into rome.		if (id.civ_code == "roma") id.civ_code = "rome";		// Exception to make the Hellenes into hele.		if (id.civ_code == "hell") id.civ_code = "hele";	}		stopXTimer(9);}
meta: 1070	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1070/3c4084ab033390d113f952cf160c077f2dd9a858/entity_functions.js/buggy/binaries/data/mods/official/scripts/entity_functions.js