rem: this.traits.promotion.rank = "2"; 
add: promotion.rank = "2"; 
context: function setupRank(){	// Get the name of the entity. 	entityName = this.tag.toString();	// Determine whether current is basic, advanced or elite, and set rank to suit.	switch (entityName.substring (entityName.length-2, entityName.length))	{		case "_b":			// Basic. Upgrades to Advanced.			this.traits.promotion.rank = "1";			nextSuffix = "_a";			// Set rank image to put over entity's head.			this.traits.rank.name = "";		break;		case "_a":			// Advanced. Upgrades to Elite.			this.traits.promotion.rank = "2";			nextSuffix = "_e";			// Set rank image to put over entity's head.			this.traits.rank.name = "advanced.dds";						break;		case "_e":			// Elite. Maximum rank.			this.traits.promotion.rank = "3";			nextSuffix = "";			// Set rank image to put over entity's head.			this.traits.rank.name = "elite.dds";						break;		default:			// Does not gain promotions.			this.traits.promotion.rank = "0"			nextSuffix = ""		break;	}	// If entity is an additional rank and the correct actor has not been specified	// (it's just inherited the Basic), point it to the correct suffix. (Saves us specifying it each time.)	actorStr = this.actor.toString();	if (this.traits.promotion.rank > "1"		&& actorStr.substring (actorStr.length-5, actorStr.length) != nextSuffix + ".xml")		this.actor = actorStr.substring (1,actorStr.length-5) + nextSuffix + ".xml";			// The entity it should become (unless specified otherwise) is the base entity plus promotion suffix.	if (!this.traits.promotion.newentity && nextSuffix != "" && this.traits.promotion.rank != "0")		this.traits.promotion.newentity = entityName.substring (0, entityName.length-2) + nextSuffix;}
meta: 1070	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1070/db0af0ef8aafc1cdbabf78512e78fb6f90f5c9a5/entity_functions.js/buggy/binaries/data/mods/official/scripts/entity_functions.js