local smart_table = {
					"zat_stalker_base_smart",
					"jup_b41",
					"jup_a6",
					"pri_a16",
					}

local eatable_visuals = {
	["actors\\stalker_hero\\stalker_hero_1"] = true,
	["actors\\stalker_hero\\stalker_hero_novice_1"] = true,
	["actors\\stalker_hero\\stalker_hero_stalker_1"] = true,
	["actors\\stalker_hero\\stalker_hero_dolg_1"] = true,
	["actors\\stalker_hero\\stalker_hero_dolg_2"] = true,
	["actors\\stalker_hero\\stalker_hero_freedom_1"] = true,
	["actors\\stalker_hero\\stalker_hero_freedom_2"] = true,
	["actors\\stalker_hero\\stalker_hero_specops"] = true,
	["actors\\stalker_hero\\stalker_hero_military"] = true,
	["actors\\stalker_hero\\stalker_hero_neutral_nauchniy"] = true,
	["actors\\stalker_hero\\stalker_hero_cs_heavy"] = true,
	["actors\\stalker_hero\\stalker_hero_exo"] = true,
	["actors\\stalker_bandit\\stalker_bandit_3"] = true,
	["actors\\stalker_bandit\\stalker_bandit_3_face_1"] = true,
	["actors\\stalker_bandit\\stalker_bandit_3_mask"] = true,
	["actors\\stalker_bandit\\stalker_bandit_4"] = true,
	["actors\\stalker_dolg\\stalker_dolg_2_face_1"] = true,
	["actors\\stalker_dolg\\stalker_dolg_1_face_1"] = true,
	["actors\\stalker_dolg\\stalker_dolg_3_face_1"] = true,
	["actors\\stalker_freedom\\stalker_freedom_1_face_1"] = true,
	["actors\\stalker_freedom\\stalker_freedom_2_face_1"] = true,
	["actors\\stalker_freedom\\stalker_freedom_2_face_2"] = true,
	["actors\\stalker_freedom\\stalker_freedom_3"] = true,
	["actors\\stalker_freedom\\stalker_freedom_3_face_1"] = true,
	["actors\\stalker_monolith\\stalker_monolith_1_face_1"] = true,
	["actors\\stalker_nebo\\stalker_nebo_2_face_1"] = true,
	["actors\\stalker_neutral\\stalker_neutral_1_face_1"] = true,
	["actors\\stalker_neutral\\stalker_neutral_1_face_2"] = true,
	["actors\\stalker_neutral\\stalker_neutral_1_face_3"] = true,
	["actors\\stalker_bandit\\stalker_bandit_3_face_3"] = true,
	["actors\\stalker_neutral\\stalker_neutral_2_face_1"] = true,
	["actors\\stalker_neutral\\stalker_neutral_2_face_2"] = true,
	["actors\\stalker_neutral\\stalker_neutral_2_face_3"] = true,
	["actors\\stalker_neutral\\stalker_neutral_2_face_4"] = true,
	["actors\\stalker_neutral\\stalker_neutral_2_face_5"] = true,
	["actors\\stalker_neutral\\stalker_neutral_2_face_6"] = true,
	["actors\\stalker_neutral\\stalker_neutral_2_face_7"] = true,
	["actors\\stalker_bandit\\stalker_bandit_3_face_2"] = true,
	["actors\\stalker_neutral\\stalker_neutral_3_face_1"] = true,
	["actors\\stalker_neutral\\stalker_neutral_nauchniy_face_1"] = true,
	["actors\\stalker_neutral\\stalker_neutral_nauchniy_face_3"] = true,
	["actors\\stalker_soldier\\stalker_soldier_1"] = true,
	["actors\\stalker_soldier\\stalker_soldier_1_face_1"] = true,
	["actors\\stalker_soldier\\stalker_solider_2"] = true,
	["actors\\stalker_soldier\\stalker_solider_2_face_1"] = true,
	["actors\\stalker_soldier\\stalker_solider_3_face_1"] = true,
	["actors\\stalker_soldier\\stalker_solider_ecolog_face_1"] = true,
	["actors\\stalker_ucheniy\\stalker_ucheniy_1_face_1"] = true,
	["actors\\stalker_ucheniy\\stalker_ucheniy_1_face_2"] = true,
	["actors\\stalker_zombied\\stalker_zombied_1"] = true,
	["actors\\stalker_zombied\\stalker_zombied_3"] = true,
	["actors\\stalker_neutral\\stalker_neutral_nauchniy_face_2"] = true
}

