
.namespace s16_SearchSite

function OnEnable()
	SearchSite.OnEnable()
	OPLog.Log("OnEnable unit "..self.Name)
	--On définit le nom du tableau
	if  SampleLevel.IsEqual("s16_search_1","unstarted") then 
		liste_s16_1.Enabled = true
		liste_s16_4.Enabled = true
	end
end

function OnEnter()
	if SampleLevel.IsEqual("s16_firstenter",true) then
		SequencePlayer.Enabled = true
		SequencePlayer.PlaySequence("GP_1601",nil,nil)
		SampleLevel.Set("s16_firstenter",false)
	end	
	
end


function UpdateAll()
	
end

function OnPickObject(objname)
	if objname == "obj_drapeau_francais" then
		SequencePlayer.Enabled = true
		SequencePlayer.PlaySequence("GP_1604",nil,nil)
	end
end


function OnSearchEnd(typesearch)
	if typesearch == 1 then
		
		InventoryManager.AddInInventory("InventoryTube","msg_ig_inventaire")
		InventoryTube.Equipped = true
	end
	if typesearch == 4 then
		InventoryManager.AddInInventory("InventoryFil","msg_ig_inventaire")
		InventoryFil.Equipped = true
	end
end
function OnPopupLeave(objname)
	if objname == "InventoryTube" then
		SequencePlayer.Enabled = true
		SequencePlayer.PlaySequence("GP_1603",nil,nil)
	end
	if objname == "InventoryFil" then
		SequencePlayer.Enabled = true
		SequencePlayer.PlaySequence("GP_1602",nil,nil)
	end
end


function CondSpecificToFinish()

end