rem: template = getEntityTemplate( create_tag ); 
add: template = getEntityTemplate( create_tag, entity.player ); 
context: function attemptAddToBuildQueue( entity, create_tag, tab, list ){	template = getEntityTemplate( create_tag );	result = entityCheckQueueReq( entity, template );		if (result == true) // If the entry meets requirements to be added to the queue (eg sufficient resources) 	{		// Cycle through all costs of this entry.		pool = template.traits.creation.resource;		for ( resource in pool )		{			switch ( getGUIGlobal().toTitleCase(resource.toString()) )			{				case "Population":				case "Housing":				break;				default:					// Deduct the given quantity of resources.					getGUIGlobal().deductResources (resource.toString(), parseInt(pool[resource]));					console.write ("Spent " + pool[resource] + " " + resource + " to purchase " + 						template.traits.id.generic);				break;			}		}		// Add entity to queue.		console.write( "Adding ", create_tag, " to build queue..." );		entity.addCreateQueue( template, tab, list );				return true;	}	else	{	// If not, output the error message.		console.write(result);		return false;	}}
meta: 1070	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1070/bf615edbe75fd1937dad5e3f1c763f95636943bf/template_entity_script.js/clean/binaries/data/mods/official/entities/template_entity_script.js