-- This is basicly just a regular product, with the only exception
-- that it needs to be made invisible when a pie will be placed in the oven

class 'cakemoldProduct' (regularProduct)

function cakemoldProduct:__init(baseName) super(baseName)
end

function cakemoldProduct:onWorkStart(task)

	if (self:isVisible()) then
		Product.onWorkStart(self, task)
		self:moveToBubble()
		return true
		
	else
		self:unQueue()
	
	end
	
	return false
		
end

function cakemoldProduct:onBubbleCancel()
	
	self:unQueue()

end

function cakemoldProduct:onBubbleMerged()
	
	self:unQueue()
	self:setClickable(false)
	self:setVisible(false)
	
	regularProduct.onBubbleMerged(self)
	
end