local harmonica_visuals = {
	["actors\\stalker_hero\\stalker_hero_1"] = true,
	["actors\\stalker_hero\\stalker_hero_novice_1"] = true,
	["actors\\stalker_hero\\stalker_hero_stalker_1"] = true,
	["actors\\stalker_hero\\stalker_hero_dolg_1"] = true,
	["actors\\stalker_hero\\stalker_hero_dolg_2"] = true,
	["actors\\stalker_hero\\stalker_hero_freedom_1"] = true,
	["actors\\stalker_hero\\stalker_hero_freedom_2"] = true,
	["actors\\stalker_hero\\stalker_hero_specops"] = true,
	["actors\\stalker_hero\\stalker_hero_military"] = true,
	["actors\\stalker_hero\\stalker_hero_neutral_nauchniy"] = true,
	["actors\\stalker_hero\\stalker_hero_cs_heavy"] = true,
	["actors\\stalker_hero\\stalker_hero_exo"] = true,
	["actors\\stalker_bandit\\stalker_bandit_1"] = true,
	["actors\\stalker_bandit\\stalker_bandit_2"] = true,
	["actors\\stalker_bandit\\stalker_bandit_3"] = true,
	["actors\\stalker_bandit\\stalker_bandit_3_face_1"] = true,
	["actors\\stalker_bandit\\stalker_bandit_3_mask"] = true,
	["actors\\stalker_bandit\\stalker_bandit_4"] = true,
	["actors\\stalker_dolg\\stalker_dolg_2_face_1"] = true,
	["actors\\stalker_dolg\\stalker_dolg_1_face_1"] = true,
	["actors\\stalker_dolg\\stalker_dolg_2_mask"] = true,
	["actors\\stalker_dolg\\stalker_dolg_3_face_1"] = true,
	["actors\\stalker_freedom\\stalker_freedom_1_face_1"] = true,
	["actors\\stalker_freedom\\stalker_freedom_2_face_1"] = true,
	["actors\\stalker_freedom\\stalker_freedom_2_face_2"] = true,
	["actors\\stalker_freedom\\stalker_freedom_2_mask"] = true,
	["actors\\stalker_freedom\\stalker_freedom_3"] = true,
	["actors\\stalker_freedom\\stalker_freedom_3_face_1"] = true,
	["actors\\stalker_monolith\\stalker_monolith_1_face_1"] = true,
	["actors\\stalker_nebo\\stalker_nebo_2_face_1"] = true,
	["actors\\stalker_neutral\\stalker_neutral_1"] = true,
	["actors\\stalker_neutral\\stalker_neutral_1_face_1"] = true,
	["actors\\stalker_neutral\\stalker_neutral_1_face_2"] = true,
	["actors\\stalker_neutral\\stalker_neutral_1_face_3"] = true,
	["actors\\stalker_bandit\\stalker_bandit_3_face_3"] = true,
	["actors\\stalker_neutral\\stalker_neutral_2_face_1"] = true,
	["actors\\stalker_neutral\\stalker_neutral_2_face_2"] = true,
	["actors\\stalker_neutral\\stalker_neutral_2_face_3"] = true,
	["actors\\stalker_neutral\\stalker_neutral_2_face_4"] = true,
	["actors\\stalker_neutral\\stalker_neutral_2_face_5"] = true,
	["actors\\stalker_neutral\\stalker_neutral_2_face_6"] = true,
	["actors\\stalker_neutral\\stalker_neutral_2_face_7"] = true,
	["actors\\stalker_bandit\\stalker_bandit_3_face_2"] = true,
	["actors\\stalker_neutral\\stalker_neutral_2_mask"] = true,
	["actors\\stalker_neutral\\stalker_neutral_3_face_1"] = true,
	["actors\\stalker_neutral\\stalker_neutral_nauchniy_face_1"] = true,
	["actors\\stalker_neutral\\stalker_neutral_nauchniy_face_3"] = true,
	["actors\\stalker_soldier\\stalker_soldier_1"] = true,
	["actors\\stalker_soldier\\stalker_soldier_1_face_1"] = true,
	["actors\\stalker_soldier\\stalker_solider_2"] = true,
	["actors\\stalker_soldier\\stalker_solider_2_face_1"] = true,
	["actors\\stalker_soldier\\stalker_solider_3_face_1"] = true,
	["actors\\stalker_soldier\\stalker_solider_ecolog_face_1"] = true,
	["actors\\stalker_ucheniy\\stalker_ucheniy_1_face_1"] = true,
	["actors\\stalker_ucheniy\\stalker_ucheniy_1_face_2"] = true,
	["actors\\stalker_zombied\\stalker_zombied_1"] = true,
	["actors\\stalker_zombied\\stalker_zombied_2"] = true,
	["actors\\stalker_zombied\\stalker_zombied_3"] = true,
	["actors\\stalker_zombied\\stalker_zombied_4"] = true,
	["actors\\stalker_neutral\\stalker_neutral_nauchniy_face_2"] = true
}

