rem: t.template = getEntityTemplate( t.building ); 
add: t.template = getEntityTemplate( t.building, t.player ); 
context: function performBuild( evt ){	var t = evt.target;	var b = this.actions.build;	var bp = t.build_points;	var hp = t.traits.health;		var points = parseFloat( b.rate ) * parseFloat( b.speed ) / 1000.0;	bp.curr += points;	hp.curr = Math.min( hp.max, hp.curr + (points/bp.max)*hp.max );		if( bp.curr >= bp.max )	{		// We've finished building this object; convert the foundation to a building		if( t.building != "" )	// Might be false if another unit finished building the thing during our last anim cycle		{			t.template = getEntityTemplate( t.building );			t.building = "";						t.attachAuras();						if (t.traits.population && t.traits.population.add)				getGUIGlobal().giveResources ("Housing", t.traits.population.add);		}		evt.preventDefault();	// Stop performing this action	}}
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