------------------------------------------------------------------------------
-- class 'NoSkipMinigame'
------------------------------------------------------------------------------

class 'NoSkipMinigame' (RSLAchievment)

------------------------------------------------------------------------------
function NoSkipMinigame:__init(game_scene)
	Achievment.__init(self, game_scene)
	self.name = 'NoSkipMinigame'
	self:addEventHandler('on_skip_pressed', bind(self.onSkipPressed, self))
	self:addEventHandler('on_minigame_completed', bind(self.onMinigameCompleted, self))

	self.used_skip = false 
end

------------------------------------------------------------------------------
function NoSkipMinigame:onSkipPressed(args)
	self.used_skip = true
end

------------------------------------------------------------------------------
function NoSkipMinigame:onMinigameCompleted(args)
	if not self.used_skip then
		self:setCompleted(not self.used_skip)
	else
		self.used_skip = false 
	end
end