--
-- Lanes
-- Specialization for Lanes
--
-- @author  	Manuel Leithner (SFM-Modding)
-- @version 	v1.0
-- @date  		08/11/11
-- @history:	v1.0 - Initial version
--

Lanes = {};

function Lanes.prerequisitesPresent(specializations)
    return true;
end;

function Lanes:load(xmlFile)
end;

function Lanes:delete()
end;

function Lanes:readStream(streamId, connection)
end;

function Lanes:writeStream(streamId, connection)
end;

function Lanes:mouseEvent(posX, posY, isDown, isUp, button)
end;

function Lanes:keyEvent(unicode, sym, modifier, isDown)
end;

function Lanes:update(dt)	
end;

function Lanes:updateTick(dt)
    if self:getIsActive() then
        if self.isClient then
			for _,area in pairs(self.cuttingAreas) do
				if self:getIsAreaActive(area) then
					local x,y,z = getWorldTranslation(area.start);
					local x1,y1,z1 = getWorldTranslation(area.width);
					local x2,y2,z2 = getWorldTranslation(area.height);
					for index,fruit in pairs(g_currentMission.fruits) do
						local fruitDesc = FruitUtil.fruitIndexToDesc[index];
						if fruitDesc.needsSeeding then
							Utils.cutFruitArea(index, x, z, x1, z1, x2, z2);
							Utils.updateFruitCutShortArea(index, x, z, x1, z1, x2, z2, 0);
						end;
					end;
				end;
			end;
        end;
    end;
end;

function Lanes:draw()	
end;