--------------------------------------------------------------------------------
-- Predicate functions for xr_animpoint actions --------------------------------
--------------------------------------------------------------------------------
function const_predicate_true(npc_id)
	return true
end

function animpoint_predicate_bread(npc_id)
	if(db.storage[npc_id] and db.storage[npc_id].object and eatable_visuals[db.storage[npc_id].object:get_visual_name()] and db.storage[npc_id].object:object("bread")) == true then
		return true
	end
	return false
end

function animpoint_predicate_kolbasa(npc_id)
	if(db.storage[npc_id] and db.storage[npc_id].object and eatable_visuals[db.storage[npc_id].object:get_visual_name()] and db.storage[npc_id].object:object("kolbasa")) then
		return true
	end
	return false
end

function animpoint_predicate_vodka(npc_id)
	if(db.storage[npc_id] and db.storage[npc_id].object and eatable_visuals[db.storage[npc_id].object:get_visual_name()] and db.storage[npc_id].object:object("vodka")) then
		return true
	end
	return false
end

function animpoint_predicate_energy(npc_id)
	if(db.storage[npc_id] and db.storage[npc_id].object and eatable_visuals[db.storage[npc_id].object:get_visual_name()] and db.storage[npc_id].object:object("energy_drink")) then
		return true
	end
	return false
end

function animpoint_predicate_guitar(npc_id, is_in_camp)
	--printf("  predicate_guitar %s", npc_id)
	--printf("		registred_camp %s", tostring(is_in_camp))
	if is_in_camp == true and db.storage[npc_id] and db.storage[npc_id].object and db.storage[npc_id].object:object("guitar_a") then
		--printf("  return true")
		return true
	end
	--printf("  return false")
	return false
end

function animpoint_predicate_harmonica(npc_id, is_in_camp)
	--printf("  predicate_harmonica %s", npc_id)
	--printf("		registred_camp %s", tostring(is_in_camp))
	if is_in_camp == true and db.storage[npc_id] and db.storage[npc_id].object and harmonica_visuals[db.storage[npc_id].object:get_visual_name()] and db.storage[npc_id].object:object("harmonica_a") then
		--printf("  return true")
		return true
	end
	--printf("  return false")
	return false
end


function animpoint_predicate_weapon(npc_id)
	if(db.storage[npc_id] and db.storage[npc_id].object) then
			local smart = xr_gulag.get_npc_smart(db.storage[npc_id].object)
			if(smart) then
					for k,v in pairs(smart_table) do
							if smart:name() == v then
									return false
							end
					end
			end
	end
		return true
end

