-- 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 'rest4_baseOvenProduct' (regularProduct)

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

function rest4_baseOvenProduct:onClick()
	if (not self:isQueuedLast()) then
		regularProduct.onClick(self)
	end
end

function rest4_baseOvenProduct:onWorkStart(task)


	Product.onWorkStart(self, task)
	self:moveToBubble()
	return true
end

function rest4_baseOvenProduct:onBubbleCancel()
	
	self:unQueue()

end

function rest4_baseOvenProduct:onBubbleMerged()
	cout("onBubbleMerged\n")
	self:unQueue()
	regularProduct.onBubbleMerged(self)
end