rem: += "/" + localPlayer.resource.valueOf()["HOUSING"]; 
add: += "/" + localPlayer.resource.valueOf()["Housing"]; 
context: function refreshResource (resourceName, resourceIndex){	// Refresh the onscreen counter for a given resource (called to recalculate the size of the coordinates, as these dynamically adjust depending on character length).	// Ignore the "Housing" resource ... It doesn't work like normal resources and doesn't have a counter to resize.	if (resourceName == "Housing")		return;			// Get resource readout object.	resourceObject = getGUIObjectByName ("snResourceCounter_" + (resourceIndex + 1));	// Update counter caption (since we need to have up-to-date text to determine the length of the counter).	caption 		= "[icon=iconResource" + resourceName + " displace=\"0 0\"] "		+ localPlayer.resource.valueOf()[resourceName.toUpperCase()];	// The Population counter also lists the amount of available housing.			if (resourceName == "Population")		caption			+= "/" + localPlayer.resource.valueOf()["HOUSING"];		resourceObject.caption = caption;		// Update caption tooltip.	resourceObject.tooltip = resourceName + ": " + resourceObject.caption;				// Get the index of the resource readout to be resized.	crdResult = getCrd (resourceObject.name, true);		// For each coordinate group stored for this control,	for (coordGroup in Crd[crdResult].coord)	{		// Set width of readout based on length of caption.		Crd[crdResult].coord[coordGroup].width = snConst.MiniIcon.Width+5 + resourceObject.caption.length * 10;			// Set X and Y position and height so that resources always are immediately besides each other. (Except for the first resource (usually Food), which has the initial starting position)				// Determine starting position for the first resource (so that the resources wind up being centered across the screen).		if (resourceIndex == 0)		{			// The first coordinate is in the exact centre of the screen.			Crd[crdResult].coord[coordGroup].x = -Crd[crdResult-2].coord[coordGroup].width - 5;		}		else		{	// Resources other than the first one get stacked in sequence to the sides of it.					// If we're dealing with an "even" resource index,			if (resourceIndex % 2 == 0)			{				// Put the counter to the right of the previous odd counter.				Crd[crdResult].coord[coordGroup].x					= Crd[crdResult-2].coord[coordGroup].x + Crd[crdResult-2].coord[coordGroup].width + 5;			}			else // We're dealing with an "odd" resource index.			{				// Put the counter to the left of the previous odd counter.				if (resourceIndex == 1)					Crd[crdResult].coord[coordGroup].x						= Crd[crdResult-1].coord[coordGroup].x - Crd[crdResult].coord[coordGroup].width - 5;				else					Crd[crdResult].coord[coordGroup].x						= Crd[crdResult-2].coord[coordGroup].x - Crd[crdResult].coord[coordGroup].width - 5;			}					// Set Y position to the same as the previous counter.			Crd[crdResult].coord[coordGroup].y				= Crd[crdResult-1].coord[coordGroup].y;							// Set height of readout to the same as the previous counter.			Crd[crdResult].coord[coordGroup].height				= Crd[crdResult-1].coord[coordGroup].height;		}				// Recalculate readout's size coordinates.		Crd[crdResult].size[coordGroup] = calcCrdArray (Crd[crdResult].coord[coordGroup].rx, Crd[crdResult].coord[coordGroup].ry, Crd[crdResult].coord[coordGroup].x, Crd[crdResult].coord[coordGroup].y, Crd[crdResult].coord[coordGroup].width, Crd[crdResult].coord[coordGroup].height, Crd[crdResult].coord[coordGroup].rx2, Crd[crdResult].coord[coordGroup].ry2);				// If this coordinate is part of the currently active set, update the control onscreen too.		if (coordGroup == GUIType)		{			// Update counter size.			resourceObject.size = Crd[getCrd(resourceObject.name, true)].size[GUIType];		}	}}
meta: 1070	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1070/b73622196e03cfe48613fb7047cf6c61ceaf24b0/functions_sim_player.js/clean/binaries/data/mods/official/gui/test/functions_sim_player.js