-- ----------------------------------------------------------------------------
goalDestroyFilesSamples.mSteps = 
{
	{ action = "click", object = objectIoStoveDoor, state = kActive },
	{ action = "click", object = objectHoMetalStick },
	{ action = "click", object = objectIoStoveDoor, selection = objectHoMetalStick },
	{ action = "click", object = objectIoStoveFire, selection = objectHoFilesGroup },
	{ action = "click", object = objectIoStoveFire, selection = objectHoSpecimen01 },
	{ action = "click", object = objectIoStoveFire, selection = objectHoSpecimen02 },
	{ action = "click", object = objectIoStoveFire, selection = objectHoSpecimen03 },
}
-- ----------------------------------------------------------------------------
goalDestroyFilesSamples.readyToStart = false
-- ----------------------------------------------------------------------------
function goalDestroyFilesSamples:shouldStart()

	return self.readyToStart

end
-- ----------------------------------------------------------------------------
function goalDestroyFilesSamples:onStarted()

	objectIoStoveDoor:ss(kActive)

end
-- ----------------------------------------------------------------------------
function goalDestroyFilesSamples:onClickHO(layout, object, props, x, y)

	if (not self.readyToStart) then
		self:checkReadyToStart()
	end
	
end
-- ----------------------------------------------------------------------------
function goalDestroyFilesSamples:onLayoutHide(layout)

	if (not self.readyToStart) then
		self:checkReadyToStart()
	end

end
-- ----------------------------------------------------------------------------
function goalDestroyFilesSamples:checkReadyToStart()

	if ((objectHoFile01:isFound()) and
		(objectHoFile02:isFound()) and
		(objectHoFile03:isFound()) and
		(objectHoFile04:isFound()) and
		(objectHoFileChristine:isFound()) and
		(objectHoSpecimen01:isFound()) and
		(objectHoSpecimen02:isFound()) and
		(objectHoSpecimen03:isFound())) then
		self.readyToStart = true

	end

end
-- ----------------------------------------------------------------------------
function goalDestroyFilesSamples:onUsedAll(object, props)

	if ((objectHoFilesGroup:isUsed()) and
		(objectHoSpecimen01:isUsed()) and
		(objectHoSpecimen02:isUsed()) and
		(objectHoSpecimen03:isUsed())
		) then
		
		objectHoFileChristine:ss(kDone)
		
		self:achieved()
		play(movieSettings[kMovieStove])
		
		objectPoiStoveClosed:ss(kDone)
		objectPoiStoveOpen:ss(kDone)
		objectBackgroundCryptCenterExplosion:ss(kIdle)
		objectBackgroundCryptCenterExplosionLit:ss(kIdle)
		objectBackgroundCryptLeftExplosion:ss(kIdle)
		objectBackgroundCryptRightExplosion:ss(kIdle)
		objectBackgroundCryptRightExplosionLit:ss(kIdle)
		
		layoutCrypt.mEffectCandle1:stop()
		layoutCrypt.mEffectCandle2:stop()
		
		layoutCrypt:animKeypadSpark()
		layoutCryptKeypad:animKeypadSpark()
		
		for i=1, #layoutCrypt.mEffectCryptFire do
			layoutCrypt.mEffectCryptFire[i]:play()
		end
		
	end
end