ObjectData = 
{
	MotionModel = 
	{
		DefaultAnimation = [[toolbar]],
		Motions = 
		{
			motion1 = 
			{
				Animations = 
				{
					anim1 = 
					{
						Path = [[DATA:Animations\Merch\Merch Merch\merch_merch_ball.anim]],
						Name = [[merch_merch_ball]],
						MinFreq = 1.000000,
						MaxFreq = 1.000000,
					},
				},
				Name = [[toolbar]],
			},
			motion2 = 
			{
				Animations = 
				{
					anim1 = 
					{
						Path = [[DATA:Animations\Merch\Merch Merch\merch_merch_alarm.anim]],
						Name = [[merch_merch_alarm]],
						MinFreq = 1.000000,
						MaxFreq = 1.000000,
					},
				},
				Name = [[merch_merch_alarm]],
			},
			motion3 = 
			{
				Animations = 
				{
					anim1 = 
					{
						Path = [[DATA:Animations\Merch\Merch Merch\merch_merch_cap.anim]],
						Name = [[merch_merch_cap]],
						MinFreq = 1.000000,
						MaxFreq = 1.000000,
					},
				},
				Name = [[merch_merch_cap]],
			},
		},
	},
	Extensions = 
	{
		PositionExtension = 
		{
		},
		PhysicsExtension = 
		{
			mass = 10.000000,
			static_friction = 0.200000,
			restitution = 0.600000,
			kinetic_friction = 0.0500000,
		},
		LevelEditorExtension = 
		{
			rotate_divisions = 8.000000,
		},
		DefaultMotionExtension = 
		{
		},
		ThwackableExtension = 
		{
			plays_thwack_effect = false
		},
		EdibleExtension = 
		{
			Eaters =
			{
				"whale",
			},
		},
	},
}



-- Begin Scripting --

help_text_header = "$00655"
help_text = "$00656"

function OnInit()
end

function Update()

	Profile_Start("merch_merch")

	local eets = World_GetEets()
	local diff = eets:GetPosition() - this:GetPosition()
	
	if diff:LengthSqr() < 80*80 and this:IsVisible() and eets:IsVisible() then
		World_MerchMerchPickUp()
		World_ChangeEmotion( 0, 1001 )
		World_CreateEffect( "merch/cha-ching", this:GetPosition() )
		this:KillMe()
	end

	--[[
	for report in this:GetCollisionReports() do
		local object = World_GetObjectByID( report.id_2 )
		object_name = object:GetBlueprintName()
		
		-- Makes Eets pick up Merch merch.
		if (object_name == "eets_happy" or object_name == "eets_angry" or object_name == "eets_scared") then
			World_MerchMerchPickUp()
			World_ChangeEmotion( 0, 1001 )
			this:KillMe()
		end
	
	end]]
	
	Profile_Stop("merch_merch")

end

