class 'pieProduct' (regularProduct)

pieProduct.pieBaseName = "PROD_BUT_"

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

function pieProduct:onCreate()

	self.pieBaseName = self.pieBaseName .. self:getBase() .. "_"

end

function pieProduct:onWorkComplete(task)

	regularProduct.onWorkComplete(self, task)

	-- update image using the new stock count
	if (self:getStock() > 0) then
		self:animate(self.pieBaseName .. self:getStock(), 0)
		
	end

end