add: currResource = lastPiece(currResource); 
context: function refreshResources (){	// Refreshes all resource counters after update.	var resourcePool = localPlayer.resources;		var shouldRefresh = false;	for (var currResource in resourcePool) 	{		if( oldResources[currResource] != localPlayer.resources[currResource] )		{			oldResources[currResource] = localPlayer.resources[currResource].valueOf();			shouldRefresh = true;		}	}		if( shouldRefresh )	{		for( var i=0; i<2; i++ )	// 2 refreshes seem to be necessary for proper alignment		{			var resourceCount = 0;			for (var currResource in resourcePool) 			{				if(currResource != "housing")				{					// Pass the array index of the resource as the second parameter (as we'll need that to determine the centered screen position of each counter).					refreshResource (toTitleCase(currResource), resourceUIArray[resourceCount]);					resourceCount++;				}			}		}	}}
meta: 1070	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/1070/34495528d239ff9437e77f8d3b6cf3d2446690cb/functions_sim_player.js/buggy/binaries/data/mods/official/gui/test/functions_sim_player.js