
.namespace s12_HotSpot

function OnActivate()
	
	OPLog.Log("onactivate "..self.Name)
	
	if self.Name == "back_s12" then
		if SampleLevel.IsEqual("s13_firstenter",true) then
			NavigationManager.SwitchTo(nil,"s11_SearchSite")
		else
			NavigationManager.SwitchTo(nil,"s13_SearchSite")
		end
	end
	
	if self.Name == "planche_area" then
		SequencePlayer.Enabled = true
		SequencePlayer.PlaySequence("GP_1202",nil,nil)	
	end
	
	if self.Name == "OpenWanted" then
	SequencePlayer.Enabled = true
		--SequencePlayer.PlaySequence("GP_1207",nil,nil)	
		PlaySoundEffect("gmp_grabpaper")
		DocumentManager.OpenDocument("media/graph/documents/avis_de_recherche_"..DebugOptions.curlanguage..".PNG","avis_de_recherche","none")
	end
end

function OnEnable()
	AreaHotspot.OnEnable()
	--self.firstclick = true
	OPLog.Log("mon onenable "..self.Name)

end

function OnDropObject()
	OPLog.Log("drop "..self.Name)
	if IsEqualVariables("CurrentObject","InventoryLevier") and self.Name == "planche_area" then
		PlaySoundEffect("gmp_breakfloor")
		InventoryManager.RemoveFromInventory("InventoryLevier")
		planche_area.Enabled = false
		planche.Enabled = false
		planche_open.Enabled = true
		liste_12_01.Enabled = true
		SequencePlayer.Enabled = true
		SequencePlayer.PlaySequence("GP_1206",nil,nil)
		return true
		
	end
end
function PrivateCanClickOn()
	--if SampleLevel.IsEqual("CloseupMecaState","finished")  then
	--	return false
	--end
	
	return true
end
function GetSpecificCursor()
	if self.Name == "planche_area" then
		return 1
	elseif self.Name == "OpenWanted" then
		return 1
	elseif	self.Name == "back_s12" then
		return 11,"s11"
	else
		return CURSOR_AREA_HOTSPOT
	end
end

