rem: if (selection[0].actions.create && selection[0].actions.create.list) 
add: if (selection[0].traits.id.civ_code && selection[0].actions.create && selection[0].actions.create.list) 
context: function UpdateList(listIcon, listCol){	// Populates a given column of command icons with appropriate build portraits for the selected object.	// Returns an array of this selection.	// Build unit list.	if (selection[0].actions.create && selection[0].actions.create.list)	{		listName = "";		switch (listIcon)		{			case action_tab_train:				if (selection[0].actions.create.list.unit)					listName = selection[0].actions.create.list.unit.toString();			break;			case action_tab_buildciv:				if (selection[0].actions.create.list.structciv)					listName = selection[0].actions.create.list.structciv.toString();			break;			case action_tab_buildmil:				if (selection[0].actions.create.list.structmil)					listName = selection[0].actions.create.list.structmil.toString();			break;			case action_tab_research:				if (selection[0].actions.create.list.tech)					listName = selection[0].actions.create.list.tech.toString();			break;			default:				return 0;			break;		}		if (listName != "")		{			// Enable tab portrait.			setPortrait("session_panel_status_command_pri_" + listCol, "sheet_action", listIcon);			GUIObjectUnhide("session_panel_status_command_pri_" + listCol);			// Extract entity list into an array.			listArray = parseDelimiterString(listName, ";", listName.length);			// Populate appropriate command buttons.			for (createLoop = 1; createLoop <= command_sub_max; createLoop++)			{				if (createLoop < listArray.length+1)				{					if (getEntityTemplate(listArray[createLoop-1]).traits.id.icon_cell && getEntityTemplate(listArray[createLoop-1]).traits.id.icon_cell != "")						setPortrait("session_panel_status_command_pri_" + listCol + "_" + createLoop, getEntityTemplate(listArray[createLoop-1]).traits.id.icon, getEntityTemplate(listArray[createLoop-1]).traits.id.icon_cell);					else						setPortrait("session_panel_status_command_pri_" + listCol + "_" + createLoop, getEntityTemplate(listArray[createLoop-1]).traits.id.icon);					GUIObjectUnhide("session_panel_status_command_pri_" + listCol + "_" + createLoop);				}				else					GUIObjectHide("session_panel_status_command_pri_" + listCol + "_" + createLoop);			}			return listArray;		}	}	return 0;}
meta: 1070	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1070/a2e02c4cc3365f4cee1672848946c07b187ee8b2/functions_session_status_orb.js/clean/binaries/data/mods/official/gui/test/functions_session_status_orb.js