def can_wear_item(life, item_uid):
	#TODO: Function name makes no sense.
	item = items.get_item_from_uid(item_uid)
	
	if not 'CAN_WEAR' in item['flags']:
		return False
	
	if item_is_worn(life, item_uid):
		return False
	
	for limb in item['attaches_to']:
		_limb = get_limb(life, limb)
		
		for _item in [items.get_item_from_uid(item_uid) for i in _limb['holding']]:
			if item_uid == _item['uid']:
				continue
			
			if not 'CANSTACK' in _item['flags']:
				logging.warning('%s will not let %s stack.' % (_item['name'],item['name']))
				return False

	return True
Attaches item to limbs. Returns False on failure.
dataset/ETHPy150Open flags/Reactor-3/life.py/can_wear_item