rem: console.write("CancelProduction: " + evt.productionType + " " + evt.name); 
context: function entityCancelProduction( evt ){	console.write("CancelProduction: " + evt.productionType + " " + evt.name);		if( evt.productionType == PRODUCTION_TRAIN )	{		// Give back all the resources spent on this entry.		var template = getEntityTemplate( evt.name, this.player );		var pool = template.traits.creation.resource;		for ( resource in pool )		{			switch ( resource.toString() )			{				case "population":				case "housing":				break;				default:					// Refund the given quantity of resources.					this.player.resources[resource.toString()] += parseInt(pool[resource]);					console.write ("Got back " + pool[resource] + " " + resource + " from cancelling " + 						template.traits.id.generic);				break;			}		}				// Give back the reserved population space		if( template.traits.population && template.traits.population.rem )		{			this.player.resources.population -= parseInt(template.traits.population.rem);		}	}	else if( evt.productionType == PRODUCTION_RESEARCH )	{		var tech = getTechnology( evt.name, this.player );				// Give back the player's resources		for( i in TECH_RESOURCES )		{			var res = TECH_RESOURCES[i];			this.player.resources[res] += tech[res];		}				// Unmark tech as in progress		tech.in_progress = false;	}}
meta: 1070	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1070/cb07a8b88da0b45aa91a36a9cf709b284ea006ce/entity_functions.js/clean/binaries/data/mods/official/scripts/entity_functions.js