--------------------------------------------------------------------------------
-- Associative table (smartcover - animation) ----------------------------------
--------------------------------------------------------------------------------
associations = {
	animpoint_stay_wall	= {
 							{name = "animpoint_stay_wall", predicate = xr_animpoint_predicates.const_predicate_true},
							{name = "animpoint_stay_wall_eat_bread", predicate = xr_animpoint_predicates.animpoint_predicate_bread},
							{name = "animpoint_stay_wall_eat_kolbasa", predicate = xr_animpoint_predicates.animpoint_predicate_kolbasa},
							{name = "animpoint_stay_wall_drink_vodka", predicate = xr_animpoint_predicates.animpoint_predicate_vodka},
							{name = "animpoint_stay_wall_drink_energy", predicate = xr_animpoint_predicates.animpoint_predicate_energy},
--							{name = "animpoint_stay_wall_guitar", predicate = xr_animpoint_predicates.animpoint_predicate_guitar},
--							{name = "animpoint_stay_wall_harmonica", predicate = xr_animpoint_predicates.animpoint_predicate_harmonica},
							{name = "animpoint_stay_wall_weapon", predicate = xr_animpoint_predicates.animpoint_predicate_weapon},
							},
	animpoint_stay_table = {
 							{name = "animpoint_stay_table", predicate = xr_animpoint_predicates.const_predicate_true},
							{name = "animpoint_stay_table_eat_bread", predicate = xr_animpoint_predicates.animpoint_predicate_bread},
							{name = "animpoint_stay_table_eat_kolbasa", predicate = xr_animpoint_predicates.animpoint_predicate_kolbasa},
							{name = "animpoint_stay_table_drink_vodka", predicate = xr_animpoint_predicates.animpoint_predicate_vodka},
							{name = "animpoint_stay_table_drink_energy", predicate = xr_animpoint_predicates.animpoint_predicate_energy},
--							{name = "animpoint_stay_table_guitar", predicate = xr_animpoint_predicates.animpoint_predicate_guitar},
--							{name = "animpoint_stay_table_harmonica", predicate = xr_animpoint_predicates.animpoint_predicate_harmonica},
							{name = "animpoint_stay_table_weapon", predicate = xr_animpoint_predicates.animpoint_predicate_weapon},
							 },
	animpoint_sit_high = {
 							{name = "animpoint_sit_high", predicate = xr_animpoint_predicates.const_predicate_true},
							{name = "animpoint_sit_high_eat_bread", predicate = xr_animpoint_predicates.animpoint_predicate_bread},
							{name = "animpoint_sit_high_eat_kolbasa", predicate = xr_animpoint_predicates.animpoint_predicate_kolbasa},
							{name = "animpoint_sit_high_drink_vodka", predicate = xr_animpoint_predicates.animpoint_predicate_vodka},
							{name = "animpoint_sit_high_drink_energy", predicate = xr_animpoint_predicates.animpoint_predicate_energy},
--							{name = "animpoint_sit_high_guitar", predicate = xr_animpoint_predicates.animpoint_predicate_guitar},
							{name = "animpoint_sit_high_harmonica", predicate = xr_animpoint_predicates.animpoint_predicate_harmonica},
--							{name = "animpoint_sit_high_weapon", predicate = xr_animpoint_predicates.animpoint_predicate_weapon},
						 },
	animpoint_sit_normal = {
 							{name = "animpoint_sit_normal", predicate = xr_animpoint_predicates.const_predicate_true},
							{name = "animpoint_sit_normal_eat_bread", predicate = xr_animpoint_predicates.animpoint_predicate_bread},
							{name = "animpoint_sit_normal_eat_kolbasa", predicate = xr_animpoint_predicates.animpoint_predicate_kolbasa},
							{name = "animpoint_sit_normal_drink_vodka", predicate = xr_animpoint_predicates.animpoint_predicate_vodka},
							{name = "animpoint_sit_normal_drink_energy", predicate = xr_animpoint_predicates.animpoint_predicate_energy},
							{name = "animpoint_sit_normal_guitar", predicate = xr_animpoint_predicates.animpoint_predicate_guitar},
--							{name = "animpoint_sit_normal_harmonica", predicate = xr_animpoint_predicates.animpoint_predicate_harmonica},
--							{name = "animpoint_sit_normal_weapon", predicate = xr_animpoint_predicates.animpoint_predicate_weapon},
							 },
	animpoint_sit_low = {
							{name = "animpoint_sit_low", predicate = xr_animpoint_predicates.const_predicate_true},
							{name = "animpoint_sit_low_eat_bread", predicate = xr_animpoint_predicates.animpoint_predicate_bread},
							{name = "animpoint_sit_low_eat_kolbasa", predicate = xr_animpoint_predicates.animpoint_predicate_kolbasa},
							{name = "animpoint_sit_low_drink_vodka", predicate = xr_animpoint_predicates.animpoint_predicate_vodka},
							{name = "animpoint_sit_low_drink_energy", predicate = xr_animpoint_predicates.animpoint_predicate_energy},
							{name = "animpoint_sit_low_guitar", predicate = xr_animpoint_predicates.animpoint_predicate_guitar},
							{name = "animpoint_sit_low_harmonica", predicate = xr_animpoint_predicates.animpoint_predicate_harmonica},
--							{name = "animpoint_sit_low_weapon", predicate = xr_animpoint_predicates.animpoint_predicate_weapon},
						},
	walker_camp		  = {	{name = "play_guitar", predicate = xr_animpoint_predicates.animpoint_predicate_guitar},
							{name = "play_harmonica", predicate = xr_animpoint_predicates.animpoint_predicate_harmonica}
						},
	-- START IX-Ray					
	kamp			  = {
							{name = "kamp", predicate = xr_animpoint_predicates.const_predicate_true},
							{name = "kamp_eat_bread", predicate = xr_animpoint_predicates.animpoint_predicate_bread},
							{name = "kamp_eat_kolbasa", predicate = xr_animpoint_predicates.animpoint_predicate_kolbasa},
							{name = "kamp_drink_vodka", predicate = xr_animpoint_predicates.animpoint_predicate_vodka},
							{name = "kamp_drink_energy", predicate = xr_animpoint_predicates.animpoint_predicate_energy},
							{name = "kamp_guitar", predicate = xr_animpoint_predicates.animpoint_predicate_guitar},
							{name = "kamp_harmonica", predicate = xr_animpoint_predicates.animpoint_predicate_harmonica},
						},
	-- END IX-Ray
}
