rem: this.player.resources[r.toString()] -= parseInt(amount); 
add: this.player.resources[r.toString()] -= amount; 
context: function performRepair( evt ){	if( !canRepair( this, evt.target ) )	{		evt.preventDefault();		return;	}		var t = evt.target;	var b = this.actions.build;	var hp = t.traits.health;		// Find the fraction of max health to repair by; this should be one build tick (i.e. longer for buildings with	// longer creation time) but also not so much that it causes the unit to have more than max HP	var fraction = Math.min(		parseFloat( b.rate ) / t.traits.creation.time,		( hp.max - hp.curr ) / hp.max 	);	console.write("Repair fraction is " + fraction);		// Check if we can afford to repair	var resources = t.traits.creation.resource;	for( r in resources )	{		amount = parseInt( fraction * parseInt(resources[r]) );		this.player.resources[r.toString()] -= parseInt(amount);	}	// Heal the building	hp.curr = Math.min( hp.max, hp.curr + fraction * hp.max );		// Deduct the resources	var resources = t.traits.creation.resource;	for( r in resources )	{		amount = parseInt( fraction * parseInt(resources[r]) );		this.player.resources[r.toString()] -= parseInt(amount);	}}
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